Baking lighting on the av mesh - SLUniverse Forums
 
Navigation » SLUniverse Forums > Development Discussion and Support > Content Creation » Baking lighting on the av mesh


Content Creation Discuss building, scripting, and other forms of content creation for SL.

Reply
 
LinkBack Thread Tools Display Modes
Old 04-21-2009, 10:24 PM   #1 (permalink)
Senior Member
 
Aki Shichiroji's Avatar
 
Join Date: Aug 2007
Location: Toronto
Posts: 1,741
My Mood:
SLShopper Ads: 14
SL Join Date: 7/22/2006
Business: Organica
Send a message via ICQ to Aki Shichiroji Send a message via AIM to Aki Shichiroji Send a message via MSN to Aki Shichiroji Send a message via Yahoo to Aki Shichiroji Send a message via Skype™ to Aki Shichiroji
Baking lighting on the av mesh

Ok... so i've been battling with a decent lighting set up for some av related stuff lately and have been having some major issues getting light to render consistently from body part to body part at the seams (IE: between head and torso or torso and legs).

Sobriquet suggested I try the CCC meshes, which I've done, but a seam always shows up for some reason.

Is it my lighting setup? is it the fact that there are multiple unmerged verts? is it the fact that surround verts aren't always perpendicular to the seams?

I am using Blender, with Oren-Nayer and Blinn shaders (as i want the end result to be more matte than shiny) if it makes a difference.
Aki Shichiroji is online now   Reply With Quote
Old 04-21-2009, 11:50 PM   #2 (permalink)
Dislikes people.
 
Vaelissa Cortes's Avatar
Hanging out with 2003
 
Join Date: Jan 2008
Location: Beatrice
Posts: 890
My Mood:
SLShopper Ads: 23
SL Join Date: 4/24/2007
Business: Ruined
I tend to focus on objects and scenes instead of things that would require the use of an avatar mesh, so it's not something I have much experience with, but I can try to help.

First off though, I'll link this. It seems like it may be helpful to you, if you have not already had a look.

SL Forums
__________________
People are dumb .
Vaelissa Cortes is offline   Reply With Quote
1 User Said Thanks:
Old 04-22-2009, 12:04 AM   #3 (permalink)
Senior Member
 
Miriel Enfield's Avatar
Behold, the power of flopsy ears.
 
Join Date: Sep 2007
Posts: 2,469
My Mood:
SLShopper Ads: 3
I've not had this problem, but my experience with baking the av mesh has been limited. Subtle seams aren't really a huge issue when you're just baking some fuzzy shadows. However, I'm guessing that...

Quote:
Originally Posted by Aki Shichiroji View Post
is it the fact that there are multiple unmerged verts?
It's this. Blender won't smooth the shading between two faces that aren't connected (or if it does, I haven't found that feature yet), so you may get seams. Try merging the vertices and seeing what happens.
Miriel Enfield is offline   Reply With Quote
1 User Said Thanks:
Old 04-22-2009, 12:05 AM   #4 (permalink)
Senior Member
 
Aki Shichiroji's Avatar
 
Join Date: Aug 2007
Location: Toronto
Posts: 1,741
My Mood:
SLShopper Ads: 14
SL Join Date: 7/22/2006
Business: Organica
Send a message via ICQ to Aki Shichiroji Send a message via AIM to Aki Shichiroji Send a message via MSN to Aki Shichiroji Send a message via Yahoo to Aki Shichiroji Send a message via Skype™ to Aki Shichiroji
Thanks for the link, Vaelissa

I am working with some pre-existing skin textures that are seamless prior to bake... and I did eventually find that the key was making sure AO was *off* and all other shader and material settings were consistent from head to torso to legs.

Now i'm pretty much just trying to fix a whole lot of odd shadowing based on my lighting setup.

I'm using a ring of 12 lamps all equidistant from the mesh, slightly above the head. all with specular lighting off, all with diffuse lighting on. One adjustment here means odd shadows elsewhere... i'm almost considering the use of lots of smaller, low range diffuse lights closer to the mesh, but am concerned this might blow out the highlights too much :/
Aki Shichiroji is online now   Reply With Quote
Old 04-22-2009, 12:06 AM   #5 (permalink)
Senior Member
 
Aki Shichiroji's Avatar
 
Join Date: Aug 2007
Location: Toronto
Posts: 1,741
My Mood:
SLShopper Ads: 14
SL Join Date: 7/22/2006
Business: Organica
Send a message via ICQ to Aki Shichiroji Send a message via AIM to Aki Shichiroji Send a message via MSN to Aki Shichiroji Send a message via Yahoo to Aki Shichiroji Send a message via Skype™ to Aki Shichiroji
Quote:
Originally Posted by Miriel Enfield View Post
I've not had this problem, but my experience with baking the av mesh has been limited. Subtle seams aren't really a huge issue when you're just baking some fuzzy shadows. However, I'm guessing that...


It's this. Blender won't smooth the shading between two faces that aren't connected (or if it does, I haven't found that feature yet), so you may get seams. Try merging the vertices and seeing what happens.
Here's the thing though - once you join the body parts together, Blender will bake all three materials as one - IE: it will overlap one over the other.
Aki Shichiroji is online now   Reply With Quote
Old 04-22-2009, 12:30 AM   #6 (permalink)
Senior Member
 
Miriel Enfield's Avatar
Behold, the power of flopsy ears.
 
Join Date: Sep 2007
Posts: 2,469
My Mood:
SLShopper Ads: 3
12 lamps seems a little excessive. Have you looked into Blender's other lighting options? Ambient light does funny things sometimes, but there are other light sources designed to provide a lot of uniform illumination.

Quote:
Originally Posted by Aki Shichiroji View Post
Here's the thing though - once you join the body parts together, Blender will bake all three materials as one - IE: it will overlap one over the other.
Could you mess around with the UV maps? Make the image 512 x 1536, shrink each map vertically accordingly, place each map, then join the objects and merge the vertices. Might be too much work for something that can be fixed in an image editor, though.
Miriel Enfield is offline   Reply With Quote
Old 04-22-2009, 12:59 AM   #7 (permalink)
Senior Member
 
Aki Shichiroji's Avatar
 
Join Date: Aug 2007
Location: Toronto
Posts: 1,741
My Mood:
SLShopper Ads: 14
SL Join Date: 7/22/2006
Business: Organica
Send a message via ICQ to Aki Shichiroji Send a message via AIM to Aki Shichiroji Send a message via MSN to Aki Shichiroji Send a message via Yahoo to Aki Shichiroji Send a message via Skype™ to Aki Shichiroji
12 lights in a ring around, plus one diffuse overhead has gotten me closest so far. I gave this a try after reading some suggestions on the SL Forums. I should mention that the ring is pretty far out and they're all set to falloff inversely related to the distance. This has maintained the brightness, but at the cost of flattening the skin out a bit
Aki Shichiroji is online now   Reply With Quote
Old 04-22-2009, 01:04 AM   #8 (permalink)
Senior Member
 
Miriel Enfield's Avatar
Behold, the power of flopsy ears.
 
Join Date: Sep 2007
Posts: 2,469
My Mood:
SLShopper Ads: 3
Have you tried using the hemi lamp type? It's designed to provide overall brightness. I'm not sure it'll do anything about your seam issue, mind, but using a few hemi lights would save Blender the trouble of rendering 12 different lamps.

Ambient light would also work, but my experience is that it never looks very good when baking.
Miriel Enfield is offline   Reply With Quote
Old 04-22-2009, 01:06 AM   #9 (permalink)
Senior Member
 
Aki Shichiroji's Avatar
 
Join Date: Aug 2007
Location: Toronto
Posts: 1,741
My Mood:
SLShopper Ads: 14
SL Join Date: 7/22/2006
Business: Organica
Send a message via ICQ to Aki Shichiroji Send a message via AIM to Aki Shichiroji Send a message via MSN to Aki Shichiroji Send a message via Yahoo to Aki Shichiroji Send a message via Skype™ to Aki Shichiroji
i did, a few nights back... and i think i tried something else mostly because the shadows being cast were really harsh and black. i'm kinda futzing around in the world colour settings right now... seeing if i can come up with a better solution. Maybe I *can* get it to work?
Aki Shichiroji is online now   Reply With Quote
Old 04-22-2009, 03:14 AM   #10 (permalink)
Senior Member
 
whyroc's Avatar
Blue Marsified
 
Join Date: Oct 2007
Posts: 163
Send a message via Skype™ to whyroc
I know what you mean, there are a few things to try.. up the margin in the bake settings, this should put a thin line of color outside the uv edges that can help blend seams.

Are you using domino's avatar mesh blend file? Its optimized and you can adjust the shapes (for baggy jeans example).

You should try using a dome light .. Dome Light Setup | geneome

Another tip would be to get the latest daily build from the trunk at graphicall.org The Texture painting features have been vastly improved, now supports painting across the seams.

-whyroc
__________________
Come visit our new City on Blue Mars, now open for preview:

http://gridrock.com/
whyroc is offline   Reply With Quote
1 User Said Thanks:
Old 04-22-2009, 05:02 AM   #11 (permalink)
dabbles with latex
 
Raindrop Drinkwater's Avatar
Shinyyyyy!
 
Join Date: Jul 2007
Posts: 2,462
My Mood:
SLShopper Ads: 35
Quote:
Originally Posted by Aki Shichiroji View Post
Here's the thing though - once you join the body parts together, Blender will bake all three materials as one - IE: it will overlap one over the other.
Bummer, I don't know how to explain it, but you can make it so you have three different UVmap layers. That's the way I do it (I also made my own UVmap, one for the body, one for the head, roughly based on the Poser4 layout)

For each part, I selected the other parts of the layout and shrunk them and put them in the "holes" of the layout.

For example: For the UV map of my top, I kept the top part intact, and shrunk the body, the head, and the superfluous arm. I then shoved the small extra parts where I could on the layout.

... look at the pic, it probably makes more sense than what I just tried to explain.
Attached Images
File Type: jpg blender_uvmaps.jpg (212.3 KB, 140 views)
__________________
Quote:
Originally Posted by Humps View Post
Your name is Rain, and that's amazing / At your posts I'm always gazing
I see your work and think 'she'll go far' which is why theres no need of an aide memoire
xxxxxx


A2NZ: When creativity goes global
Raindrop Drinkwater is offline   Reply With Quote
Old 04-22-2009, 05:07 AM   #12 (permalink)
dabbles with latex
 
Raindrop Drinkwater's Avatar
Shinyyyyy!
 
Join Date: Jul 2007
Posts: 2,462
My Mood:
SLShopper Ads: 35
You can design your outfit on one UVmap and bake it on another one. So what I usually do is that I work on my custom full body layout, and bake the final texture onto the linden layouts. It allows me to paint details or apply patterned textures on a shape that actually makes some sort of sense.

I just wish I had found this technique earlier And that I could explain it better. o.O
Attached Images
File Type: jpg blender_uvmaps02.jpg (216.7 KB, 137 views)
Raindrop Drinkwater is offline   Reply With Quote
1 User Agreed:
Old 04-22-2009, 11:24 AM   #13 (permalink)
Senior Member
 
Rev Eponym's Avatar
 
Join Date: Jul 2007
Location: Dallas, Tejas
Posts: 2,152
My Mood:
SLShopper Ads: 6
SL Join Date: Feb 2006
Send a message via AIM to Rev Eponym Send a message via MSN to Rev Eponym Send a message via Yahoo to Rev Eponym
Quote:
Originally Posted by Raindrop Drinkwater View Post
You can design your outfit on one UVmap and bake it on another one. So what I usually do is that I work on my custom full body layout, and bake the final texture onto the linden layouts. It allows me to paint details or apply patterned textures on a shape that actually makes some sort of sense.

I just wish I had found this technique earlier And that I could explain it better. o.O
I'd appreciate it if you attempted to explain it. I might be able to help work it out, so that everyone can benefit.

.
__________________
MadScience Laboratories: Theoretical and applied fetish research
The MadScience Blog, unsafe for any workplace. Magnetic soundtrack shielding currently untested.
Rev Eponym is offline   Reply With Quote
1 User Said Thanks:
Old 04-22-2009, 12:32 PM   #14 (permalink)
dabbles with latex
 
Raindrop Drinkwater's Avatar
Shinyyyyy!
 
Join Date: Jul 2007
Posts: 2,462
My Mood:
SLShopper Ads: 35
I'll do my best. I'm just back from my granny and I have a headache, so I won't be coherent at all now, but maybe later.

ETA:
I found an interesting page on Blender.org:
http://wiki.blender.org/index.php/Do...ing_the_Layout

It mentions multiple UV layouts, and is an interesting read.

Last edited by Raindrop Drinkwater; 04-22-2009 at 04:41 PM.
Raindrop Drinkwater is offline   Reply With Quote
1 User Said Thanks:
Old 04-23-2009, 03:16 PM   #15 (permalink)
dabbles with latex
 
Raindrop Drinkwater's Avatar
Shinyyyyy!
 
Join Date: Jul 2007
Posts: 2,462
My Mood:
SLShopper Ads: 35
I've had a serious look into how to write this tutorial. I'm going to need a bit of time for it, so in the meantime, I'm going to point you to the tutorials that made me "click":
SL Forums
combined with
Texturizing sculpties with multiple images « machinimatrix

I basically applied the principles of tutorial n°2 to the avatar. I can't remember exactly how I managed to keep all the layouts with one joined object, so that's what I'm going to focus on in the next couple of days.

/me does things she can't understand.
Raindrop Drinkwater is offline   Reply With Quote
3 Users Said Thanks :
Old 04-24-2009, 01:48 AM   #16 (permalink)
Senior Member
 
whyroc's Avatar
Blue Marsified
 
Join Date: Oct 2007
Posts: 163
Send a message via Skype™ to whyroc
The file that Domino references in that one is a little borked from what I remember, just wanted to give the link to the updated avatar file.. the 'key' to this one is look at the shape keys to choose from a bunch of preset body types.

http://www.dominodesigns.info/downlo...r/avatar.blend

As for the seamless bake I'm going to go have another go with the avatar file and the UV mapping / layering principles, y'all have got my interest with this
whyroc is offline   Reply With Quote
2 Users Said Thanks :
Old 04-25-2009, 12:31 PM   #17 (permalink)
That template guy
 
Chip Midnight's Avatar
 
Join Date: May 2008
Posts: 3,560
My Mood:
Business: CMFF
The problem is most likely smoothing if you haven't gone through and welded the overlapping verts at the seams and smoothed them. I'm not a Blender user so I don't know the procedures for that partcular app. If a rendering engine rendered the mesh as it would look in the real world it would appear faceted like a cut stone. That's due to the fact that it's made of all those little triangular flat surfaces. In order to make 3d meshes look more complex than they actually are smoothing is applied over adjacent triangles based on a threshold value of how close they are to being coplanar or not. This shades the adjacent polygons with a smooth gradient instead of with a distinct edge. At a seam where the adjacent faces don't actually share an edge, that smoothing can't be applied.

The overlapping UV space of each of the three texture areas is also an issue because the head, upper body, and lower body all utilize the same square UV space. In order to get around that issue it's a good idea to remap the avatar so that those three sections are stacked in a long vertical strip so that the head, upper body, and lower body all exist in one UV space without overlapping. Then you can bake the whole body in one go. I don't know if anyone who's done that has released it to the community. I've never released mine.
Chip Midnight is online now   Reply With Quote
1 User Said Thanks:
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On