PDA

View Full Version : Baking Lightmaps



Costanel
02-13-2009, 04:39 AM
Hey there,

I'm looking for a way to render lightmaps, without the textures(so only with shadows/shading) for a simulation. I however only find a way to render with textures with the surface baking camera.

In 3ds Max there is a lightmap renderer, I can't find this option in LW.
The Surface Baker plugin is too slow, so is there any other option to render this effectively?

Which export method supports Lightmaps from Lightwave(3ds doesn't AFAIK)?

Thanks in advance,
Costanel

Tobian
02-13-2009, 06:21 AM
LW 9.+ has a surface baking camera. Just create your UV map, remove all your textures, light the scene and render using that camera, with your UV map selected.

Sensei
02-13-2009, 06:32 AM
BTW, you can quickly clear up all surfaces of all objects (to remove textures and nodes) with mine free plug-in SpreadSurface http://www.trueart.eu

Kirdian
02-13-2009, 09:17 AM
You dont need to remove textures. Just add Buffer View (image filter Tab) and check channels you want to bake with surface baking cam.

EDIT:
Sorry, not Buffer View but PSD Export whit Diffuse Lightning. Diffuse shading from Buffer View dont work as I expected.

toby
02-16-2009, 04:50 PM
Or - make one surface plain grey, copy it, select all other surfaces, paste. *Don't* do 'save all objects' =)

Kirdian
02-19-2009, 07:16 PM
This way, you will not be able to bake color of light reflected from surfaces, only intensity.

toby
02-19-2009, 08:33 PM
This way, you will not be able to bake color of light reflected from surfaces, only intensity.
White surface, colored lights, why wouldn't it work?

Buffers that do save color are Shaded Diffuse in the buffer export plugin, and Diffuse Color in the PSD export plugin.

But it would be nice if you could just save the lighting color.

JAFET
02-21-2009, 08:29 AM
Hi All,
I'm making the camera baking, but I'm not fully happy with that experience.
Yes, the camera bake works fine, but if you turn ON the radiosity, it makes the rendering process too much slow...
Example:
I had a archtecture scene that was taking 5 minutes with classic camera and the radiosity turned ON.
After 6 hours of rendering, it was in 2% of radiosity calc. (it had one big UVmap with all of polys in the same UV).
The process was aborted. (BTW, I using LW 9.6 64b with 8core 8GB machine). So, then...
I did a multilayered object, where each one (chair, table...) had it's own UVmap.
After this, I asked to LW process and cache the radiosity, but over the classic camera. First, I did that over a 800x480 pixels resolution. That cache file was created with around 3.5MB file size... Does it change with the resolution of the chassic camera? The answer is YES!!! My second render was over a 1024x1024 pixels classic camera, and that cache file growed to 28MB file size... I don't know what difference it makes, how it impove or not the details, but...
So, then I changed my camera to a baking camera. Wauuu, there slow radiosity process was better, where the Preprocess % line was much faster (20 minutes).
...but, the 5 AA rendering, are still slow, taking 10 hours for each UVmap.

Well, how to make the camera baking with a rendering time closer than the classic camera rendering time, when using radiosity???

Tobian
02-21-2009, 08:41 AM
Hmm I'm slightly confused here, with the terminology. Caching radiosity and baking lighting to a file are not the same thing at all.

Yes, the cache is resolution independant, because it's calculated based off the distance between samples, hence you do have a resolution multiplier in there (if you wanted to lower the size, to speed up render, set it to 50% or less)

Jafet, can you post some images of what you are trying to do as people might have suggestions on how to speed things up. I find that in many situations a faster way to render is to use a shader-based ambient occlusion, with a very small sample size, and a medium scale radiosity pass will make a fairly good even lighting on a surface, so long as there aren't small luminous objects in there.

zapper1998
02-21-2009, 10:13 AM
Hi All,
So, then I changed my camera to a baking camera. Wauuu, there slow radiosity process was better, where the Preprocess % line was much faster (20 minutes).
...but, the 5 AA rendering, are still slow, taking 10 hours for each UVmap.
Well, how to make the camera baking with a rendering time closer than the classic camera rendering time, when using radiosity???

Lower your AA to 1 and use the Adaptive sampling and RRL and RP on the Globals panel to clean up the image...

When I do Radiosity my AA is never over 1...
Then I do test renders at 25% resolution ...
Dialing in the radiosity settings, then I can multiply the render time buy 4, to come up with a good time on full resolution render..
M2 0.002 cents worth.. :)
-Michael

JAFET
02-21-2009, 10:23 AM
Zapper, thks about the AA tip. I'll try.

Tobian, I'll post some images as soon the render finish...
Until there, the main problem is the rendering time when I try to bake uvs with radiosity.
If I just use raytrace, there aren't to much difference in rendering times, between a classic or surface camera.
But, if you turn the radiosity on, that difference makes impossible to bake uvs... Just would like to understand why, and if I someone knows another pipelino to do it: BAKE UVs WITH RADIOSITY

tks.

There's the image:
http://www.27digital.com.br/temp/image_001.jpg

-I always set the lighting before the texture. In this case, I'd like to create a lightmap to apply in a virtual tour (game engine based).

toby
02-21-2009, 03:06 PM
Do you have cache turned on? You shouldn't need it, and it might slow things down, especially animated cache.

JAFET
02-21-2009, 06:22 PM
Toby,
whitch cache? Radiosity Cache? Yes, it is...
Sorry, but I didn't understand your comment... Cache makes slow???
Doesn't make sense to me...:stumped:

toby
02-21-2009, 06:37 PM
Well, Animated cache definitely slows it down, it's known for that. Speed is not it's purpose, it's purpose is to stop the flickering associated with animated radiosity, so it has to consider past frames in it's calculation, which makes it slow, but effective.

Of course you shouldn't be using anim cache for this, but if you're baking a texture you have no need for a cache at all. By trying to use it, you may be throwing a wrench into the machine. I just think you should try it without the cache.

If it's still slow you can futher test what's going on by bringing a chair into an empty scene, and see how long that takes. I just tried it, and it took about twice as long in the surface bake camera as it did in classic, but it is rendering twice as many polygons too.

JAFET
02-22-2009, 05:54 AM
Tks Toby. I'll try without the cache.

JAFET
02-26-2009, 08:03 PM
Guys, I don't know what's happening with my LW...
Everybody say: "The bake surface camera take twice of rendering time than the classic camera, EVEN WITH RADIOSITY TURNED ON!!!"
Twice???
Fifty times or more!!!
Pls, someone test it with LW 9.6 64bits... Am I crazy?
Or my version (64bits) is buged?

toby
02-27-2009, 12:31 AM
Can you give us a better idea of the bake scene you're rendering - are you baking a chair in the room with all the other furniture too? How many bounces? Posting the scene and objects here would be ideal, if you're allowed to do that.

Oh you should know about Exception's radiosity guide, where most of us learned what we know about LW's GI
http://www.except.nl/lightwave/RadiosityGuide95/index.htm

I think I have a scene of an office around somewhere, I'll do some tests with that.

dwburman
03-01-2009, 07:04 PM
The surface baking camera takes longer to render because the final image is probably much more complicated than a regular camera render. When rendering from a normal camera the GI (at least when using an Interpolated method) optimizes the solution based on what can be seen. If the camera is in the center of the room you only see half of it so the part behind the camera doesn't need the same level of detail in the solution. When using the Surface Baking Camera, everything is visible so everything has to be calculated with everything else.

That's not to say something isn't going on with your scene to make it take so much longer.

gerardstrada
03-09-2009, 05:17 AM
Hey there,

I'm looking for a way to render lightmaps, without the textures(so only with shadows/shading) for a simulation. I however only find a way to render with textures with the surface baking camera.

In 3ds Max there is a lightmap renderer, I can't find this option in LW.
The Surface Baker plugin is too slow, so is there any other option to render this effectively?

Which export method supports Lightmaps from Lightwave(3ds doesn't AFAIK)?

Thanks in advance,
Costanel
Probably too late for this one, but in a next opportunity you might want to take a look to this method:

http://www.spinquad.com/forums/showthread.php?t=19309&p=212442

In that way we can get not only the illumination coming from distant scene but also from local scene (even radiance effect provided by color textures but without texture data).



Gerardo

Costanel
03-09-2009, 11:40 AM
Thanks for all advice, have been trying several techniques, and I can really move on with all this info.

Thanks again!

dreamlight
06-08-2009, 12:09 AM
Guys,
Iīve been following this thread and iīve got the same issue. Iīm running LW 9.6 64 bit on Vista 64 with 8 Gb RAM. 8 cores at 2.67 Ghz each. Itīs a monster machine, that renders very quickly - and yet - when it comes to baking itīs slooooow.

A normal defualt camera view render takes a few minutes with radiosity on. But when using the surface baking camera it can take 10 hours or more. And thatīs a small map of 1024 x 1024!

I stopped bothering rendering this way, as this would kill my production time. Instead, i tried using Fprime. Just select the LW baking camera in the LW camera properties, set up the radiosity in the fprime master window and run fprime render.

Itīs atleast 10-20 times faster with radiosity and two bounces!

What else i like about frprime is that i can re-fine the render afterwards. And - the most amazing thing of all: The render looks great after the fprime quality passes 1 - so you donīt have to wait for full quality at approx 20. So - after 10 minutes you can use your texture and play with it, while fprime continues to render.

By the way - iīm baking at 3584 x 3584!

Alexx
09-18-2009, 02:00 AM
Hi,

I'm also facing problems with baking radiosity :(

I'm trying to bake a scene with multiple objects, here are the files : http://www.alesk.fr/problem.rar

But I have some strange cases where rendering time takes hours to only bake a 64x64 image (I know radiosity can eat a lot of time, but here it's really too much)

Load the scene, and then display properties of camera "cynodrome:lampadaire (1)" (it should be the default camera right after loading the scene)

This is a baking camera, assigned to render the object "cynodrome:lampadaire (1)"
If I set the UV border parameter to zero, rendering take more than 2 hours !!
but if I set the UV border to 1, rendering time fall down to 5.3 seconds........ o_O
So it would be nice if only the UV border feature hasn't a big problem :
the border is made of an ugly noise instead of a clean shifted copy of the original border (I still don't understand why it's done that way...)

here is an example of the border problem :
Image with no border
http://alexx.krehmen.free.fr/images/uv_border_none.png

Image with a 2 pixels border done by lightwave...
http://alexx.krehmen.free.fr/images/uv_border_lw.png
(wtf ??)
I tried all possible combinations of antialising parameters to try to remove this noise... no luck :(

Borders generated from the first image with a photoshop script :
http://alexx.krehmen.free.fr/images/uv_border_photoshop.png
this is how it should be !

I've tried many different setups, and none of them solved the problem (the Oversample parameter seams to help to have more details when rendering thin polygons on small images, that's why it's set to 0.001... of course I've set it back to 0 in case it was the source of the bug, but it's not)

I can add the UV borders is a post process pass, that's why I've made a photoshop script, but render times are way to long if I disable them in
Lightwave... and I cannot remove them easily after rendering... so what should I do to have a clean baking not taking ages to renders ?

By the way, some other cameras are just rendering fine with UV border set to 0, like "cynodrome:pub_panneau (1)"
Maybe the problem comes from the mesh shape (or its position in the secne), but I don't understand why exactly.

Any help would be greatly appreciated !



PS: I'm using a special setup on this scene to only bake the radiosity pass, without diffuse colors
for this I need the db&w tools plugin wich can be downloaded here :
http://www.db-w.com/component/option,com_remository/Itemid,84/func,fileinfo/id,63/

and unfortunately this plugin is not compatible with FPrime...