PDA

View Full Version : Surface Baking & LW9 documentation



GoneGuy
02-08-2009, 03:32 PM
I am having a look at baking out surfaces to image maps. Are the manuals from my LW9 disk the current documentation for this?

If there's any other resources for baking out surfaces to images, especially including lighting I'd be grateful.

toby
02-08-2009, 06:08 PM
Haven't seen the docs on this, but it hasn't changed much since 9 came out, if at all. It's simple enough too, we can cover anything here the manual doesn't.
You'll need :
UV's on anything you want to bake
Decide whether you're going to use the old bake shader or the newer camera bake, there's pros and cons to both.

GoneGuy
02-08-2009, 06:25 PM
Thanks Toby, I think you replied to another bake query where you mention some pros and cons, one does one surface at a time and one does all?

I have a low poly character with UVs and the intention is to bake out its colour, diffuse, bump and effect of lighting (if possible) out on to one image map.

This one image map will be used in the Unity game engine.

This is my first go at this so I'm not sure whether a can bake out a separate light map for use in Unity, or if I can even bake out the effect of any light in Lightwave onto the characters texture.

Apparently the Baker Camera is very straightforward so I'll give it go.

toby
02-08-2009, 11:21 PM
That's a good question, does Render Buffer Export or the PSD export work with baking... that would make it easy for you to get your separate passes. It's worth a shot. If you render a shaded diffuse pass and a raw rgb pass, you can extract a light pass from them in photoshop.

Baking camera is easier, but it only does one object per bake (I've heard you can set up some switch to change cameras and have many more, but I haven't tried it). The bake shader can do a separate bake for every surface in the scene, each with different settings. But it only works with 1 thread, and will fail with anything but 3 - 4 point polys.

toby
02-09-2009, 03:20 AM
Ok, only the camera baking works with render buffer export and PSD export, but the shader bake has the option to bake illumination, although it looks like it's not a separate pass unless you want to render it twice. Camera bake sounds the best now, there's dozens of buffers you can output.

GoneGuy
02-11-2009, 07:00 PM
Ok, only the camera baking works with render buffer export and PSD export, but the shader bake has the option to bake illumination, although it looks like it's not a separate pass unless you want to render it twice. Camera bake sounds the best now, there's dozens of buffers you can output.

I've no experience with this, I still have a reply of yours from SpinQuad I think explaining the passes you can output. I've just found render buffer export and PSD export in the image filters drop down of the Effects/Processing window and see options in there for the the various output passes.

I set off a Surface Baker Camera render (at 1024x1024) and it took over an hour for a 600 poly model. And the render was pretty grainy.

I found the shader bake option, in the Surface Editor's Shader tab. I think I've got a bit of reading and research to do. At the moment I'm having a go at a hard model surfacing tutorial (http://www.game-artist.net/forums/spotlight-articles/42-tutorial-hard-surface-texture-painting.html) (on GameArtist) and seeing if can output an ambient occlusion layer to use in layered paint file.

Are there any tutorials on outputting passes or rendering out surfaces for game models in Lightwave?

(Thanks for all your help BTW)

toby
02-11-2009, 10:50 PM
Oy, sorry, I know nothing about games. Jeremy Birn has a tutorial about passes :
http://www.3drender.com/light/compositing/index.html (make sure to check out the download links on the left)

What kind of lighting did you use on that render? It shouldn't be much slower than a normal render, aside from the fact that you're rendering more screen space. At the same time, it's only a still, an hour is only bad if you have hundreds of frames to render.

So you want separate passes, but to end up in the same map, is that because you want to paint on the textures before combining them? I don't know what the process is for games or what you're planning, so I can't tell you anything specific.

GoneGuy
02-11-2009, 11:03 PM
Jeremy Birn has a tutorial about passes :
http://www.3drender.com/light/compositing/index.html.

Thanks for the link. This'll be good reading. I'd like to know about rendering out separate passes but yes, for now layering and painting effects to go on to a game model is what I'm trying to do.

I've learnt a bit in my inquiries and got a bit of a result.

Thanks for your help

GoneGuy
02-11-2009, 11:04 PM
What kind of lighting did you use on that render? It shouldn't be much slower than a normal render, aside from the fact that you're rendering more screen space.\

PS.
I don't know what's going on with the render, it's a 1024x1024 image to match the UV map size, and a spotlight????

toby
02-12-2009, 03:08 AM
you're kidding!?
you sure there's nothing else in the scene? And this is the camera bake, not the shader, right? The shader can get insane with the anti-aliasing option turned on.

Btw the way I just did my first project using nothing but buffers for the final image, I used:
Shaded diffuse
Shaded spec
Shaded reflection
(in all cases making sure to get the colored type of shading pass)
Raw RGB

To get a full light pass (with light colors) I divided the shaded diffuse by the raw rgb (which is the opposite of what happens internally in LW after all the buffers are rendered) but gawddamn if I can figure out how to do that in Photoshop - Shake and Nuke have a 'divide' blend mode.

Shaded spec and reflection always get added on top of the image (or 'screen' in pshop), everything else gets multiplied.

I also plugged an fresnel pass into the luminosity channel, it ruined the final rendered output but I wasn't using that anyway. You could do the same thing with ambient occlusion via nodes.

GoneGuy
02-12-2009, 04:46 PM
you're kidding!?
you sure there's nothing else in the scene? And this is the camera bake, not the shader, right? The shader can get insane with the anti-aliasing option turned on.

No, nothing else in the scene but a 600 poly game model.

BUT, turning off Radiosity (Final Gather) made a huge difference. I turned it on because I wanted natural fill lighting on the side surfaces but now I'll try getting that with fill area or spot lights.

That's really interesting what you're doing with passes. I'm still on an older G5 PPC so I rely on FPrime to get me on the green then paint everything else in post.

toby
02-12-2009, 06:14 PM
Oh I see, radiosity was on. It wasn't interpolated? Use backdrop, interpolated, it'll scream

Yea comping 3d is really cool, gives you lots of options.
I'm on an old G5 too, I think they're steam-powered? :)

GoneGuy
02-12-2009, 06:31 PM
Oh I see, radiosity was on. It wasn't interpolated? Use backdrop, interpolated, it'll scream

Yea comping 3d is really cool, gives you lots of options.
I'm on an old G5 too, I think they're steam-powered? :)

Good to know, on both accounts, the interpolation tip I'll try and hope it adds to rendering 'knowledge data base', and that on old G5 "you too can render passes". I haven't been in Lightwave much, then I haven't been doing much 3D, which reminds me I should continue the work I started with Nodes... (so much to do...)

You take it for granted everyone's on super fast machines. Then for rendering times we really could benefit from newer chips. Lets hope something nice is in the oven for March/April-ish Apple-wise.