add texture to a node #1673
-
|
How can I read a raw model from a file and put it into a NodeGraph and then add a texture, such as color, to it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
It's hard to answer this question as it's so open ended with so many different possible interpretations of what you actual want/need. The only way to provide a specific answer is find out what what the problem you are trying to solve.
|
Beta Was this translation helpful? Give feedback.
-
|
The model format I load is .vsgb. I cast it to a vsg::Node and render it. The model does not have any textures, and I want to assign different colors to it under different conditions. For example, imagine a car whose color should change to blue, yellow, red, or green depending on its speed range. Also, when the object is selected, it should turn white, and when it is deselected, it should return to its original color. I don’t want to use complex textures. Even when I create a node with a builder and assign a color to it, I don’t know how to change its color after it has been created. One solution that comes to mind is creating a new model with the new color and removing the old one, but I’m worried this approach is not efficient and not a proper or optimal way to do it. |
Beta Was this translation helpful? Give feedback.
It's hard to answer this question as it's so open ended with so many different possible interpretations of what you actual want/need.
The only way to provide a specific answer is find out what what the problem you are trying to solve.