Jump to content

Turning off shadow receiving


photo

Recommended Posts

Hi Sebastian,

Did you have chance to look at the Shadow Masks? https://developer.unigine.com/en/docs/2.7.2/principles/bit_masking/#shadow_mask

I'm afraid that's the only method to control shadows casting. Due to deferred rendering pipeline there is no simple and performance friendly way to achieve this (to no receive shadows from certain objects).

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Hi silent,

yes I already did this, but it disables only the shadow casting.

Am I able to do this with a custom shader?

For my use case right now it is sufficient to enable emission, so my object will not be shadowed.

Thanks

Link to comment

Hi Sebastian,

Quote

Am I able to do this with a custom shader?

I'm afraid no, this is general limitation.

 

Quote

 For my use case right now it is sufficient to enable emission, so my object will not be shadowed.

Emission approach can do the job (assign albedo texture to the emission slot, change albedo color multipler to black), but you will need to control emission scale parameter if you have darker scene (for example, sunset or during the night).

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

The Editor panel only has Cast Shadow and Cast World Shadow options, but the Material File Format documentation also lists receive_shadow and receive_world_shadow as options. I've never tried them, but they sound like what you're after.

Link to comment

That's a shame. Is there a way to use a derived (forward-lit) material with the shadow map set to a blank texture?

Edited by Greg.Mildenhall
Link to comment

Hi Greg,

In theory that can be achieved by rendering such objects into special buffer and then using it as a mask for shadows rendering (for example, you can use Material Mask texture for that, so performance will be almost the same). So, per project it can be done by modifying the shaders (material mask texture can be used here shaders\screen_space\fragment\light\deferred_light.frag and then applied as mask in shadows calculation for required lights type here core\shaders\common\light).

I've added this feature request for the future releases with a minor priority at this time.

@Greg.Mildenhall @sebastian.vesenmayer If you also can describe a typical use-case for that feature  - it would help a lot (what objects are mostly uses this, which light types are affected). Emission approach seems to do that very well (and performance friendly), the only drawback is some additional logic required if you have heavy usage of day-night cycle.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment
×
×
  • Create New...