View Full Version : Saving Shadowmaps to disk.

08-18-2003, 11:15 AM
Hey Guys,

Shadowmapped spotlights reign supreme in my little world here. They render fast, have beautiful soft shadows and there seems to be nothing you can't achieve with them. In a production environment, shadowmapped spots are king!!

Often, the shadows cast by these lights can be cached, at which point the renders just fly. However, when I'm still working on a scene and I'm doing test after test, well for each test Lightwave has to render the shadow again because the cache isn't retained.

Could we write these shadowmaps to disk? If we could, this could be a fantastic advantage for production. Hi res shadows rendered during downtime; low res shadowmaps uprezzed in a compositing package, blurred etc; superfast test renders because the shadows are already done to disk; there are tons of tricks here. Yes, if you change the animation the shadows would have to be redone, but many many lights often don't 'see' the animation.

Hours and hours spent looking at the Lightwave messages like ' Computing shadowmap for BlueFillspot23'. Saving Shadowmaps to disk would be a real boon.

Dave Tracey

08-18-2003, 12:43 PM
It would surely be an option that made sense in many cases. I'm not quite sure about speed gains, especially for large maps. If you e.g. in Maya create a 4000x4000 map, it takes longer to read it from disc than to calculate it anew (Of course this can be improved with faster discs but not every workstation has a RAID).


08-20-2003, 03:49 PM
Agreed - shadow map cache to disk or at least cache to memory for current camera/frame etc.

Also the ability to set the depth of the root of the map would be welcome - the distance from the shadow casting object to the root of its shadow. Sometimes there is a slight gap.

08-24-2003, 05:33 AM
You can use an alpha blend in the Image Viewer - render a full image, leave the viewer open, turn off shadow maps, do a 'render selected object' or Limited Region - in the image editor Controls put the first image in the background and the second image in the foreground, and set the 'blend' to 'alpha'. All your subsequnet test renders get blended into the full image that you rendered first.

09-15-2003, 07:38 PM

Can you tell me more about this tip. I have not understand.

Thanks in advance.

P.S.: It would be also great if NT fixes the lost shadow map cache BUG when you use obj sequence!

09-15-2003, 09:55 PM

First render a complete image and leave the image viewer open. Next, render one object in the scene, using 'render selected objects' (the object must generate an alpha channel). In the image viewer, go to File/Image Controls, and a list of your images pops up. By using the check marks on the left put the first image in the backgrond 'BG' and put the second image in the foreground 'FG', then go to the 'blend mode' dropdown list at the bottom and select 'alpha'.

From now on, every render you do will be blended to the background image that you set. You can change your object and then see it with the whole image without having to render the whole thing again.

hope that helps -

09-16-2003, 01:38 AM
Thank you Toby,

I will test this, this morning.