in the subgeometry docs it reads:
* Several SubGeometries are grouped so they can be rendered with different materials, but still represent a single object.
but how?
different material on subgeometry?Software: Away3D 4.x |
||
koblongata, Newbie
Posted: 30 September 2013 08:56 PM Total Posts: 28 in the subgeometry docs it reads: * Several SubGeometries are grouped so they can be rendered with different materials, but still represent a single object. but how? |
||
andreahmed, Member
Posted: 01 October 2013 08:16 AM Total Posts: 62 [ # 1 ] I think you in your 3d modeler you have to define different materials, in each sub mesh, then you access the submeshes in your mesh, then you assign the material to each sub mesh. all of those submeshes are composed of one mesh in reality. |
||
koblongata, Newbie
Posted: 01 October 2013 10:35 AM Total Posts: 28 [ # 2 ] I see, Thank you, I need to know how to do it programmatically though. Found getSubMeshForSubGeometry(subgeometry) in Mesh class, so I guess basically we had to add subgeometry first then get submesh by referecing that subgeometry and then apply material to it.
mesh.geometry.addSubGeometry(sg); Hopefully somebody can shed some more light on it. |