Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

baking and shadows

Madixbyn Yangtz
Registered User
Join date: 15 Aug 2009
Posts: 6
01-25-2010 09:11
I have created 2 pieces, a top and a bottom with textured fabric however it is incomplete without the shadows. I downloaded and installed lightwave so I can be a step ahead to baking a texture. But I don't understand...
... When I get to the step where I am actually going to bake a portion of the avie model will I be taking the layer from a photo shop file and loading that into lightwave and then working around the layer in the lightwave program to bake?

Or will I be first making a plain grey impression of the avie's body part and importing that plain grey layer into the 3d program to then bake and make shadows onto it?

There is an imense support for using blender in sl and I have used it before but I am not impressed with it I like lightwave better. Is there anyone using lightwave to bake textures whom can help me put some shadows into my cloths? It seems as though all the tutorials I find are just fingers pointing to other locations and its a little frustrating.

This is a hot topic. Once I have baking textures down I vow to make an in-depth guide on how to do it. So someone come and point me in the correct direction with some guidance please? So I don't run into dead ends? Thanks I appreciate
Madi-
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
01-25-2010 12:03
From: Madixbyn Yangtz
I have created 2 pieces, a top and a bottom with textured fabric however it is incomplete without the shadows. I downloaded and installed lightwave so I can be a step ahead to baking a texture. But I don't understand...


I'm not a Lightwave user, but I can probably still help you out with some general concepts.


From: Madixbyn Yangtz
... When I get to the step where I am actually going to bake a portion of the avie model will I be taking the layer from a photo shop file and loading that into lightwave and then working around the layer in the lightwave program to bake?


I'm not sure what you mean by "working around the layer". The basic outline of steps for baking in any 3D modeling program is as follows:

1. Create your model, and UV it carefully. Obviously, UV'ing the avatar model is unnecessary, since that's already done. (Unless you want to create multiple UV channels, which is sometimes helpful, but that's a more advanced topic.)

2. Apply materials and source textures to your model. This would include the garment you made in Photoshop.

3. Light the scene.

4. Adjust your render settings, to include whatever properties you want to be included in the output (color, shadows, reflections, bump, specularity, etc.)

5. Bake (render to texture).

The exact procedures for implementation will vary from program to program, of course, but that's the basic concept. I believe older versions of Lightwave have a Surface Baker shader preset, which presumably should automate much of the process. Newer versions, if my understanding is correct, also now come with a special surface baking camera, which is supposed to simplify things considerably.


From: Madixbyn Yangtz
Or will I be first making a plain grey impression of the avie's body part and importing that plain grey layer into the 3d program to then bake and make shadows onto it?


I'm not sure what you mean by "plain gray impression".


From: Madixbyn Yangtz
There is an imense support for using blender in sl and I have used it before but I am not impressed with it I like lightwave better. Is there anyone using lightwave to bake textures whom can help me put some shadows into my cloths? It seems as though all the tutorials I find are just fingers pointing to other locations and its a little frustrating.


Our resident Lightwave expert is Robin Sojourner. And when I say "expert," I mean EXPERT. She wrote the manual for Lightwave 8.

Robin will probably poke her head into this thread eventually. She tends to show up whenever Lightwave is mentioned. :)


From: Madixbyn Yangtz
This is a hot topic. Once I have baking textures down I vow to make an in-depth guide on how to do it. So someone come and point me in the correct direction with some guidance please? So I don't run into dead ends? Thanks I appreciate
Madi-


It's generous of you to volunteer to put a guide together. I'm sure many a budding Lightwave user would appreciate it. "Wavers" seem to be relatively few and far between in SL, though, so I'm not sure how wide an audience you'll have.

They may be somewhat of a dying breed in general, actually. Maya and Max tend to dominate the market these days, and as you pointed out, Blender is on the rise in a big way. With the exception of Robin, I don't think I know a single other artist who uses Lightwave as their primary tool, if at all. Even the DAVE School, arguably the best known institution in the world for teaching Lightwave over the past decade, is now changing gears to Maya, from what I've been told.


In any case, one word of caution I'll throw out, regarding baking on the avatar. The geometry of the models sucks. Further, the default shape is not exactly what most people would call pretty. Whatever shadows you bake on the default mesh are forever going to hint at that oddball body shape, even on in-world avs that have been adjusted into better-looking shapes.

The whole point of baking in the first place is to suggest shaping that isn't actually there. If you take a well-shaped avatar, and apply shading from the default shape, the results might not be pretty.

So, before you bake, I'd recommend doing a few things:

1. Step up the polygon resolution of the model, if Lightwave can do that without breaking the UV map.

2. Carefully reshape certain features to be more anatomically idealized (or more grotesque, if that's what you're going for). Again, make sure not to break the UV map when doing this.

3. Pay careful attention to the hardness/softness of your edge normals (assuming Lightwave has options for this). Obviously, since the body is an organic shape, most edges should be fully soft. But there are a few areas, where hard edges can make for much better results (around the eyes, around the lips, the crease where the nostril meet the cheek, around the nipples, around the finger nails, etc.).
_____________________
.

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.
Madixbyn Yangtz
Registered User
Join date: 15 Aug 2009
Posts: 6
There IS hope
01-25-2010 14:39
Lol thanks alot I feel like I will have my goals here complete. Can't wait to move forward.

And what I meant about working around the plain grey texture is if I put and object in front of it and put light behind the object shining a shadow onto the plain grey texture, thats the idea I have of how to bake the shadows onto the grey texture

I was watching a tutorial online about how when moving a baked texture out from Lightwave to photo shop that the texture must be grey, 50-50 because either photoshop or sl will recognize grey as transparent so the end result is'nt grey?

Programs I have at my disposal:
LightWave 3D 9.3
Adobe Photoshop CS4
Snowglobe client

And downloading:
Poser 8

Goals are:
Successfully complete 1 article of clothing (upper) including fabric texture and realistic shading.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
01-25-2010 20:43
From: Madixbyn Yangtz
And what I meant about working around the plain grey texture is if I put and object in front of it and put light behind the object shining a shadow onto the plain grey texture, thats the idea I have of how to bake the shadows onto the grey texture


I'm not sure why you'd want to do that. I thought you were talking about using baking as a means of shading your clothing/skins, so that they look more three-dimensional. But now you appear to be saying you just want to cast a shadow of some miscellaneous object onto the avatar surface. May I ask what exactly you're trying to accomplish by doing that?


From: Madixbyn Yangtz
I was watching a tutorial online about how when moving a baked texture out from Lightwave to photo shop that the texture must be grey, 50-50 because either photoshop or sl will recognize grey as transparent so the end result is'nt grey?


It sounds like you're talking about using an overlay. That's one way to go about shading in Photoshop, but it's certainly not the only way.

Overlays are not visible themselves, but rather serve to map effects onto the layers below them. Most simply put, white on an overlay casts maximum brightness onto what's below, black on an overlay casts maximum darkness what's below, and all shades of gray fall in between. 50% gray has no effect, since it's exactly half way between light and dark.

The main advantage of using this method is that you can control the intensity of the shading in post, since it will be a separate element from everything else. You also can easily apply the same shading to lots of different garments, just by copying the overlay into each new image. The disadvantage is that it can be slow and tedious to render an individual map for each material attribute. Depending on the project, it may be quicker just to render a single image with all attributes included.
_____________________
.

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.
Madixbyn Yangtz
Registered User
Join date: 15 Aug 2009
Posts: 6
yes overlay!
01-25-2010 20:50
i want to cloths to look real, not have random shades patterns on it :P
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
01-25-2010 23:02
From: Madixbyn Yangtz
i want to cloths to look real, not have random shades patterns on it :P


I'd like to help out as best I can, but I'm not quite sure what you're trying to say. Unless I'm misunderstanding you, you seem to be stating that lighting the scene, and baking a texture based on that lighting, would produce "random patterns" of shading. So you're instead assuming that casting shadows of secondary objects onto the avatar surface would yield superior results over direct lighting.

If so, that's an extremely convoluted, and overcomplicated way of approaching the problem, and it's highly unlikely to produce desirable results. Instead of a texture that is shaded to look 3-dimensional, you'll end up with one that's simply had areas of light blocked off from it. It's like casting shadow puppets onto a wall with a flashlight. It's cool if you really want that particular effect, but it could hardly be called realistic in any way. It's a flat silhouette, nothing more.

What you want to do in your baking is to capture the lighting in the scene that is actually shining onto the model, without obstruction, and let the 3-dimensional shape of the model itself mold the shadowing. This is a highly controllable, entirely predictable process, no randomness involved whatsoever.

You could hand-paint the same kind of shading, by the way, if you're a good painter. And again, there would be no randomness involved, as long as you understand what's supposed to go where on the UV map (template). Baking the lighting/shadowing is simply another method of accomplishing the same task. You're just letting the computer do the painting, after carefully instructing it on how (by lighting the scene, applying materials to the model, shaping the model, etc.), rather than shading each pixel with your own hand.

If I am misunderstanding, please explain what I'm missing in what you're trying to say. I have the feeling I might be responding to a point you weren't actually trying to make. :)



As for creating a light/shadow map to use as an overlay, you don't necessarily need to start with a gray surface in order to do that. In most full featured renderers, you can simply choose which attribute you want to bake to a map. Shading is just one possible choice among many. The renderer will output a grayscale map of the selected attribute.

Color, by the way, is simply a mapped attribute a well. It's called a diffuse map. Most other other maps, including shadow maps, are grayscale, but diffuse is full color. Since shadow and diffuse are two different attributes, they don't directly affect each other in this context. Your base texture could be gray or pink or purple or green or polka-dotted or whatever, and the shadow map would come out exactly the same.

To give you an idea, in the renderer that I use, Turtle, it's simply a matter of checking a box for each attribute you want to output. Available choices by default are illumination, indirect illumination, albedo, diffuse (color), specularity, ambient color, incandescence, subsurface scattering, reflections, refractions, or "full shading" which is all of the above. Plus there are options for user-created custom attributes as well.

I'd be surprised if Lightwave's renderer didn't offer all these same options. It's probably a little more involved to set up than just checking a box like in Turtle, but those options must be in there somewhere.

Rendering an actual shadow map will be superior to baking shadows onto a gray diffuse map. This is because when you use the latter method, the gray coloring itself becomes an active factor in the output. The resulting image will usually end up dimmer than it otherwise would be. To compensate for this, people end up lighting the scene too brightly, and then the image becomes more contrasty than it otherwise would be. In short, by using that gray method, you're combining two attributes into one, rather than outputting just the one attribute you actually want, if you follow me. Do a little more reading, and learn how to output just a shadow map all by itself. I'm sure there's a way to do it.



ETA: I took the liberty of E-mailing Robin, to ask if she could poke her head in this thread. Hopefully she'll be along, to give you some more specific pointers for Lightwave than I can. :)
_____________________
.

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.
Madixbyn Yangtz
Registered User
Join date: 15 Aug 2009
Posts: 6
Shadow map it is!
01-26-2010 00:27
You are the expert then shadow map will be the course I take to adding the natural looking shadows onto my cloths. Hopefully soon everyone will be able to makes some cloths.
Robin Sojourner
Registered User
Join date: 16 Sep 2004
Posts: 1,080
01-27-2010 13:39
Sorry that it's taken me so long to reply to this. RL has been a bit busy lately.

It seems that you're unclear on what baking is. Or you were, in your first post.

All textures in SL are essentially flat image files. You can also use flat image files for textures in LW. These image files are always applied in SL using UV Maps, where each vertex on the image has coordinates on the U (horizontal) and V (vertical) axis on that flat image. Image files can be applied in LW (and nearly all other 3D programs) in the same way.

So, what you are doing when you bake a texture is telling LW to make a new flat image file that records the lighting on the model according to a particular UV map. LW essentially paints the image for you, as Chosen explained.

What you will wind up with is a flat image that you can take into PS and manipulate, if you want. You can also upload it to SL, and the lighting that you had in LW will be applied to the Avatar, assuming that you used the UV map that was supplied with the AV model.

Whether this will look good or not really depends on the lighting in SL at any particular moment. If it matches, or is close to, the lighting in the LW scene, it'll make your model look wonderful. But if it is different, it will make the shadows from LW look like patches of dirt, on the Avatar.

Naturally, most of the time the lighting in SL won't match the lighting in LW unless the LW lighting was very subtle. Direct lighting will make the clothes look much worse, not better.

For this reason, I would recommend using global illumination only, and using it very subtly, when you bake lighting onto a model.

As Chosen said, I used to be an expert in LW8, and I did write part of the manual. But wires got crossed, and I wasn't hired to work on the manual for LW9, which meant that I didn't get a free upgrade, and as it turned out I never upgraded at all. I switched to modo.

So I'm afraid that I haven't used LW in years, and I know nothing of how LW9 does things like burning textures.

Unless things have changed a lot, and they may have, a Shadow Map in LW is something that the lights make, not one of the attributes you can bake. What you want to bake is Illumination. That will bake the lighting on the model. Uncheck everything else before you bake.

The other thing you should do, before you bake, is to open Modeler, merge all the vertices (tap m) and than tap the tab key, to show all the polygons as SubPatches. If you don't do that, you'll have a bunch of Faces, and your model will look faceted.

Also, as Chosen said, you probably want to fix the modeling, which you can do by just moving the vertices around. That won't hurt the UV Map. You can even subdivide if you want, but you probably don't want to do that, since it will just give you more vertices to move, and since you will have already made them all into SubPatches, you won't gain anything by subdividing. Just don't spin the quads or anything, or you'll wreck your UV Map.

You should also be aware that, since very few people use LightWave here, your guide will be of limited use. If you really want to make a guide that will help people the most, then you might want to go back to Blender. You can bake textures in Blender as well, and more people will see it.

In fact, Blender is a very powerful program. You can bake textures, paint directly on the model, make sculpt maps that smooth and lovely in SL, and do all kinds of things.

You just have to get over the non-standard interface in order to use it. Which isn't easy, but is possible, and the price is right, since Blender is free.

So; that's my recommendation. :D Enjoy your baking, and feel free to post if you have any other questions. I'll try to keep an eye on this thread.

And in a few more months, things should be settled enough in RL, (after more than a year,) that perhaps I'll be able to contribute to these forums more regularly again!
_____________________
Robin (Sojourner) Wood
www.robinwood.com

"Second Life ... is an Internet-based virtual world ... and a libertarian anarchy..." Wikipedia
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
01-27-2010 17:31
Thanks for replying, Robin. I didn't realize you were no longer using Lightwave. I guess that makes you a statistic. As I said earlier, Wavers seem to be a dying breed.
_____________________
.

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.