View Full Version : Does LWSN understand Shadow Map Cache ?

09-13-2004, 08:15 AM

well the question's in the title :
I'm rendering a scene with shadow map cached
and it seems the nodes computes the shadow map
for each frame (mean not only once for each node, which would
be regular).
Just checked my scene and the cache is enabled so anyone can
tell me if something's wrong ?

09-14-2004, 03:43 AM
Now second test on a scene with only one light, just
to be sure I did not mistake, and still the shadow map is computed
on EACH frame, which in this case represents more than 1 minute/frame,
and around 3 minutes on complicated scenes with tens of spots !!!

Seriously, should I understand that LW
integrates on one hand a cache of shadow map to improve renderings speed
and a network engine (LWSN) on the other hand, also to increase
the speed, but that both don't work together ???????

Please, someone tell me that it's not true,
I wish so much I mistaked somewhere.


09-14-2004, 04:49 AM
How are you using LWSN? What are you using to control it?


09-14-2004, 05:44 AM
Hi Mike,

hehe… you might remember the long thread we had some time
ago when I was configuring LWSN…
well I don't use anything to control it as I had a bug with
Amleto which was the only tool I tried.

I launch LWSN from the Layout, following the regular-standard
way, and I checked that my scenes are all setted with the shadow
map as cached.

think it should'nt help but :
- LW 7.5c
- Windows XP
- 4 nodes, including one that is the main workstation
so that I can use it separately (working while 3 others render)
or add it to the LWSN process.

PS : what is strange is that I saw LWSN computes the shadow map
once for each frame, I mean it does not compute it on each AA pass
which is the case when you render whithin LW (not LWSN) and
when you don't check the cache of shadow map.
However this is already too too much.

09-14-2004, 06:11 AM
Well, this surely sounds like a bug then.
Layout uses lwsn mode -2, in which case it really only should calculate the shadow map once.

I never use shadow map cacheing, so I really can't help you there, sorry.


09-14-2004, 07:10 AM
well thank you for your interest Mike anyway…

But such a bug is not acceptable for me.

I'm gonna mention that bug to NT and hope they solve it
before I switch for Maya or Max, I can't waste my money like this
with dam' render farm if the soft ITSELF slows the rendering when
especially I spend my f*** money for a network that should go faster !

This is really too much now.

10-12-2004, 09:56 AM
well thank you for your interest Mike anyway…
But such a bug is not acceptable for me..

Yes, looks like LWSN doesnt cache shadowmaps. It's a very big flaw.
We have to render scenes which hundreds of shadow mapped spot lights.
There are animations up to 10k frames. And this bug rises rendering cost greatly.

I would consider Max+Vray - i did few test with lots of shadowmapped spots and render time appears to be faster or at least as fast as LWs + you have some additional controls like bias...
+ fast GI with caching. Some guy did a test job for me and he acheived faster rendering times with GI than LW with shadow maps!

10-13-2004, 05:52 AM
Yes but did you try VRay for animations ?
I rather heard that if this engine is better and much faster than LW
(but also much more expensive) it's quite made only for stills…

10-13-2004, 06:03 AM
yes it was animation - house exterior - trees, grass - render time was 3m 25s - first frame and 1m 11s - 1m 56s a rest of frames. (P4 3mhz one cpu)

10-16-2004, 05:24 PM
Um, scuse me? Bug? LWSN and Caching not working? :confused:

Here's the low-down:

Caching shadow maps means that the shadowmap that is calculated in the first frame is stored and reused throughout the render pipe - This will speed up render times, but obviously it will mean that the shadows will remain static. This works great if rendering from Layout because Layout renders sequentially and on one machine.

LWSN is not designed for sequential rendering - Its designed to be told 'here's a scene and the frame you need to render' - LWSN is designed to work across multiple machines - When you think about it, the cached shadowmap is the first one generated - So, what machine did the first shadowmap? LWSN can't know (and if it did, it would have to pause all machines and wait for the first to complete), so how could it retrieve a cached map?

It can't... Plain and simple. Its not a bug at all. Caching wasn't designed for the renderfarm, it was designed to make a one-machine render faster in Layout.

However, that said, this could be a great idea for NewTek to add the option 'Save ShadowMap' and 'Use ShadowMap file' to LightWave, so that a shadowmap could be saved and then used in a scene, saving LightWave having to calculate it - Then it would also work on a renderfarm! :D Now wouldn't that be cool...

The other alternative to cached maps would be to bake the texture back onto the surfaces of your models - If you're caching maps, it means your shadows and shading probably isn't moving anyway, so why not just do a baked UV image map with all the shadows pre-painted for you... Then apply them back, 100% luminosity, 0% diffuse and get rid of your lighting for the model... Viola, super fast rendering...

10-18-2004, 06:11 AM
baking shading is not an option, just believe me.
XSI is cashing shadow maps with distributed rendering... just does it.
Even If the question "Which node has rendered SMaps first?" is so hard.
V-ray developers solved it. Photon map gets rendered on first node and then used by a rest of nodes for final render.
In my case calculating shadow maps takes 8 minutes and a rest of frame takes 3 min,
So if one node will spend 8 min for SM calculating while a rest of nodes idle waiting first node to finish - it's not a problem. 3000 frames 11 min each or 3000 frames 3 min each + 8 min - which one is faster? Or you think it's hard to find such solution?
Even if each node will calculate own copy of shadow maps cache - would be big advantage even on big render farms. There shoun't be shadow flickering... even this way.

BTW "saving anf reusing SMs" is really good idea which was "bashed" by number of users in "Feature Request" while ago...

10-18-2004, 10:14 AM
use LWSN-3^^

10-25-2004, 12:10 AM
Or you think it's hard to find such solution?

Woh up there Pard'ner! :eek:

I was just trying to correct the assumption that caching issues were an 'unacceptable bug' in LWSN... They're not, obviously they are just a missing feature as you've pointed out. :)

No, I don't think its hard to find a solution - However, I'm not the one coding LightWave, so that has to roll back onto NewTek to think about and consider... :)

Sorry to rile you up like that.