Hello there, wondering is it possible to assign one material to a triangle in a mesh?
per triangle materialSoftware: Away3D 4.x |
||
|
||
GoroMatsumoto, Sr. Member
Posted: 23 September 2013 12:08 PM Total Posts: 166 [ # 1 ] At first, there is no usual easy way to do it. You should use a texture that include all textures you want use. You have to learn about manipulating UVs by hand. PlaneGeometry is simplest in Away3d.
mesh = new Mesh(new PlaneGeometry, material); You can see vertices and UVs data by trace().
var uvs:Vector.<Number> = mesh.geometry.subGeometries[0].UVData; If you can manage with PlaneGeometry, Cheers.
|
||
koblongata, Newbie
Posted: 23 September 2013 12:55 PM Total Posts: 28 [ # 2 ] Thank you! yes it is complicated to me looking into it now. I found this post: I think it’s basically talking about the same thing? you can have multiple materials for planes and than merge them, and have materials stay. how about have a custom triangle geometry like plane geometry and have them merged like above? and if only ColorMaterial needed then uvs don’t matter right? |
||
GoroMatsumoto, Sr. Member
Posted: 23 September 2013 02:30 PM Total Posts: 166 [ # 3 ] The article’s way is not similar with the way that I described. If you need only simple geometry like a cube, But if you need more complex geometry, One of the problem will occur on it’s performance. Second problem is the custom triangle geometry. Anyway, you should describe more about your situation. Cheers. |
||
GoroMatsumoto, Sr. Member
Posted: 23 September 2013 02:36 PM Total Posts: 166 [ # 4 ] If you want to use particles as mesh, this may helps you. |
||
koblongata, Newbie
Posted: 23 September 2013 10:20 PM Total Posts: 28 [ # 5 ] Hi, thanks for the insight, sorry I didn’t not explain so well I was making a simple mesh “drawing” tool, the idea is like this: it would create mesh out of triangulated closed paths with some “holes” (they are actually extruded in the end) it was done in pv3d, (in pv3d a triangle has a material), good only for cartoon like stuff though, wanting to continue the idea on away3d… |
||
koblongata, Newbie
Posted: 23 September 2013 10:30 PM Total Posts: 28 [ # 6 ] That particle mesh is very cool, imagining some hologram like stuff |
||
GoroMatsumoto, Sr. Member
Posted: 24 September 2013 08:53 AM Total Posts: 166 [ # 7 ] I see. http://away3d.com/livedocs/away3d/4.1.1Beta/away3d/extrusions/package-detail.html There are not so many information about these classes on internet. Forum search “extrude”: Maybe you can use these classes: But these classes are not so updated very well… |
||
|