moving decal not drawing fully

Discussion area about developing with Ogre2 branches (2.1, 2.2 and beyond)
Post Reply
bayoubengal
Halfling
Posts: 45
Joined: Wed Sep 05, 2018 3:18 pm

moving decal not drawing fully

Post by bayoubengal » Tue Aug 06, 2019 7:54 pm

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?
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 4034
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 214
Contact:

Re: moving decal not drawing fully

Post by dark_sylinc » Tue Aug 06, 2019 10:31 pm

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
0 x

bayoubengal
Halfling
Posts: 45
Joined: Wed Sep 05, 2018 3:18 pm

Re: moving decal not drawing fully

Post by bayoubengal » Thu Aug 08, 2019 2:56 pm

thanks. will do.
0 x

Post Reply