Here's another feature suggestion: Inheritance of
materials down the object hierarchy.

In SketchUp, you can define a component with no
material specified for some or all of its faces,
and then apply different materials to different
instances of that component. The faces which have
no material inherit the material from further up
in the tree.

It would be handy if Soya Faces and Shapes
behaved in a similar way. Currently I'm expanding
this sort of arrangement on import and creating
multiple Shapes with the same geometry but
different materials, which seems rather wasteful.
If Faces with no material were to inherit a material
from further up, I would be able to share the Shape
between instances, in the same way as the original
SketchUp model.

This would mean giving Worlds and Volumes a 'material'
property that would be used as the default material
in any sub-objects that didn't specify their own
material.

It seems like this should be fairly straightforward
to implement, by making use of OpenGL's ability
to push and pop various parts of its state.
Whenever you encounter an object with a material,
push the current state of the relevant OpenGL
variables, set them up for the new material,
render all the sub-objects, then pop the previous
material state.

--
Greg

_______________________________________________
Soya-user mailing list
[email protected]
https://mail.gna.org/listinfo/soya-user

Reply via email to