Jump to content

Multiple materials


Fidella Faulds
 Share

You are about to reply to a thread that has been inactive for 3603 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

I'm getting pretty handy with Blender thanks to some great tuts (thanks Gaia!) and just plain sticking with it.  So I now have mesh pants, rigged, with a bow at the waist .  Two materials have been assigned, one to the pants, one to the bow.  The pants have a uv map, the bow has a uv map.  (they were created separately, then joined.)  

 

Uploaded to beta grid, everything is great.  Now how do I assign two different textures to the pants and bow separately?  I know I'm just missing some concept about assigning texture zones I can't quite grasp.

Thank you!

Link to comment
Share on other sites

Parts of the mesh with different materials appear inworld as faces. So it's exactly the same as texturing the different faces of a box prim. Either check the "select face" radiobutton, click the face and use the texture tab, or simply drag a texture from inventory onto the appropriate part of the mesh. Also, make sure they have different material indexes in the object before exporting.

Link to comment
Share on other sites

 

I have a (strange) question about materials too.. currently the material definitions in the collada file don't matter, but the faces are defined in the <geometry> block: every <triangles> and <polylist> element produces a face, which is very handy for directly writing collada files, but I havnt found any documentation of this... would anyone know is this frozen design, or a side effect of how some tools like blender implement materials in the collada, and is there a risk that this will change in future?

 

Link to comment
Share on other sites

The correspondence between <triangles> and material/face is unlikely to change. However, the requirements for getting the right textures on the right faces in the LOD meshes has changed in the latest viewers. It used to be required that every LOD mesh had the same numbers of materials. They were identified only by the order of the <triangle> tags in the <geometry> defining the mesh. Now, they are identified by the "material" attribute in the <triangle> tag (if it is there) and the lower LODs must all have a subset (possibly the complete set) of the materials in the high LOD mesh. The faces defined by <triangles> tags with the same "materials" attribute will receive the same texture, irrespective of their order. This removes some problems resulting from unintended triangle list ordering. It also means high LOD specific materials no longer need to be kept on hidden faces on the lowest LODs, saving triangles. Low LOD specific materials, such as alpha billboards, still have to be accomodated on hidden faces in the high LOD mesh.

Link to comment
Share on other sites

  • 2 weeks later...

I've actually got a question related to this because I'm trying to do something roughly akin to what this person is doing, single object, multiple UV maps as different faces in world.  Would someone please explain "material indexes" so I can get this right?

Link to comment
Share on other sites

I can only address the case of Blender 2.49 in detail. In the later versions, and to some extent other programs, similar considerations will apply. The Collada exporters in the later versions may not work in the same way as far as the ordering of tags (hence inworld face numbers) or sources of attributes (hence inter-LOD material correspondence) is concerned. (Perhaps someone using these can provide that information?)

When materials are made (New in Link and Materials panel, or ADD NEW from the updown widget) in a single object, or an existing material is applied with the updown widget,  each material is given the next available number starting at 1. This appears as the second number in the "< 3 Mat 2 >" widget in the Editing (F9) Link and Materials panel. It is the material index for that material of that object. The exporter (2.49) puts the triangle/poly lists in that order in the Collada file, which causes them to have the same order of LSL face numbers inworld. The ,material index used to determine which set of triangles/polys received the same texture in different LODs. That is no longer the case.

A default name is also allocated to a new material. This can be edited in the Links and Pipelines panel in the Shading (F5)/Materials panel. It can also be selected in the updown widget in the Editing (F9) Link and Materials panel, to assign an existing material to a group of triangles/polys of the same or a new object. This name becomes the "material" attribute of the <triangles> (or polys) tag defining the triangles it is applied to. It is this attribute that now has to be the same in a low LOD object as one of the attributes in the high LOD mesh, and which determines the correspondence of materials/inworld faces in the LODs. The order of material indices in the high LOD mesh still becomes the order of the face numbers inworld (I think).

If you always use the updown to allocate existing materials from the high LOD mesh to the lower LOD meshes, the upload condition that the materials be a subset of those in the high LOD mesh will be met. You can easily check this in the outliner view.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3603 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...