Jump to content

Mesh UV Mapping?


Sae Luan
 Share

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

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

Recommended Posts

I have a VERY basic understanding of creating the UV maps for meshes.  I work in Maya, but I never had to do UV maps since before I only did sculpties.  My question is..

I see some people have really simple UV maps much like the UV maps for the SL avatar for making clothing.  Like a front and a back side by side.  When I try to create UV maps, no matter what I do, it comes out either overlapped or in TONS of peices.  I use automatic mapping because it seems to do the best job of making nothing overlap, but how do I create a more simple UV map?  If I give this to someone to use it to texture the mesh, it's really hard for them to mess with because it is in so many peices.

Is there some secret to UV mapping I don't know?  Is there a better program to create the UVs?  I do also own Zbrush.  I'm attaching a picture to show what I mean with my UV map as well as what the object looks like inside Maya.  Any help would be appreciated.  :)

 

UVs.jpg

Link to comment
Share on other sites

UV Mapping is a pain in the arse! True story.

The basic principle is to try and make it flat, think about how you'd cut it in RL if you were trying to make that object flat. Sometimes, depending upon the shape, it can end up being very tricky.

However, the other thing to look at is adding materials, if all you want to do is allow people to add a texture, then you might just cut it down the middle and assign textures for front and back.

Go to the beta grid, test your uploads there and see how inworld texturing works on your upload.

  • Like 1
Link to comment
Share on other sites

Sae, I don't use Maya, but all programs work in a similar way.  Usually you have to select the seams you want the program to cut.  In blender you select and mark them (ctl e).  In Modo you just select them,  In Zbrush you paint the areas you want to attract seam to.  Without this guidence your automatic mapping will not give you useful results, so check into the features of the program and select those seams!

And after you have them automagically made, you may need to work on them some more in terms of scaling and rotation, etc.  These auto-features just get you faster to a place where you most likely still need to do a bit of handiwork.

 

  • Like 1
Link to comment
Share on other sites

Thanks...I'll try to look into it some more.  I have a digital tutor's account I kind of forgot about that auto renews, so I'm going to go on there and see if they have any info on getting better results.  Of course, if anyone knows any info that is for doing it in Maya, please reply here.  :)  

I don't mind popping into Zbrush to do it, but I really hate having to use multiple programs to do things.  I prefer to find a way in Maya to get the results I want, if possible.  ;)

Link to comment
Share on other sites

Can't hep too much because I am a Blender. But looking at your map, it looks very inefficient because the majority of it is unused area, which will waste most of the precious and limited texture area resource. In Blender the most direct way of influencing the mapping is the definition of seams which determines where cuts are made to turn the surface into flat pieces. This is not always the best way. There are also projection methods that can be useful. Whichever you use, the best results usually require adjustment by pushing vertices and faces around on the map.

There are also two different targets of UV mapping which lead to different solutions, or to compromises for dual purpose maps. The first is for a map that will be used to make a "baked" texture in the 3D software. This makes mimimal constraints for the mapping and all the work can be expended on mimimising wasted texture area and keeping the UV map elements as accurate as possible in representing the genuine surface area and shape. The second is a map that can be used with general purpose textures, including small tileable textures. In this case, the map has to be arranged so that the flat texture is minimally distorted, and elements have to be in the right direction, for example to receive woodgrain textures.

Thirdly, you mentioned the intent to avoid overlaps. Generally that is right, but often you can increase surface detail for a given texture size by exactly overlaying similar parts of the UV map. For example, in your frame, the four edges could all be overlayed in the map. This would work for the tiled texture approach, but not for a bked texture with different lighting on each similar part. (For baked textures with just ambient occlusion, overlaying can still work for symmetrical things).

You might be interested in message 10 in this old thread where I compared two different UV maps for the same window. It gets a bit complicated because it is concerned with the different LODs too.

Link to comment
Share on other sites

Ok thanks for everyone's help.  I just figured it out from watching along on a digital tutor's video.  You simply have to select the faces in groups and then project for each group.  I know that may not be the proper way to say how I am doing it, but I'm no expert in Maya lol.  I'm happy!

Link to comment
Share on other sites

It your mesh just a frame? Or is this square you have in the map a place to put a picture or painting?

In the case you want a picture in the frame, you might want to give it more space on the canvas. Cause in the current design, when you upload it with the largest texture size, the spot of the picture will be smaller then 256 x 256 pixels. While it is often the art work that attracks people more to look at an object then the frame. The texture quality must be at best there where the attention goes, I think.

 

Link to comment
Share on other sites

Actually that didn't work out quite like I thought it would.  I used in Maya the tool called make hole tool.  I used it to put a hole in the center of the frame so you could use regular prim to put a picture.  But when I uploaded the mesh, the part where I put the hole is completely transparent instead of having a border as it does in Maya.  I know this doesn't make sense so I will post a picture of what I mean.... But anyway, that square is the part that wraps the inside of the frame..which is transparent in world.

Problems.jpg

Link to comment
Share on other sites

That looks like a flipped normal problem to me.  The faces are there, you just can't see them in SL because they are inside out.  By "make hole" I'm guessing that is some kind of boolean "cut out"  function. That can cause some aberrent normal flipping, I'm guessing.  Go back into Maya and find the "flip normals to outside" function..whatever it's called for that program.  I make a practice of always checking the normals before I export since its a common problem.

There are more approaches to UVs then there are to "skin a cat".  In fact it IS skinning.  There's projection (as you have discovered as well as various tiling methods, and different approaches to getting an organic form unwrapped (like a human or animal body or globe) where you attempt to get as minimal stretching distortion as possible..the trade off being too many seams which can problematic.

Sometimes the best approach is to use different methods for different parts of the same mesh. If you select your cutting seams and combine that with automatic UV's, it often gets you pretty close or close enough.

As you get more experienced you'll get the hang of scaling, rotating, overlapping, pinning, mirroringm etc, your uv parts to get the most out of the UV space.  It's alot to absorb all at once, so go with seam selection and projection or automatic at first for simplicity sake and then branch off from there.

Personally I love the challenge.  It's as interesting a puzzle as any other.

  • Like 1
Link to comment
Share on other sites

Figured I'd add to that-

the tool literally punches a hole out of the mesh.  I figured that was the best route to getting the frame a hole in the center.  If any Maya users have a better technique for this, PLEASE let me know hehe!  :)

Link to comment
Share on other sites

Here is another way. In Blender, but you can surely do the same in Maya.

1. Make a cross section of the frame.
2. From the top (z), scale by 1.4142 (sqrt(2)) along x,y then rotate it -45 degrees.
3. Extrude
4. Rotate extruded vertices 90 degrees...make sure all normal point outward.
A. Make the UV map at this point.
5. Duplicate whole thing and rotate 90 degrees.
6. Move half extrusion length x and y.
7. Repeat 5-6 twice, then remove doubled vertices to join the pieces*.
B. Separate the duplicated UV maps.
8. Select and move one edge to make un-square.
C. Scale the shortened edge UV maps.
D. Superimpose the UV maps
E. Apply a simple texture (256x256)
9. The rendered result.

Left out. How to make the UV map. How to make some edges sharp and others smooth.

makeaframe.jpg

44 vertices, 88 triangles

*actually, you can do it all in one with spin duplicate, but I don't know how in Maya.

  • Like 3
Link to comment
Share on other sites

Here's another method.  You'll kick yourself when you see how simple this one is.  Just use a torus. :)

Set it to have 4 subdivisions around the axis.  Now you've got a rectangular torus, which is what a picture frame really is. For the height subdivisions, pick any number larger than 4.  The first three divisions, when snapped into alingment and scaled, will become the bottom, outer sides, and inner sides of the frame.  The rest will become the top.

I went with a total of 5 for mine.  That's way less than yours, but you don't need all those divisions on the top.  Just put two divisions up there, and soften the normals on the edge loop in between them.  The soft normals will make the top look like it's nicely rounded over.  In this way, you cut the poly count, and the resulting in-world PE cost, by about 30%, while maintaining the same basic appearance. 

 

picFrameTutorial.jpg

 

There you go.  At only 40 polys, it's less than half the weight of your original, it's sensibly UV'ed, and it took less than 60 seconds to make.

  • Like 2
Link to comment
Share on other sites

Oh wow!  Consider me kicked!

That is excellent, Chosen Few. Thanks so much.   And these two methods are such excellent teaching tools.  (and picking one is like being asked to choose between a chocolate cupcake with delicious vanilla filling or a vanilla cupcake with delicious chocolate filling!  Both great!  I want both!!)

This is why I love 3d creation so much, there are so many interesting and valid approaches to every task and the challenge of it organizes my otherwise chaotic brain.

Link to comment
Share on other sites

OK.  I figured this one out in the shower.  No genius on my part..I’m sure it’s a well known approach.

 

1)      Start with a square plane

2)      In edit mode select the plane and extrude it in place by hitting “E” and clicking the LMB twice.  Scale the extrusion inwards to create a frame'

      extrusion.jpg

3)      Go to face select mode and select the 4 outer frame faces.

4)      Go into  side view extrude the selected four faces out.

5)      Get rid of the back geometry by going into vertice select mode and box selecting the back verts and deleting them.  You are left with just the frame faces.

6)      Select the frame faces, move them back to the origin  and once again extrude them your desired depth.

7)      Select all of the mesh geometry and hit CTL N to re-calculate the  normals to the outside of your mesh.

8)      Set up your uv screen

9)      In face select mode in the 3d edit screen click a single face on the mesh and then double click to select the entire mesh.  Press “U” and select  Follow active Quads>none. The UV’s should appear in a nice grid. *

10)  In the UV section select the menu item UV>Scripts>Scale to bounds to fill the entire uv space with you uvs.

UVs.jpg

11)  Go back to your mesh and select a front edge and select CTL R (and the number of loop/edges you want to add to the face of the frame for added resolution that you can manipulate into a nice profile. Note this added geometry is automatically placed in your uv map.

 Frame Final.jpg

Additional notes:  *If your uvs for some reason don’t line up as a perfect square or rectangle, in the UV space select the faces you need to move and  press the little square shaped icon at the bottom (sync uv and mesh selection icon)  so you can cut the faces off from the main mesh and move them into a better place. Then select all the faces in the uv space and select the script mentioned above to scale everything to the bounding edges of the uv space.

  • Like 1
Link to comment
Share on other sites

Chosen, thank you.  I briefly considered a torus before I decided to create it out of a cube and just add edge loops where I needed and to cut the center out.  Your approach is even more simple.  I appreciate your input!  I've learned so much from you over the years, I feel like I should be paying you lol.  :)

Link to comment
Share on other sites

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