Jump to content

uv unwrap and material baking questions


itriix

Recommended Posts

Hi there,

I've been trying to accomplish some material baking with quite a few failed attempts. I'm not sure why, but uv's always seem a bit scary to me :P... and it definitely seems like my problem exists due to SOMETHING UV oriented. So, i'm looking for some UV experts or enthusiasts that might be able to recognize my problem and possibly steer me in the right direction....

I'm posting a side by side comparison of a "correct render" of a coke can and my material baked texture map, applied back to the coke can via a constant material. As you can tell the lighting is totally different in the material baked texture map.

The project itself is a WIPs which you can find about here here. As for my problem, here it goes:

Since the "pic" function seems terribly slow, i've adopted using a custom, "colormapVOPSOP" and "colormapVOPPOP" (essentially all it does is pump in the uv into the s and t of a texture map, and outputs the Cd).. for getting Cd information from a texture. In this particular example, i'm disintegrating a coke can. I'm using a colormapVOPPOP to give the particles their color. The texture map it uses, is the "texture" map that the coke can uses. To keep things simple at first, assume the coke can uses one texture map, so i use the colormapVOPPOP, get the color for the particles and COOL it works. However, the problem lies in this: The MATERIAL of the coke can, is not just a texture map... It uses a phong material, *like aluminum* that points to a texture map for the color. This means that the can respects LIGHTING... And this is where the problem begins. The lighting of the coke can, is not picked up for my particles color. That pointed me towards MATERIAL BAKING... This way, I could point to the "BAKED MATERIAL MAP" for the particle color! That way the lighting would be picked up. And this is where i'm stuck. I tried following the directions here but i'm not getting correct results. The directions are pretty straightforward so i'm really not sure WHY it's not working. In fact, i'm GETTING a baked texture map that SEEMS to respect the UV's of the coke can, but the SHADOW and LIGHTING information don't seem to be correct.

So setting that issue aside, the problem gets a bit more complicated and it's even more related to the UV side of things I think. This model is in four pieces: Label, Top and Bottom Metal (one piece), Screw and Tongue. Each have proper uv's (i assume) because when I imported the model as an fbx, with materials, the texture maps were in the right place. And when I rendered I got the correct looking coke can. So i assume that means their correct. So, for the time being, i was just going to material bake each piece individually, and apply each baked texture map back to each piece individually, if i could get the baking to work. That's the number one priority. However, the extra part i'm curious about is this: If instead, I didn't want 4 pieces to have to deal with, *because they make it harder in the particle sim section, which i discuss in my WIPs* the jist being that "for particle coloring" i need to sim particles for each piece individually, which just makes me use a lot more nodes overall. So, i tried going into maya, (and i don't even know if what i'm doing here is correct or not, but" i went into maya, selected the four pieces of geometry, and did a POLY COMBINE... This turned the can into ONE piece of geometry. I exported it as an fbx, brought it back into houdini, the materials were brought in, And everything seemed to STILL look correct. If I rendered, the "texture" maps were applied to the right spots. So, it seemed like it was working. However, when I imported the model, it through up some warning about uv set for file1, 3 and 4 were missing? *i'm assuming it had to do with combining this into one model* but as my uv knowledge is a bit limited, and it seemed to render fine, it seemed not to be the end of the world. Anyways, all in all the point being, WHAT and HOW would be the correct way, to get this into ONE MODEL, with proper uv's so that I can bake the texture map into ONE map, so that i can use ONE model, that points to ONE texture map file, to emit particles from?

That's about all for now,

Thanks so much for any of your suggestions. I will try my best to follow any guidance!

Cheers,

Jonathan

post-3821-125725989882_thumb.png

Link to comment
Share on other sites

And here are some images of:

1. individual uv's for each piece of the can, (label, top and bottom metal, screw and tongue.

2. uv's of merged can

3. what the baked texture maps look like when I do it PER PIECE of geometry for the can. *there are four*

4. what the baked texture map look like when I do it to the "merged geometry can" example.

and lastly...

5. my render settings on my Mantra ROP for a single piece *but i did this the same with the merged can too*

i'm hoping this information can help a little bit :)

Jonathan

post-3821-1257265387_thumb.png

post-3821-125726548519_thumb.png

post-3821-125726550501_thumb.png

post-3821-125726556852_thumb.png

post-3821-12572655786_thumb.png

Link to comment
Share on other sites

Hi Jonathan,

I recently did some experimentation with baking and occlusion and it worked as expected.I do admit not to trying to bake in lighting but I don't see why it would not be working correctly as you are basicaly rendering out the image from a camera then applying as a map.I will see if I can dig out the tool I put together to handle the process

rob

Edited by rob
Link to comment
Share on other sites

Hi Jonathan,

I recently did some experimentation with baking and occlusion and it worked as expected.I do admit not to trying to bake in lighting but I don't see why it would not be working correctly as you are basicaly rendering out the image from a camera then applying as a map.I will see if I can dig out the tool I put together to handle the process

rob

Thanks rob, that would be awesome.

As for baking the lighting... from my understanding, i agree, there's no reason it shouldn't work. so that's why i'm a bit confused what's going on with this.

Jonathan

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...