Question: options->SharedObjects, Colors and Reuse #1562
Unanswered
PowerOfNames
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey y'll,
so, you can add a SharedObjects object to the options. I dug through many examples now but except for one, the only thing that is happening is, that this object is created. There is no word on its usage or what happens in the background to be found (wasn't able to, though)
Chances are, I missed a post about it, so please help out if you know any resources about it.
Besides that, I have the following case:
Upon initialization of VSG, we load models using vsgXchange/assimp. (.stl) Models are used multiple times in multiple windows. So the idea was to load the model once, then wrap it around a Node (to create a shallow copy) every time I want to reuse the model. The node is then wrapped itself with a MatrixTransform. That worked so far.
Unfortunately, I struggle with coloration. We need to be able to individually recolor the model nodes, not the basic model. I tried the solution from another post (#1227), wich seems promising, but it seems like the stl loader doesn ot produce a VertedIndexDraw leave? Not sure, at least that apply function was never visited during runtime.
Im unfortunately completely new to most of the concepts utilized by vsg and am still learning most of it, so please excuse if some of the questions I post seem trivial to you. Adding documentation to the examples would be helpful on that regard.
Anyways, it would be nice to point me into the right direction with .stl loaded models, how to reuse them (potentially using the SharedObjects option) and most importently, how to dynamically change the color of individual models during runtime.
Thanks alot! :)
PS: Loading assets already works, and my original idea to wrap a asset node with a node to create individually places copies of that asset works as well, but the coloring using the exmaple fails, so thats the crux for me atm. Im also not able to create one scene graph that contains multiple graphics pipelines (one to render all the models, one to render a grid, but I will do another more detailed question about that later, I just mention it here because it woudn't be much help to me to just suggest using push constants and a custom shader to recolor individual objects, because I couldnt get that running in the first place ':D )
Beta Was this translation helpful? Give feedback.
All reactions