Fossor, Newbie Posted: 03 September 2011 03:30 PM Total Posts: 21
Hi,
Can someone point me out how to apply 2 materials using 2 different uv maps on one mesh? I’ve got .3ds model that has 2 uv channels each for different part of the model (like head and body for a character). Each uv has it’s own material.
Is this supported in 3.6? Or should I split model/combine uvs?
Thanx.
kurono, Sr. Member Posted: 03 September 2011 03:42 PM Total Posts: 103
[ # 1 ]
Try
(mesh.subMesh[i].material as BitmapMaterial) = new BitmapMaterial(...)
, where mesh is whole model. i = [0, 1, ... , totalSubMeshes]
Fossor, Newbie Posted: 03 September 2011 04:01 PM Total Posts: 21
[ # 2 ]
thanx kurono,
so i do have to split model, cause now i have it in one piece?
80prozent, Sr. Member Posted: 03 September 2011 05:07 PM Total Posts: 430
[ # 3 ]
hi
to assign more than one material to a mesh, you need a submesh (and subgeometry) for each material.
each submesh has its own vertex-, index-, and uv-buffer, so different submeshes with different uvs should be possible.
hope that helps
[edit:] argh….....didnt reat the software version youre on. my answer would be for away3d 4 (broomstick)
Fossor, Newbie Posted: 03 September 2011 05:28 PM Total Posts: 21
[ # 4 ]
thank you 80prozent,
Still didn’t checked the broomstick, but anyway, different submeshes means different objects without shared vertexes and edges? If not, how can one separate mesh to submeshes?
80prozent, Sr. Member Posted: 03 September 2011 05:47 PM Total Posts: 430
[ # 5 ]
sorry, cant tell you much about away3d before molehill
if i remember right, i didnt used different materials on one mesh in away3d 3.5.
Fossor, Newbie Posted: 03 September 2011 05:58 PM Total Posts: 21
[ # 6 ]
And how this done with broomstick?
80prozent, Sr. Member Posted: 03 September 2011 06:22 PM Total Posts: 430
[ # 7 ]
in molehill every meshs geometry data (vertex, index, and uv buffer)is descripted by a “geometry” object.
this is true for earlier away versions too.
in molehill every mesh and every geometry object can contain more than one submesh/subgeometry.
so you simply create a mesh and assign a geometry object to it.
than you create two (or more) subgeometry objects, update their buffers and make them child of the geometry object.
now you can apply a different material to each submesh inside your mesh object (the submeshes beeing created by away3d when applying the subgeometries to the geometry).
hope that make sense
Fossor, Newbie Posted: 03 September 2011 06:28 PM Total Posts: 21
[ # 8 ]