Game Development Community

[T3D BUG]Wrong decal geometry

by Ivan Mandzhukov · in Torque 3D Professional · 10/22/2009 (3:42 pm) · 5 replies

img243.imageshack.us/img243/2371/decal.jpg
Shadow projector doesn't take in account rendertransform operations.
This way the shadow gets rendered a few distance away from the player.

Shadow only works well on un-rotated objects.
In the picture above,the player is rolled 30 degrees.
Player's feet are actually touching the ground within a special controller,but shadow is a meter away from the real boxcenter position.

Clipped geometry seems to be right for me,but i am not acquainted how to recalculate the new render position.

#1
10/24/2009 (2:33 pm)
Anyone ?
DecalManager clips well.
I think there is something wrong with mWorldToLight transform.
This is a pretty nasty bug.
I remember Tom Spilman said this code needs a few optimizations.
Will this one be fixed in T3D 1.1 ?
#2
10/24/2009 (2:56 pm)
I cant help with this issue Picasso,

but what is this "special controller" you mention?
#3
10/24/2009 (4:06 pm)
It is solver for the steps,it aligns the feet with the ground.
Some sort of IK solver.

This bug presents in all the betas,T3D 1.0 and T3D 1.01.
The curious thing is that TGEA is using almost the same shadow idea and it works perfectly.It takes in account all render transform operations,all animation within a setdirty flag.
Right now am not sure if T3D shadow will render correctly all the time.
I need to spent more time on the shadow projector.
Moving the boxcenter Z position is helping a lot,this can work for me,but i am not sure it will work for everyone,because i am rotating my shapes a bit,but if someone try to create a spider AI,that climbs on a wall,i am sure its shadow will be created a least 2 meters away from its real place.
This is not a working solution for me.
#4
10/24/2009 (4:40 pm)
sorry to hijack you, but is this solver freely available?
#5
10/28/2009 (11:11 am)
[EDIT:RESOLVED]

I found the error in the transformation.
I will not write the solution,because this is a private solution and it works for me,i am not sure it will work for everyone.
This is not a T3D bug,because in stock T3D player is not intended to rotate in XY.

If someone else fall in my situation,feel free to email me.