Jump to content

Multi Sub Object material Id's & UV Mapping (3ds Max 2013)


Gromlok Landar
 Share

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

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

Recommended Posts

Ok, I have decided to go one step higher in my mesh design and have figured out how to multi sub object a 3d model in 3ds Max and apply for example 5 material id's to the sub objects selected.

Here's my question:  Once each part of a 3d model is multi sub objected for example having 5 different textures applied to one 3d model and setting the material id's for each, when do I UV map the model ? 

Do I have to UV map each multi sub object area individually then take the UV map and go into photoshop to texture it ?

Do I UV map the entire 3d model first then multi sub object the model afterwards or vice versa ?

Any help would be greatly appreciated, thank you

Grom

Link to comment
Share on other sites

You can do two things.

You can build your objects with a single ID first, UV map them individually, then attach all objects.

Or you can take the complete model with all materials and ID's applied and UV map each ID seperately. To select one ID out of your five, use the button highlighted in the picture below.

UV Editor.JPG

To make your life easier, name your ID's like highlighted below, they will then show in the Edit UVW window.

Material Editor.JPG

Link to comment
Share on other sites

What do you mean by "place the uv map in 2d" ? If you mean "is your geometry with a specific ID unwrapped automatically", the answer is no. All this does is allow you to select one ID, the unwrapping you still need to do afterwards.

You can select the individual polygons(, verts or edges) in your viewport, or you can drag a box around everything in the UV editor. That will select only the polygons with the material ID selected in the box in my first picture. Ctrl-A doesn't work, that will select everything.

 

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Some more information would be helpful, only thing I can think of right now is you did set all IDs, but you didn't assign any material or the same material to all sides. I think the dae format stores materials, not ID's. So make a multi/sub with 6 materials and assign it to your box.

Link to comment
Share on other sites

  • 4 months later...

Hey Kwakkelde, (god I hope I got that right)

I setup the materials for the multi sub object, uv mapped both material id's for the 3d model separately as per the 2nd option given, tested it thoroughly in 3ds Max in the uv map editor, swapped between material id 1 and 2, each id showed only what was selected for each map, import in world, only allows me to apply one texture to the 3d model instead of 2.


Any solutions ?  Suggestions ?

Pat

 

 

Link to comment
Share on other sites

Kwakkelde,

I got the multi-sub object part working however when I go to apply multiple maps to the design, it removes the previous one I put on.  You can apply multiple uv maps to one 3d model can't you ?  If that stands true, then how do you apply them, I have 4 uv maps that are each separately rendered from the Main UV map to texture them in photoshop.  I have taken the liberty of taking several pictures to show how I achieved multi-sub object.bridge 1.jpg

So theres the base of the bridge design above ^ in 3ds Max.

Below is the Multi-sub object setup with material id's assigned and materials as well as naming convention.

bridge mats 2 NEW.jpg

bridge UV map 3 NEW.jpg

Above is the entire UV Map showing the bridge in a 2d Map

Below shows the material id's on the UV Map Editor:

bridge UV map 4 NEW.jpg

Below I have selected Material id 1, as you can see, only the faces for Mat 1 is displayed in the editor:

bridge UV map 5 NEW.jpg

Below is Material ID 2 selected from the UV Map Editor displaying only the faces for the 2d Map of that Material ID:

bridge UV map 6 NEW.jpg

You get the idea that there are 2 other UV Maps for Material ID's 3 & 4.

Now I went into the editor under the Tools tab and selected Render UVW Template for Material ID 1:

bridge UV map 9 NEW.jpg

And I did the same for each Material ID in the UV Editor to render the remaining UVW Templates for Mat ID 2,3,4 and once that is done, I took each into photoshop and textured them.

When I apply the first UV Map which is Mat ID 1, it applies properly, when I go to apply the 2nd UV Map, it removes the first UV Map and replaces it with the 2nd UV Map and so forth, it will not allow me to place all 4 UV Map's.

I selected edit the 3d Model in world, click on the texture tab, open my inventory separately and click and drag it to the texture window in the texture tab of the edit window in world.

What am I missing here ?

Pat

Link to comment
Share on other sites

I'm not quite sure what you mean by "applying the UV map" and "replacing the UV map".

All UV maps are already applied before you render the templates. You can export the model as it is when you render those. In SL the four ID's should translate into face 0,1,2 and 3. You can apply your textures (or with the way you made the UV map a single texture) in SL.

If you want the UV templates to show in 3ds max, just assign the rendered templates to the four corresponding diffuse map slots.

EDIT. You can assign multiple UV maps to any "face", but that serves no purpose in your case. Only one channel can be shown. Anyway, do you mean "assigning the UV template as a texture" when you say "applying the UV map"? If that's the case, aren't you assigning them to the same ID? You still need 4 ID's for the templates, or for your final textures.

Link to comment
Share on other sites

Quote "I'm not quite sure what you mean by "applying the UV map" and "replacing the UV map".


A UV Map is a texture, it consists of certains faces on a 3d model that once imported in world can be applied in the edit menu under the texture tab to place it as a texture in SL.  Whatever faces are on that UV Map when the 3d model was uv unwrapped, those faces will be applied to the 3d model.

Quote "All UV maps are already applied before you render the templates."

UV maps are only applied if the 3d model has been uv unwrapped from the modifier menu tab in 3ds Max.  If the 3d model wasn't UV unwrapped, once the 3d model is imported in world (SL), applying a texture to it would look stretched. 

Quote "You can export the model as it is when you render those. In SL the four ID's should translate into face 0,1,2 and 3. You can apply your textures (or with the way you made the UV map a single texture) in SL."

Exactly but when I apply my TEXTURES, I can only apply ONE UV Map, do I choose "select face" from the edit menu in SL when editing the 3d model to select the 4 faces that translate to 0,1,2,3 as you said to apply a different texture to each ???

Quote "If you want the UV templates to show in 3ds max, just assign the rendered templates to the four corresponding diffuse map slots."

Didn't the pictures above taken from 3ds Max demonstrate that the UV Templates are assigned to the corresponding diffuse map slots ?

Quote "Anyway, do you mean "assigning the UV template as a texture" when you say "applying the UV map ?"

Yes that is exactly what I mean, since the UV Template is imported into SL, its basically an image which consists of faces from the 3d model previously rendered in 3ds Max and that UV Template is specific to only that 3d model.

Quote "If that's the case, aren't you assigning them to the same ID? You still need 4 ID's for the templates, or for your final textures."

Once again, don't the pictures above show that there are 4 Material ID's assigned to 4 UV Templates for the 3d Model and materials assigned to each Material ID under diffuse ?

I'm gonna understand and learn this one way or another, it's a growing pain and the one thing left for me to make better 3d Model designs in SL.

Thanks for your patience Kwakkelde.  I await a response from yourself or anyone else.

Pat

Link to comment
Share on other sites

I think part of the problem is terminology; UV map vs UV template vs texture etc...  I will be very pedantic in an attempt to make the distinctions clear...

Quote "I'm not quite sure what you mean by "applying the UV map" and "replacing the UV map".
A UV Map is a texture, it consists of certain faces on a 3d model that once imported in world can be applied in the edit menu under the texture tab to place it as a texture in SL.  Whatever faces are on that UV Map when the 3d model was uv unwrapped, those faces will be applied to the 3d model.
A UV map is a mapping between triangles (and their vertices) comprising the surface of a mesh model (in 3D space) and triangles in a 2D plane (2D space).  It can be used to define how a 2D texture is to be applied to the mesh surface, in which each triangle from the 2D texture space is  stretched to fit the corresponding mapped triangle on the mesh surface.

Note: A UV map is NOT a texture. It is a mapping between texture space and mesh surface space. It is part of the model. Thus it makes little sense to speak of a UV map being applied to a model. Rather, the texture is applied, using the geometric transformation implied by the UV map.

In SL, the mesh data contains a triangle list in which each triangle has pointers to each of its three vertices in a vertex list. Each entry in the vertex list include both 3D geometric coordinates and 2D UV coordinates (and a normal vector). So the UV map is not a distinct entity. It is intermingled with the rest of the vertex data.

Note: It is usually desirable for practical reasons, but not required, that the triangles in 2D space that will be used to apply a single texture (a single face in SL) are non-overlapping. On the other hand, careful overlapping (stacking UVs) can be useful. It never matters whether the triangles to be used with different textures (i.e.. Different materials/SL faces) overlap, as different textures are being sampled. For most efficient texture use, the triangles to be used with each material/face should fill as much of the 2D unit plane as possible.

This is not the case for the mapping you showed, in which the triangles for the different textures/faces are still kept non-overlapping. I don't know how it goes I 3Ds, but in Blender, you can use the whole space for each material by selecting the material and then unwrapping, repeating for each. I have a feeling that is hat Kwak was suggesting.

This is NOT the same as using multiple UV maps. It is a single map with overlapping triangles. Multiple UV maps imply additional alternative mappings from texture space to model surface. They may be useful for using different transformations, for example, for applying textures and baking the results. However, SL cannot use multiple UV maps. If they appear on the dae file, only one will be used.

Quote "All UV maps are already applied before you render the templates."
UV maps are only applied if the 3d model has been uv unwrapped from the modifier menu tab in 3ds Max.  If the 3d model wasn't UV unwrapped, once the 3d model is imported in world (SL), applying a texture to it would look stretched.
As above, maps cannot be applied. "the 3D model wasn't unwrapped" presumably means that no UV map was generated. Therefore, the way the texture is transformed for application to the surface is undefined. (I don't know what 3ds does in that case. In Blender it simply omits the UV map section of the dae file, which results in the uploader using uninitialized data in its place. That leads to a variety of unpredictable texturing effects, none of which is useful.)

Quote "You can export the model as it is when you render those. In SL the four ID's should translate into face 0,1,2 and 3. You can apply your textures (or with the way you made the UV map a single texture) in SL."
Exactly but when I apply my TEXTURES, I can only apply ONE UV Map, do I choose "select face" from the edit menu in SL when editing the 3d model to select the 4 faces that translate to 0,1,2,3 as you said to apply a different texture to each ???
As above, you can't apply UV maps in SL. The model has effectively only one unique UV map that gets used for all the textures. To be more precise, each triangle on the model surface has only one corresponding triangle in 2D space from which the texture will be taken to apply. Which texture that triangle is taken from depends on which texture you apply to the face that includes the mesh triangle, and can choose that by using "select face"* and selecting the texture from inventory, by dragging and dropping the texture onto the face, or by script using the face number.

*Note that you have to click on the face to select it, otherwise just checking "Select face" leaves all faces se;ected and the texture will be applied to all of them.

Quote "If you want the UV templates to show in 3ds max, just assign the rendered templates to the four corresponding diffuse map slots."
Didn't the pictures above taken from 3ds Max demonstrate that the UV Templates are assigned to the corresponding diffuse map slots ?
I assume "UV template" here refers to the diagram showing the layout, in the 2D texture space, of the triangles which are mapped onto the mesh triangles by the UV map. (This is often called the UV map, although, as explained above, that is inaccurate and can be misleading). Thus they are textures (diffuse maps), and can be applied to the mesh, using the UV map, the same way as any other texture.

Quote "Anyway, do you mean "assigning the UV template as a texture" when you say "applying the UV map ?"
Yes that is exactly what I mean, since the UV Template is imported into SL, its basically an image which consists of faces from the 3d model previously rendered in 3ds Max and that UV Template is specific to only that 3d model.
Here it sounds as if "UV template" (previously "UV map") is being used to describe a baked texture. That is to say, an image in which each of the 2D triangles in the UV mapping is filled with (suitably stretched) texture from the corresponding triangle of the rendered surface of the 3D model (without specifying how that rendering was achieved). In that case, application of that image to a face of the model in SL can be achieved in the ways described above. As long as the UV map used for baking is the same as the one imported into SL, then the appearance in SL should be the same as it was in the authoring software (after allowing for lighting differences). .... On second thoughts, I guess you mean the version of the UV template on which you have painted some texture effects in Photoshop? Doesn't make any difference really - as long as the UV templates were generated with the same UV map that is uploaded, it should be ok.

Quote "If that's the case, aren't you assigning them to the same ID? You still need 4 ID's for the templates, or for your final textures."
Once again, don't the pictures above show that there are 4 Material ID's assigned to 4 UV Templates for the 3d Model and materials assigned to each Material ID under diffuse ?
I think they do (although I don't know 3DS). However, they don't show us whether those material IDs have been correctly translated into <polylist>s in the dae file and thus produced the intended four faces in SL. Can you select each face (using "select face" and then clicking on it) and thus set them to different colors? If you can, then you should bne able to apply different images in the same way. If not, then something is wrong with the export (I can't help with that, as I don't use 3Ds).

  • Like 2
Link to comment
Share on other sites

I'll just reiterate the answer I think you are looking for. It has been answered, but there is alot of info for 1 person, that doesn't know, to take in.

 

I think you are just not selecting the face inside SL. So, you click the Select Face option, then click the area where the face is on the model. Then you can apply the texture to that face, and then click the next face you want to change and apply that 1, and so on.

 

Oh, and good job making your way through all that!

 

I forgot that I actually did a video about this. You can fast forward the video to about 2:30 in where I go thru the face part. The video is actually 3 years old now, so the edit window is a bit different.

  • Like 1
Link to comment
Share on other sites

I think Drongle explained why I was confused somewhat. UV map and UV template (the baked texture from the Edit UVW menu) are not the same. Furthermore, "applying a UV map" is impossible in Max (I am surprised this isn't the case in Blender). All geometry has UV data, it just isn't organised very well initially, especially after moving around vertices, extruding faces and other UV altering operations.

All things Drongle isn't sure about regarding Max can be done. As Drongle suggested, you can use the entire canvas of the texture for each ID / submaterial. If you use four different textures for the model you have now, that would be an enormous waste of texture canvas and therefor memory use. Sometimes it's useful to make sure different ID's aren't overlapping. You can use a single texture for an object then, but use different shininess settings (for example) for each individual face in SL.

I take it both Drongle and Medhue answered your question about the faces. If that doesn't solve your issue, don't be shy and ask again. Good luck!

  • Like 1
Link to comment
Share on other sites

Alright Medhue,

QUOTE "I think you are just not selecting the face inside SL. So, you click the Select Face option, then click the area where the face is on the model. Then you can apply the texture to that face, and then click the next face you want to change and apply that 1, and so on."

I selected the face in edit but when I apply even a simple color, it colors the whole base of the bridge, not a specific material id that I have setup.

QUOTE "Oh, and good job making your way through all that!"

Thanks, I self taught myself 3ds Max, this multi-sub object is the only thing stopping me from creating designs better and faster.  Multi sub object within 3ds Max works perfectly fine, no problems but the moment it has to be exported and imported into a metaverse, all hell breaks loose. :)

Now I did notice something in 3ds Max that I have never noticed before and not a single Tutorial mentions anything about it, but there's a "Material ID Channel" per Material in the Material Editor Window.  Let me show you what I mean:

The Picture below depicted with the yellow circle shows a Material ID Channel.

NEW Bridge Idea 1.JPG

In this picture, it shows Material ID Channels from 0 to 15, I have never seen this before, I'm wondering if this is also required to ensure a different texture can be applied to various parts of the 3d Model.NEW Bridge Idea 2.JPG

Im going to run a test on this design to see if that will help me solve this ongoing problem once and for all.

Feel free to jump in anytime, it just seems I am missing a step in this process to succeed.

Thanks for everyone's response, the terminology is what other 3ds Max users that I know use, so my bad for adopting it. We all have our quirk's I suppose.  This one is mine.

Pat

Link to comment
Share on other sites

That box is for something else completely. I can't say I ever used it, but it's explained in the 3ds Max help.

Don't feel bad about calling what you called a UV map a UV map, that's what most people call it :) It just confused me in this case.

default{    state_entry()    {        integer numOfSides = llGetNumberOfSides();        llSay( 0,"I have " + (string)numOfSides + " sides.");    }}

Just to determine if your SL object has multiple faces, put this script in it. If it returns "1" you have only one face, if it returns "4", all your faces are present. That should help to find the issue.

Link to comment
Share on other sites

the script comes back with an error:

 

default
{
     state_entry()
     {
              integer numOfSides = llGetNumberOfSides();
              llSay( "I have " + (string)numOfSides + " sides.", <1,1,1>, 1 );
     }
}

 

(5 , 8) Function llSay takes 2 parameters, 3 given

 

Pat

Link to comment
Share on other sites

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...