POV-Ray : Newsgroups : povray.general : Separate shadow and object layers : Re: Separate shadow and object layers Server Time
8 Jul 2024 12:35:03 EDT (-0400)
  Re: Separate shadow and object layers  
From: Le Forgeron
Date: 25 Jun 2014 11:53:23
Message: <53aaf073$1@news.povray.org>
Le 25/06/2014 17:17, posfan12 nous fit lire :
> I'm rendering an orthographic scene for a video game. I would like there to be
> separate object and shadow layers. I.e. one image for all the objects in the
> scene, minus shadows, and another image with shadows only. What is the best way
> of going about doing this?
> 
> Right now I have one scene where all the objects are painted white and shadows
> are turned on, and a second scene with all the objects painted normally but
> shadows turned off. Is this the best way?
> 

If it works for you, it's a good way. Just wondering how you turn off
the shadow on second image: with +Qx (x <4), it also turns off patterned
texture, extended light, photons, refracted & transmitted rays and
media, radiosity and sslt.

For the shadow only image, you might want to have a look at the no_image
(and maybe no_reflection) as object modifier.

For the objects without shadow, there is the no_shadow object modifier.

> http://wiki.povray.org/content/Reference:Object_Modifiers

You could use the animation subsystem and a macro like

#macro WHATPART()
#if (clock > 0)
 no_image
#else
 no_shadow
#end
#end

with your objects calling WHATPART like:

sphere{ center, radius WHATPART() ... }


-- 
IQ of crossposters with FU: 100 / (number of groups)
IQ of crossposters without FU: 100 / (1 + number of groups)
IQ of multiposters: 100 / ( (number of groups) * (number of groups))


Post a reply to this message

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