Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Maya Template baking

mcgeeb Gupte
Jolie Femme @}-,-'-,---
Join date: 17 Sep 2005
Posts: 1,152
10-22-2007 01:31
I'm using Maya 4.5 and currently just don't get it. I know how to bake textures but everytime I use the SL model I get all three textures baked on top of each other. How do I get them separately to bake separately? I tried to separate the model into three parts (Head, upper and lower) but just can't do it. I'm stuck.
mcgeeb Gupte
Jolie Femme @}-,-'-,---
Join date: 17 Sep 2005
Posts: 1,152
10-22-2007 03:07
Ok finally figured out how to separate them. I made the UV Texture editor Image Range bigger basically enough for a 1536X512 TGA file that I can split up in Photoshop. Now if I can just make the Avatar in Maya seamless when I smooth polygons out.

Ok I smoothed it out but how to get ride of the weird seams around the shoulders and joints? Somehow I need to merge vertex's and it won't let me or something.

Edit: I figured out how to merge the vertex's where the seams end up but do I really need to do them one at a time?
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
10-22-2007 04:57
I'm not a Maya user, but it wouldn't surprise me if you have to do them one at a time. The good news is you'll only have to do it once. Save your modified avatar model so you can reuse it next time.
_____________________

My other hobby:
www.live365.com/stations/chip_midnight
Domino Marama
Domino Designs
Join date: 22 Sep 2006
Posts: 1,126
10-22-2007 06:05
In Blender you can assign each set of UVs to a different image, so when you bake you get the three images done. I'm assuming Maya offers similar functionality, might be worth diving into the manual and checking.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
10-22-2007 07:13
From: mcgeeb Gupte
Ok finally figured out how to separate them. I made the UV Texture editor Image Range bigger basically enough for a 1536X512 TGA file that I can split up in Photoshop.

That's one way to do it. Another would be to keep the three body sections as separate meshes, so what you do to one does not affect the others. For simplicity, this is what I usually recommend.

A third option would be to combine them all into one, as you did, but use three separate materials for the three body sections. So all the polys that make up the head would get one material, all in the upper body would get a second, and those in lower body get a third. This is fairly easy to do in modern versions of Maya. I'd be surprised if it was significantly more difficult back in 4.5.

Each method has certain advantages and disadvantages. Experiment with all three to learn what works best for each type of project.


From: mcgeeb Gupte
I figured out how to merge the vertex's where the seams end up but do I really need to do them one at a time?

In modern versions of Maya, you do not have to do the merging one at a time. You can do any number of them you want, all at once. Your version is so old though, I have no idea what its capabilites are. My Maya usage started with version 5 (using 8.5 now). I've never used 4.5.

If 4.5 works like all the more recent versions, you can merge all vertexes within a specified proximity from each other, all at once. You simply select all the vertices you want to affect (or just select the whole model), and then use the Merge command. All selected vertexes will then be checked for distance from each of their neighbors, and any groupings of two or more that fall within your designated proximity will be merged into one.

If I remember correctly, in versions 5-7.x, it went like this. First make sure you're in Maya's Modeling section (not Rendering, Animation, or Dynamics), and then do the following:

1. Select two or more adjacent polygonal objects, and choose Polygons -> Combine. The two meshes will now be one.

2. Select all the vertices you want to affect (or select the whole model if you want to affect all), and go Edit Polygons -> Merge Vertices -> Options Box. (In case you don't know this already, the Obtions Box is the little rectangle icon to the right of the words Merge Vertieces. Options boxes are one of the really nice features of Maya's interface. Most menu commands have them).

3. In the options box dialog, set the distance you want for the merging. A low distance will make only vertices that are very close to each other merge. A high distance could merge the whole model. For this, you want to go with a really small distance, like .0001.

4. When you're ready, click Apply. All the vertices that were previously right on top of each other (which is what created the seams) will now become one each, and the seams will disappear.



In Maya 8 and 8.5 it goes like this. First, make sure you're in Maya's Polygons section (Note: there is no longer a Modeling section. It has now been split into separate dedicated sections for Polygons and Surfaces). Then do the following:

1. Select two or more adjacent polygonal objects, and choose Mesh -> Combine. The two meshes will now be one.

2. Select all the vertices you want to affect (or select the whole model if you want to affect all), and go Edit Mesh -> Merge -> Options Box. Set the distance very low, like .0001.

3. When you're ready, cick Apply.


That's how it works for everything after 4.5. Hopefully, if 4.5 had the same capbility (which again, I'd be very surprised if it didn't), you can use that information to figure out where the right commands are in the 4.5 interface. It's got to be something similar.


On a side note, where did you even find Maya 4.5 these days? It's almost 6 years old.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
mcgeeb Gupte
Jolie Femme @}-,-'-,---
Join date: 17 Sep 2005
Posts: 1,152
10-22-2007 15:08
I was able to bake the entire thing at once finally and able to merge the vertices all at once. I needed to set it at .0001. But now I have one big template.

When I tried to bake the avatar before making one big mesh layout it gets all three templates onto one 512X512 texture. Why does it do that. How can I do them one at a time without needing to make a huge file?

I'm starting to really get sick of Maya and yes its been 6 or so years and I still don't get it. What else works better and is more user friendly than Maya?
Leben Schnabel
Registered User
Join date: 4 Jan 2007
Posts: 62
10-23-2007 08:10
Chosen,

thanks a bunch for taking the time of writing this superb step-by-step explanation!

I'm trying to do something similar as as mcgeeb and succeeded in my first attempts to bake parts of the avatar .obj files. However, only the female avatar in "SL_avatar_OBJ.obj" imports fine into Maya, while the other two "SL_Female.obj" and "SL_Male.obj" appear to be messed up in terms of the mesh grouping as well as apparently the surface normals.

Searching the forum it seems that this is known problem, but I didn't find a solution. My question is: Did anybody here go through the process of preparing the female as well as the male avatar mesh so that it's correctly set up for texture baking in Maya? Ideally in a way that the resulting baked textures can be directly imported into SL?

I, and surely many others, would much appreciate any hints on this, or, dare I say it, maybe somebody would be willing to share the Maya scenes with the correct set-up?
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
10-23-2007 08:26
From: mcgeeb Gupte
When I tried to bake the avatar before making one big mesh layout it gets all three templates onto one 512X512 texture. Why does it do that. How can I do them one at a time without needing to make a huge file?


The three parts of the model are using the same UV space in three different ways so if you bake them all at the same time you get the head, upper body, and lower body all overlapped. You either need to break the model into three parts along the template seams, move the UVs into three different UV channels, or alter the UVs so that they don't overlap but can still be easily split apart into three sections. I edited the UVs on my avatar model so that the three templates are stacked in a column. I bake out to a 1024x3072 texture and then split it into the three 1024x1024 parts.

If you're not liking Maya you might want to give Max a try, but it's not any less complex so you might find it just as confusing. It really depends on what all you need your 3d app to do. If you're just interested in texturing and baking you might try Zbrush. I have a hard time wrapping my brain around its user interface but lots of people love it. Maya is a fantastic program though so you might want to consider investing in some good Maya books or taking a one or two week intensive Maya workshop at a local training or adult ed center. Not much of it will apply to SL work, but you're already somewhat familiar with it, and Maya is a great skill set to have.
_____________________

My other hobby:
www.live365.com/stations/chip_midnight
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
10-23-2007 10:11
From: Leben Schnabel
However, only the female avatar in "SL_avatar_OBJ.obj" imports fine into Maya, while the other two "SL_Female.obj" and "SL_Male.obj" appear to be messed up in terms of the mesh grouping as well as apparently the surface normals.

Yeah, those two OBJ's aren't properly set up for this sort of use in Maya. If you want an easy fix, bring the two Poser figures into either Poser or DAZ|Studio, and then export your own OBJ's from there. That will be a lot faster than trying to fix the existing OBJ's yourself.

D|S is free from www.daz3d.com.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
mcgeeb Gupte
Jolie Femme @}-,-'-,---
Join date: 17 Sep 2005
Posts: 1,152
10-23-2007 14:18
From: Chosen Few
Yeah, those two OBJ's aren't properly set up for this sort of use in Maya. If you want an easy fix, bring the two Poser figures into either Poser or DAZ|Studio, and then export your own OBJ's from there. That will be a lot faster than trying to fix the existing OBJ's yourself.

D|S is free from www.daz3d.com.


No wonder what I was trying to do wasn't working. I'll try this link. Thanks for all the posts too.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
10-23-2007 16:57
From: mcgeeb Gupte
No wonder what I was trying to do wasn't working. I'll try this link. Thanks for all the posts too.

You're welcome. :)

Unless I missed something, what you were asking about is quite different from what Leben was asking about. Note, the SL_avatar_OBJ.obj file works just fine. This will be the one in the main folder when you unzip the Avatar_Mannequin.zip file.

The ones that don't work properly in Maya are the ones that end up inside the SL Avatar subfolder, the ones called SL_Female.obj and SL_male.obj. As far as I can tell, these are parts of the poser figures, and are properly configured only for use with Poser or DAZ|Studio. I'm not an expert on how Poser figures are constructed though, so that's really just an assumption. I just know that when I open the CR2 files in D|S, it asks me where to find those two OBJ's.

In any case, be aware that after you export your new OBJ's from either Poser of D|S, you will need to combine the meshes and merge duplicate vetices in Maya, just as we were talking about before.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
mcgeeb Gupte
Jolie Femme @}-,-'-,---
Join date: 17 Sep 2005
Posts: 1,152
10-23-2007 18:22
Ok everything working good now. I took the avatar into Daz and then saved it. Then took it back into Maya, needed to use Combine first and then Merge Vertices. Now I have three separate parts of the female avatar that I can bake. Thanks again.
Leben Schnabel
Registered User
Join date: 4 Jan 2007
Posts: 62
10-24-2007 05:39
Chosen, you're right: My problem boils down to getting a baking set-up for the male avatar SL_male.obj.

I'll spend my next evenings trying to bring the male avatar into a form that produces the correct three baking sets. My first attempts with using Daz as a converter were not exactly promising. The outcome was a single mesh with the UV coordinates of the body parts on top of each other every time.

If I succeed, I'll post the solution here.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
10-24-2007 07:01
From: Leben Schnabel
My first attempts with using Daz as a converter were not exactly promising. The outcome was a single mesh with the UV coordinates of the body parts on top of each other every time.

3 ways to fix this:

1. Do as Chip does. Simply move the UV groups around on the canvas to form a single 1:3 ratio texture with all 3 sets on it, evenly spaced from each other. You can then easily chop up the canvas later in Photoshop for upload of 3 individual textures.

-OR-

2. Cut up the model in Maya into 3 separate meshes for the 3 body sections.

-OR-

3. Export from D|S with the welding option turned off. This will prevent the model from exporting as a single mesh. You may still have to do a little cutting this way though. For me, the two parts of the neck always export as a single mesh, no matter what I do.

Whichever method you choose, you're almost there now. You should be able to get the results you're looking for fairly quickly from here.





Oh, by the way, quick public service announcement. Please everyone, stop referring to DAZ|Studio as "Daz". DAZ is the name of a company, and DAZ|Studio is just one of their many products. Saying "I imported a model into Daz" is like saying "I viewed a photo in Adobe" or "I read a document in Microsoft". Adobe what? Microsoft what? DAZ what? You could view a photo in about 70 Adobe products besides just Photoshop, you could read a document in any of about a thousand Microsoft products, and you could import a model into about half a dozen different DAZ products. Let's all not confuse company names with program names.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Mr Bacon
Registered User
Join date: 26 Jul 2005
Posts: 44
you can try this
10-26-2007 09:28
bake straight from maya


go to your outliner
right click and make sure select sets is checked

now
fine your uv sets
click the plus sign to open the set of uv vertices
click the first one then shift and scroll to the bottom (of the set, not the outliner, remember, one set at a time)
and shift click the last one (should be about eight hundred verts, i think)

you should now have a whole set of uvs selected

now you can bake them
one at a time

no import or exporting except the baked texture file

repeat as necessary for the other sets

shouldnt take more than a minute to do one set
Leben Schnabel
Registered User
Join date: 4 Jan 2007
Posts: 62
10-29-2007 11:30
I went with the first approach Chosen suggested. It worked well, although it is a bit of an effort to sort the UV coordinates out. A hint for the Maya noobs like me: For this work, "Select -> Select Shell" is your friend in the UV editor.

Thanks to all of you, especially Chosen, for the insights!
mcgeeb Gupte
Jolie Femme @}-,-'-,---
Join date: 17 Sep 2005
Posts: 1,152
11-01-2007 04:51
Ok, one more question...I think.

When I bake a texture that is on the SL avatar in Maya, I get seams. Is there a way to bake textures in Maya so it doesn't do this. Am I doing this wrong?
Chip Midnight
ate my baby!
Join date: 1 May 2003
Posts: 10,231
11-01-2007 07:28
In order to avoid texture seams you need to do new UV mapping in a second UV channel. For example, if you were trying to wrap a complex pattern around the torso you could use a cyllindrical UV mapping to do it and then bake it back out to SL's UV mapping. Your other option is to use procedural textures that don't require UV mapping.
_____________________

My other hobby:
www.live365.com/stations/chip_midnight