Itoo Software Forum

Author Topic: Tree Shadows Disappearing on Network Render  (Read 5214 times)

Mike Truly

  • Full Member
  • ***
  • Posts: 115
    • Truly Media
Tree Shadows Disappearing on Network Render
« on: May 02, 2010, 10:02:54 PM »
I feel I have had this problem before but I have searched previous posts and I can't find a solution.

I have a MAX2010_64 scanline project where the finished renders show some tree shadows missing on some frames.  For example, when viewing the alpha of the resulting frame you can see both the trees and the shadows.  On some frames, the shadows on certain trees disappear... on the next frame they are back.

So in the end, I have an animation with flashing tree shadows where they are present most of the time and occasionally dissappear.  I am try to see if re-rendering just those frames from the main workstation fixes the problem.  See attached images.

Thanks!

Sincerely,

Mike Truly
----------------------------------------------------------------
Truly Media
1.800.829.4990
http://www.trulymedia.com

Mike Truly

  • Full Member
  • ***
  • Posts: 115
    • Truly Media
Re: Tree Shadows Disappearing on Network Render
« Reply #1 on: May 02, 2010, 10:27:57 PM »
I should also note, that on some frames the shadows disappear and on other frames the shadows don't disappear but they move to a different position for a single frame... then on the next frame they move back to their normal position.

Thanks!
Sincerely,

Mike Truly
----------------------------------------------------------------
Truly Media
1.800.829.4990
http://www.trulymedia.com

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3319
    • iToo Software
Re: Tree Shadows Disappearing on Network Render
« Reply #2 on: May 02, 2010, 10:37:48 PM »

What type of shadows are you using,  raytracing or XShadow ?

If you use shadow maps, it's possible that map resolution be too low. This would to create a flashing effect when rendering animations in scanline.

Carlos Quintero
iToo Software

Mike Truly

  • Full Member
  • ***
  • Posts: 115
    • Truly Media
Re: Tree Shadows Disappearing on Network Render
« Reply #3 on: May 02, 2010, 10:58:45 PM »
Carlos,

It's XShadow maps at 10000x10000 size.  They are not flickering constantly so I don't think that is the problem.  The previous hundreds of frames show the shadows fine... when it get's to the problem frame, the shadow disappears.

I re-rendered the problem frames from the main workstation and they seem to have been rendered correctly.  This might indicate that it is a problem on one of the network render slaves... but they all have the latest FP installed so I'm not sure what could be wrong.

Thanks!
Sincerely,

Mike Truly
----------------------------------------------------------------
Truly Media
1.800.829.4990
http://www.trulymedia.com

Mike Truly

  • Full Member
  • ***
  • Posts: 115
    • Truly Media
Re: Tree Shadows Disappearing on Network Render
« Reply #4 on: May 03, 2010, 04:27:06 PM »
Carlos,

I have sent you a MAX2010_64/scanline file showing some of these problems.

OK, this is a very vexing problem.  I net-render an animation and when playing back the resulting video, the tree shadows 'change' in the animation.  What is changing about them?  Several things.

1.  Sometimes 'some' tree shadows within a frame completely disappear for a single frame... see the above images.  First I must track down the specific frame number that this happens on and inspect the frame compared to the other frames (very time consuming).  Sure enough... 'some' of the tree shadows are missing for just this one frame.  I have tried re-rendering from the main workstation just these frames and sometimes they are fixed and sometimes not.

2.  Sometimes 'some' tree shadows within a frame become 50% more transparent for a single frame.  If there is a single tree and it's casting only a single shadow... how does it become 50% transparent for only one frame then returns to 50% more opaque?  The materials used are 2-sided... is this a problem?  Not for all the other trees whose opacity doesn't change per frame.

3.  Sometimes the tree shadow positions move for just one frame, then return to their original positions.  This effect is a little bit less visible than the others but still annoying as I can see it happening.  The shadows sort of wiggle with motion.  This could be related to the scene precision as my scenes are usually large and rounding errors could be positioning the shadows in slightly different positions for each frame.  Still, I would love to know a way to fix it.


Here is what is happening in the scene I sent.  An aircraft flys over a mountainous matte terrain (the aircraft is not in the scene).  A camera is attached to the moving aircraft and is therefore watching the aircraft fly along.  There are FP trees on the ground below.  The FP trees are simple 3 plane trees with simple materials that are 100% self-illuminated.  There is a special light attached to the moving aircraft and the only job of this light is to cast XShadows from the trees onto the matte terrain.  The light does not shine on all the trees... only the trees near the aircraft.  The XShadow map is 10240x10240 so should be plenty big for casting decent shadows and does cast decent shadows on almost all the frames except the problem ones.

In the scene, go the Render dialog and type in a range of 7729 to 7729 and render to a file with alpha.  This will render a single frame.  Then type in a range of 7730 to 7730 and render to a file.  Compare the files in an image viewer that will let you see alpha channel (such as XnView).  By switching between the two images, you can clearly see that shadows are missing in frame 7730.  They will come back in frame 7731.  No matter what I do, I can not make the shadows in frame 7730 render properly like all the other frames.

Changing the XShadow map size to 20000x20000 does nothing to fix this problem so it's not the shadow map, and all the other trees are rendering their shadows just fine a 10240x10240.

Thanks for any ideas!

Sincerely,

Mike Truly
----------------------------------------------------------------
Truly Media
1.800.829.4990
http://www.trulymedia.com

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3319
    • iToo Software
Re: Tree Shadows Disappearing on Network Render
« Reply #5 on: May 03, 2010, 04:47:50 PM »
Mike,

I need these maps to render the scene: super_dense.map, sharper_pine.jpg and sharper_pine_o.gif. There are some plugins missed as well, but if they are free i can find them.

My first test will be to use standard shadow map instead XShadow, and convert the Forest objects to editable meshes. We need to know if this is a Forest or a Max issue. If you like, do these tests as well.

« Last Edit: May 03, 2010, 05:05:24 PM by Itoo »
Carlos Quintero
iToo Software

Mike Truly

  • Full Member
  • ***
  • Posts: 115
    • Truly Media
Re: Tree Shadows Disappearing on Network Render
« Reply #6 on: May 03, 2010, 06:02:09 PM »
Carlos,

Sorry I forgot the maps... I've attached them here.

There are several plugins but they don't participate in the render of the trees (Cebas Finalflares, RenderPassManager)... well RPM does control the render but the errors happen using the standard MAX rendering tools as well.

Thanks!
Sincerely,

Mike Truly
----------------------------------------------------------------
Truly Media
1.800.829.4990
http://www.trulymedia.com

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3319
    • iToo Software
Re: Tree Shadows Disappearing on Network Render
« Reply #7 on: May 03, 2010, 06:02:54 PM »
Hi Again,

Although i have not reproduced this problem yet, i think there is some rounding error computing the shadow map, furthermore if the light moves.

I have done some tests using raytracing shadows, getting good results and low rendering times. Please try this:

- Create a fixed direct light. You don't need to move it with the camera.
- Open the hotspot to shade the full the scene.
- Assign it for shadow casting only to the Forest objects and the terrain.
- Use "Adv.Ray Traced" shadows. Don't use the "Ray Traced Shadows" type, it's very slow.
- Assign the light in the Forest Shadows rollout.

With these settings, the alpha test renders is less than 10 sec. and the shadows look nice.
Carlos Quintero
iToo Software

Mike Truly

  • Full Member
  • ***
  • Posts: 115
    • Truly Media
Re: Tree Shadows Disappearing on Network Render
« Reply #8 on: May 03, 2010, 06:16:00 PM »
Thanks Carlos... I will give it a try.
Sincerely,

Mike Truly
----------------------------------------------------------------
Truly Media
1.800.829.4990
http://www.trulymedia.com

Mike Truly

  • Full Member
  • ***
  • Posts: 115
    • Truly Media
Re: Tree Shadows Disappearing on Network Render
« Reply #9 on: May 04, 2010, 04:56:57 PM »
OK, I tried the Raytrace method... but it doesn't work for me.  For starters, my shadow map trees have a soft shadow which is what I want.  Following the exact method described, my raytrace shadows started off at about 20 secs to render... but the shadows are ragged and harsh, not soft.  To try to adjust settings to get a softer edge sends the render times higher and higher.  In any event, this is the nature of raytracing where it might be great for someone trying to render a still image and they don't care how long it takes.  I have 5000 frames to render (on the current project) to satisfy the needs of clients (attorneys) who want it yesterday.

Anyway, I changed tactics and have made the shadows better (but not perfect).  I switched to a fixed XShadow direct light (that doesn't move) and the resulting renders have shadows that don't disappear (as much).  I changed the shadow map size from 10000 to 20000 to accomodate the larger light area needed by the fixed position light to cover the territory the aircraft traverses.

I am still working on the issue of why some shadows have different density than others.  Which brings me to my next question which I will ask in another post.

Thanks!
Sincerely,

Mike Truly
----------------------------------------------------------------
Truly Media
1.800.829.4990
http://www.trulymedia.com

iToo

  • Administrator
  • Hero Member
  • *****
  • Posts: 3319
    • iToo Software
Re: Tree Shadows Disappearing on Network Render
« Reply #10 on: May 04, 2010, 06:20:21 PM »
Hi Mike,

We have found the problem. The "texture cache" feature in XShadow is not working well.

Please, disable this option in the XShadow parameters. I'm note sure if it fails because the characteristics of this scene (high-res map with moving light) or something else... we will check the source code.

Carlos Quintero
iToo Software

Mike Truly

  • Full Member
  • ***
  • Posts: 115
    • Truly Media
Re: Tree Shadows Disappearing on Network Render
« Reply #11 on: May 04, 2010, 11:31:32 PM »
Thanks Carlos, I will look into it.

As I mentioned, there are 3 basic problems that I was seeing.

1.  Some shadows on some frames completely disappear.
2.  Some shadows on some frames change opacity.
3.  Some shadows on some frames move slightly.

When I changed to a fixed, non-moving XShadow light it seems like most of #1 was solved.  #3 might just be precision error movement.

Right now I am working on #2.  There are two issues with this.

One is, when I render against a gray background and see a bunch of trees with space between them so I can see the shadows they create, most of the shadows show as say 50% black (this is just an example) but a few of the shadows show as 85% black.  It is almost like there are 2 trees in exactly one spot and therefore the shadow density is doubled.  (It's even easier to see the difference when the XShadow Shadow Image settings in the light are set to Opaque).

The other issue is that, like the disappearing shadows, for a single frame a bunch of the shadows will drop their opacity to much less than normal.  So the opacity might be:

frame50 - 50%
frame51 - 50%
frame52 - 50%
frame53 - 25%
frame54 - 50%
frame55 - 25%
frame56 - 50%
etc.

Although the shadow doesn't entirely disappear, it becomes so faint that visually, you can see the shadows pop in the animation.  I have tried several things (including setting the shadow map size to 40000x40000) but it didn't change the problem frames.

Thanks again.
Sincerely,

Mike Truly
----------------------------------------------------------------
Truly Media
1.800.829.4990
http://www.trulymedia.com