MiguelCastillo / scenic

Scene graph
MIT License
4 stars 0 forks source link

Adding Material Details panel for material nodes in the scene editor #15

Closed MiguelCastillo closed 2 years ago

MiguelCastillo commented 2 years ago

Im adding the ability to get at material nodes information for nodes in scene editor, which is very useful in FBX files where we can have multiple meshes with their own material nodes. You can now we can change the color, the ambient color, and the reflectiveness in a material node for any mesh that has a material node with that information.

To make this work I am initializing the state of each material node with information from FBX file. This will allow material state in each mesh to be updated via the scene editor. One side effect of this is that meshes in an FBX file need to specify a reflective factor in their material so that each mesh is visible in a lit scene. However, if materials for meshes in an FBX file don't specify a reflective factor you can always configure one in the skinned-mesh or static-mesh node that is hosting the FBX file. You can see such updates in the scene configurations in this commit, which I had to do because the reflective factor in all the FBX files we have a scene for have very low reflective factors. And ambient color is black, so these models were just basically not visible when the background in the scene is also black.

Screen Shot 2022-04-30 at 6 52 09 PM Screen Shot 2022-04-30 at 7 13 03 PM
MiguelCastillo commented 2 years ago

@jandrade I have a new panel and the toolbar is great!!