Jump to content

UV Mapping with Blender Questions


B4rry Bing
 Share

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

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

Recommended Posts

Okay, so I thought I had gotten this, but apparently I still don't understand what i'm doing wrong.  I wanted to do something simple.  So I created a simple jar.  Now after creating the jar I set up my seems and created a UV Map.  Everything looks great on the map.  So I went ahead and brought it in world.  But now when I go to change the texture and select a face should I not have those different sections availble to be textured if I did it right?  Or what am I doing wrong.  If someone has time to go over this with me please send me an IM in world B4rry Bing.  I have voice and would love to learn what I have to do to create multiple faces on a mesh object so I can simply texture it as I wish in world.  Much appreciated to anyone willing to take the time.

Link to comment
Share on other sites

You need to assign a different MATERIAL (Blender material not the normal and specular "material" that we have in SL. So let's say your jar will be glass -- you map that part of your model and then make sure that you make a new material (call it glass for example) and ASSIGN the parts of your mesh that you want to be glass to the material called GLASS.

Then make another material (say called "lid") and repeat the process. You can color code the area of your model to correspond to the different materials if that makes it easier for you.

There are actually many work flow methods of doing this so you will need to find your own best way, but what you want to look up in the tutorials is something with assigning materials.

 

BTW you can only have EIGHT materials per mesh in SL. If you need more, then you will need to make two meshes and link them in world.  Good luck. Eventually it will seem VERY simple.

PS. You CAN assign more than one material to an area of a mesh. There is likely a good reason you might want to do this, but when I was learning it was just an ERROR. So watch for that and always upload on the beta grid if you don't want to spend money on testing.

 

 

Link to comment
Share on other sites

You may assign different materials to as many as 8 collections of faces on your model in Blender and use them as separate "faces" that you apply textures or colors to after you upload the model to SL.  The assignment of those materials has nothing to do with your UV map, although it's difficult to place a texture logically on your model if you haven't thought carefully about UV mapping. 

It sounds like you haven't assigned materials to your model in Blender.  To do that, you'll need to open the Materials panel, select a collection of faces on your model, give a name to the material you are assigning to that selection, and than click Assign.  Then click the + button to create a new material slot and repeat the exercise until you have assigned materials to all faces on your model.  Then upload to SL.  The materials you have assigned will be interpreted in SL as faces 0-7 on your uploaded model, and you will be able to apply colors and textures to them.

 

Link to comment
Share on other sites

Thanks for the advice, you are both correct in assuming that I had not assigned materials to the object in blender.  I will have to watch a tutorial on that as that is something I had ignored thinking it was only seams and uv mapping that would allow the options in second life.  But thank you for your assistance if either of you are willing to guide me through via voice that would make things so much simpler for me.  But thanks either way for your help.

Link to comment
Share on other sites

On the materials tab click the plus sign next to the top window to add a material slot. If you also want to add a material to the slot you can click the button below that window with "+ new" on it. If you add a material and your model looks a little dark in SL, that's because when you create a standard material the color is not white but grey. You can change it back to white in edit mode if you need.

Link to comment
Share on other sites

Okay so since I couldn't get anyone to help me in world, haha. 

 

Here is an update.  I had found out how to add materials, this is pretty basic and I now know how to make multiple materials on a single object by selecting the exact pieces in the mesh object itself.  My question now is.  Is there a purpose in selecting the seams and creating a UV Map... is there a way to select the pieces of the UV Map to make those the materials that I want instead of having to go over to the object itself and finding each bit and bob making it a material.

Link to comment
Share on other sites

You need to UV unwrap if you want to add baked textures (AO, shadows) to your object or if you want to make a texture that fits exactly the way you want it. e.g. a dashboard with dials and switches on it. If you just want to put a repeating texture on your object you don't need to unwrap. e.g. a brick texture on a wall. Not unwrapping might also save some Li.

 

In the image editor (edit mode) there is a button to keep the UV map in sync with the object (what you select on either is also selected on the other). You can now select on the UV map or the object and in the materials tab select the correct material and click assign.

Link to comment
Share on other sites

One more thing... You can also unwrap one object to multiple images/textures. This way you can get more detailed textures on an object. But for every seperate image you have to assign a material slot to the faces that are in that image together. This is so that you can later add the different textures to your object in SL.

 

Glad to be of help. I'm also learning and ask a lot of questions myself :)

Link to comment
Share on other sites

I would recommend that you always unwrap to make a UV map. If you upload a model with no UV map, the uploader uses uninitialised data instead, and the effects are undefined. You may get different maps each time you uploade the same file. You may get the whole surface mapped to one pixel of the texture. It all depends what the uninitialised data happens to contain. If it's not all one pixel, it will usually be highly fragmented, which increases LI (via download weight). It will never be any use for applying textures unless you use a completely monochrome texture (or blank texture + color).

If you want to do good texturing, you will have to understand and master UV unwrapping. UV mapping is usually more work than making the geometry, at least for the sort of things I make. Then making good textures can even more work. You can avoid that if you use general purpose tileable textures, but you have to do the UV mapping in a special way for those to work well.

Link to comment
Share on other sites

With default texture mapping in SL...

I should perhaps be more explicit. It depends on what the collada exporter puts in the collada file. So that depends on the 3D program and it's exporter. In the case of Blender, which OP referred to, if you don't unwrap at all, you get no UV map data in the collada file. That's when the exporter appears to use uninitialised data. Long time since I did all this, so I checked - the exporter still gives no UV data. I uploaded a cube like that with no UV data three times and got the single-pixel effect (all black with my grid test texture). That used to be the most common outcome (most uninitialised memory is all zeroes), but also it may be that they fixed the uploader to always give this outcome. I would have to do lots more uploads to see. Anyway, certianly not one texture per mesh face. Here is a picture of some examples I did of multiple uploades of the the same mesh, ages ago. Top two with no unwrap (no UV data), bottom unwrapped. You can see the random data effect.

badcones.jpg

But...

Now that's all with Default mapping, because I never use planar mapping. So I just tried a mesh with no UV map, planar mapping applied in SL. That's the two on the left. Parts of it look a bit like one texture per face mesh face, but other parts don't look at all like that. It may depend on triangulation too, as these two were triangulated in Blender (left) and by the uploader (middle). Tthe same mesh with default mapping in SL is at the right - so I guess they didn't fix the uninitialised data thing after all.

xxx.jpg

You are right that the planar mapping is much better, but I don't think it's regular enough for serious use, except maybe for some simple anisotropic textures, like sand.

Link to comment
Share on other sites

Thanks for explaining this! I tested and you're right about the mappings. It's when you reset the UVmapping in blender that all faces become a maximized square. And I do agree with you that it's always a good practise to unwrap. Even if it's just to improve on the skill.

Link to comment
Share on other sites

Christhiana -

I don't mean to hijack this forum post - but your answer to B4rry hopefully will help me as well. I haven't even uploaded my first mesh to SL - I'm still in that "nervous learner" stage where all the notes I took and practices I did aren't helping me as much as I thought they would...

Anyways...if I make a mesh object and plan on using the UV Map to texturize - I still only need to assign one material to the object? This confuses me...because when I think of the UV map - I think of it as a means to texture the way I wish. For example, I've made a very simple board with a beveled edges and plan to put a painted texture on the front-facing surface...and leave the rest with another texture (wood). Should I be assigning more than one material?

This confuses me so much...I can feel my blood pressure rising lol. In my simple brain, I thought that using the UV map as a canvas to paint on...then putting that on the mesh in world...would make it look how I planned it to look.

::sends smoke signals::

Link to comment
Share on other sites

Instead of thinking of the UV map as a canvas to paint on, think of it as a tissue dress pattern.  If you were making a dress in RL, you would use those pieces as a guide to cutting out fabric, not as the fabric itself.  You would arrange the pattern pieces on your fabric in such a way that the design lines up across seams and doesn't have unsightly gaps. 

Now, suppose that you wanted your RL dress to have more than one fabric ... one for the bodice, another for the skirt, another for trim.  The smart way to work would be to design the dress pattern so that you use some pieces for cutting out one kind of fabric and other pieces for other fabrics.  If you really wanted to, though, you could do it the other way around. You could create a single fabric with several different designs and then figure out how to make pattern pieces that will fit together to make the dress. Each piece might have more than one design on it, but they'd still all match up properly if you were clever enough.

 The point is that the UV map/dress pattern serves two purposes: (1) as a collection of 2D objects that can be "stitched" together to create a 3D object and (2) as a guide for arranging textures on the object. If you plan ahead, you can make life lots simpler if you think of both purposes while you are creating and unwrapping your model.  Modeling and texturing are truly independent of each other, but if you treat them that way, you'll end up doing a LOT more work --- just as you would if you were making a dress in RL.

In modeling programs like Blender, we have a texturing tool to work with.  You can apply a different material to each face on your model, independent of where that face is represented on UV maps. Your materials are textures -- or at least placeholders for textures -- that you will apply to the model when you upload it to SL. In practice, you apply a material to a collection of faces on your model in Blender.  Each of those collections becomes a "face" on the final mesh object that you rez in SL.

Again, using the arguments I laid out above, you could let some islands on a UV map represent model regions with more than one material but it's usually less confusing if you keep a single material on each island.  Just keep in mind that even though Blender lets you define an unlimited number of materials, SL will only recognize up to 8 of them. 

Link to comment
Share on other sites

Thank you for replying, Rolig - but honestly I think my head just imploded.

I need to think this through with an example - please bear with me...

Let's say I create a mesh hard cover book that will lay on a surface, front cover up. Here is what I *think* I should do (as a super beginner):

1- create a seam for just the outside cover.

2- create a seam for the cover's edges and the inside bit that won't really be seen (guessing it would be ok for this to be one 'island' because these parts won't be as seen as other parts).

3- create a seam for the page edges...in total creating 3 'islands' on the UV map that I generate via unwrapping.

4- assign a material to the cover, the cover edges, and the pages.

5- When I am creating a texture for the book - I can use the UV map to paint the texture on the appropriate parts.

6- When I bring the book into SL as a mesh, I can then use the UV map I painted on...and apply it to the mesh.

 

Am I understanding or should I just give up? I feel like I need one-on-one help :/

Link to comment
Share on other sites

OK, so here's the model as you described it....

Book model.jpg

It works.  Three islands in the UV map.  One for the cover, one for the edges of the pages, and one for the edge of the cover and the adjoining inside cover.  I put seams where you suggested, so that the three islands unfold neatly, then unwrapped and did some fiddly realigning of verticals and horizontals and some resizing to fill the map efficiently. 

From here I have a couple of choices. I could apply a different material to each of these islands and then upload the model to SL.  I would then have three faces on my rezzed model and could drag/drop different textures from my inventory onto each of them.  I'd do some scaling and offsetting to get the textures to look right and then I'd be done.  The other possibility is to apply a single texture to the entire model, so that the uploaded and rezzed object has one face.  Then I'd export the UV map from Blender and use it in Photoshop as a canvas (to use your term) to paint the cover, page edges, and cover edges in a new texture.  I'd upload that texture to SL and apply it.

Both texturing methods would work, and each would have advantages. You could do either one and be happy.  Notice that whichever method I choose, it helps that I have followed your instructions and unwrapped the model in a way that gives me three well-defined areas that I won't have any trouble texturing. Careful modelling and tweaking of the UV map makes the textures align cleanly.

  • Like 1
Link to comment
Share on other sites

One thing that helps some people is understand that the UV map and thevtexture are completely differentb things.The UV map is a list of numbers that tell the renderer which parts of thev texture go on which parts of thev mesh. It is easy to lokk at it, understand it, and edit bit, when it is presented as an image with the vertices and edges on it. That is the represerntation we see in editing programs. It makes it easy to see what parts of the texture go where, and it works as a guide to painting a texture. But, the image is not the UV map itself. Just a representation of it. I hope that helps. If not, just erase it from your momory.

Link to comment
Share on other sites

This article might be of interest too:

http://en.wikipedia.org/wiki/Map_projection

It's about RL maps but it's the same thing really, we make an UV map or map projection by flattening the surface of an irregular object, then we add textures, materials, cities, mountains and such onto that flat surface (we'll have to wait for SL2 and displacement maps before we're allowed to add mountains to a mesh surface though :matte-motes-wink: )

One detail it seems everybody here take for granted but may be worth mentioning just to make sure: When we talk about "unwrapping" in Blender, the word may have two slightly different meanings. Click on U in Blender to bring up the UV Mapping and you get a couple of different choices. The first one is called "Unwrap" but all the options are really different unwrapping methods. Choosing the most suitable for each object can save a lot of time maunally editing the map afterwards.


Drongle McMahon wrote:

...

because I never use planar mapping.

...

 This is a digression but perhaps a little bit of explanation would be in place.

Simply put, what happens when we use planar mapping is that the viewer generates an UV map on the fly. That of course adds a little bit of work to our computers. Not much - it's not even included in the render weight caluclation - and it seems to be cpu rather than gpu work. But even so, it's good builder practice never to add any unnecesary load to the poor overworked computers.

A more significant problem is that the planar UV map is based on the object's normals. Once we start playing around with those, planar maps can get seriously whacky.

And of course, automatically generated UV maps means we have less control over the result.

I don't think we should be afraid to use planar mapping when we need it but perhaps it's a good idea to leave it as the last option when nothing else works.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3379 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...