Page 1 of 1

moving decal not drawing fully

Posted: Tue Aug 06, 2019 7:54 pm
by bayoubengal
Image


I'm seeking to use decals in a stage lighting simulation. I want to use the decal to draw a representation of a pool of light on the floor. I'm finding that the decal is failing to draw on certain tiles as I pan and tilt the light fixture around the floor.

In the image,you can see the rectangular decal fail to draw on some tiles. I'm using "floor_bump.png" and "floor_diffuse.png" as is done in the Sample_decals project for the decale.


What might I be doing wrong or need to adjust?

Re: moving decal not drawing fully

Posted: Tue Aug 06, 2019 10:31 pm
by dark_sylinc
Try enabling the debug facilities to see the actual shape of the decal's box, which can be very helpful for debugging.
The red box is the area of influence of the decal, the yellow plane is the actual decal plane that's being projected around the box.



Look for 'mDecalDebugVisual' and 'DecalsGameState::attachDecalDebugHelper' in Samples/2.0/ApiUsage/Decals/DecalsGameState.cpp

I'm not sure if that snippet was added in 2.2 or 2.1. If it's not in 2.1 branch, look in the 2.2's samples, that code should on both versions.

Cheers
Matias

Re: moving decal not drawing fully

Posted: Thu Aug 08, 2019 2:56 pm
by bayoubengal
thanks. will do.