POV-Ray : Newsgroups : povray.general : Separate shadow and object layers : Re: Separate shadow and object layers Server Time
8 Jul 2024 12:11:42 EDT (-0400)
  Re: Separate shadow and object layers  
From: posfan12
Date: 25 Jun 2014 16:00:00
Message: <web.53ab2981fa876566bdbe52210@news.povray.org>
Never mind, guys. I was over-thinking the problem.

What I did was:

1. Render the scene normally but without a floor.
2. Then re-render with a basic white floor, and show shadows /only/.
3. In GIMP I then used the "Color to alpha" command with the image in step #2 to
create the shadow layer with lots of transparency.
4. In GIMP add the image in step #1 as a new layer to #2.
5. In GIMP flatten the image and save/export as PNG.

The result is this:

http://i421.photobucket.com/albums/pp292/SharkD2161/LDraw/datsville_overlay_shadow_test_zps8b7f1183.png

but larger.

The game characters can now walk "underneath" the shadows. There are places
where this method fails somewhat, and the characters themselves don't cast
shadows. But that's the best it is going to get unless you switch to a real-time
3D game engine.

Thanks!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.