Giter Club home page Giter Club logo

Comments (7)

Peamon avatar Peamon commented on June 14, 2024

Yes of course,

First you should create a map<int, GaussianSplattingRenderer> in PluginApi to create multiple gaussian splatting renderers.
you should also create a map<int, std::vector<std::shared_ptr<POV>>> for povs.

Then you should change the interface :

  • LoadModel should return an int (-1 if failed, the key of the map if ok)
  • Alls other function (SetNbPov, SetPovParameters...) add, int model_number at the start of the function.

Then you should modify all the functions to take this new parameter in account.

In Draw function you should also draw each GaussianSplattingRenderer.

Finally you have to change the Csharp function in unity project in the same way.

For the quad rendering it should not be hard to change C# code in unity because plugin create an external texture that can be easily set as a material main texture. Be aware that rendering pov need a camera (for intrinsics and extrinsics parameters), event if you use the target texture on a quad.

It's a good idea, be free to make a pull request when you're done ;-) or ask.

from gaussiansplattingvrviewerunity.

changruizhu96 avatar changruizhu96 commented on June 14, 2024

Thanks for your hints, I will have a try!

from gaussiansplattingvrviewerunity.

changruizhu96 avatar changruizhu96 commented on June 14, 2024

Your hints above provide ideas on how to load and render both models at the same time. In addition to that, is it possible to create two Gaussian splatting game objects, following an existing C# script? (One rendering to the main camera and the other to a quad.) I guess this might not require any changes to the API. But Unity always errors out and then forces quit when I try this. Are there some rendering settings in the C# script that don't allow the rendering of two models?

from gaussiansplattingvrviewerunity.

Peamon avatar Peamon commented on June 14, 2024

It’s because DLL is only loaded once so when you call DLL api from two c# it cause conflicts. You have to provide multi model support inside the DLL like I proposed it’s the only way.

from gaussiansplattingvrviewerunity.

changruizhu96 avatar changruizhu96 commented on June 14, 2024

Thanks for letting me know!

from gaussiansplattingvrviewerunity.

changruizhu96 avatar changruizhu96 commented on June 14, 2024

Hi, I devised a lazy way to do it, and it worked well when I tried it. Since DLL can be loaded only once, I duplicated the DLL and renamed it. Created another game object for the second Gaussian-splatting model.
MicrosoftTeams-image

from gaussiansplattingvrviewerunity.

Peamon avatar Peamon commented on June 14, 2024

Well done πŸ‘

from gaussiansplattingvrviewerunity.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.