sebastian.vesenmayer Posted October 15, 2018 Share Posted October 15, 2018 (edited) Hi, is it possible to turn off shadow receiving for some objects? Thanks, Sebastian Edited October 15, 2018 by sebastian.vesenmayer Link to comment
silent Posted October 15, 2018 Share Posted October 15, 2018 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: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
sebastian.vesenmayer Posted October 15, 2018 Author Share Posted October 15, 2018 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
silent Posted October 15, 2018 Share Posted October 15, 2018 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: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Greg.Mildenhall Posted October 15, 2018 Share Posted October 15, 2018 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
silent Posted October 16, 2018 Share Posted October 16, 2018 Hi Greg, These states are no longer exists for mesh_base. Only clouds/particles materials should have these states now. We'll update docs to cover these changes. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Greg.Mildenhall Posted October 16, 2018 Share Posted October 16, 2018 (edited) 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 October 16, 2018 by Greg.Mildenhall Link to comment
silent Posted October 16, 2018 Share Posted October 16, 2018 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: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Greg.Mildenhall Posted October 16, 2018 Share Posted October 16, 2018 We don't have any need for this currently. I was just suggesting a way @sebastian.vesenmayer might be able to achieve it without having to modify any shaders. Link to comment
Recommended Posts