Game Development Community

Avatar's shadow

by Fyodor -bank- Osokin · in Torque Game Engine · 01/29/2006 (3:09 am) · 4 replies

Hi!
I just bought TLK.. so many possibilities with light! Cool.. great addition to TGE.

but... I have a problem. Let me show you the pic and you will get idea what I'm talking about:
www.afterworld.ru/gg/tlk_shadow.jpgIf I rotate, the shadow somehow gets cut by something (both on interriors and terrain).. It's not the bounding box, as we have it bigger then in SoldierPack. The soldier itself looks fine at the same place.
I've checked in both - stock TGE1.4 and stock TLK1.4 - everything is fine there, this problem occurs only when I merged TLK into our project. I've checked three times already to be sure, that TLK code is inplemented correctly to my project...
So.. This looks like some modifications in the code. Actualy I'm using heavily modified 1.4, but I'm sure none of my implementations are touching rendering/shadows code.

Where I need to have a look to find a problem? Or, do I need to tell my artists to check the model?

PS. when I rotate, the "cutting frame" is changing. e.g.:
www.afterworld.ru/gg/tlk_shadow2.jpg

#1
01/29/2006 (10:20 am)
If the stock TLK and TGE work fine and your internal code is not, I'm not sure I can help much. Though I can give a few ideas of the changes that *could* cause this. For instance any code that scales the player model, changes the dimensions or the center of the player box, could cause this problem.

To identify the problem code I would get a clean TLK, port your content over to it, then slowly go through the steps of adding some of your code, then testing to see if the shadows are broken, and repeating this until you find the code that causes the problem.
#2
01/29/2006 (11:04 am)
Yeah.. I was thinking of step-by-step implementation of all my changes into stock TLK.. just don't have time now..

And, what is interesting... both, the soldier (from SoldierPack) and ork are fine. It's just our model.. We made it with custom skeleton, and I've changed bone names in player.cc to match ours. Still soldier and ork fine. So, looks like it's not a point...

Hmm.. Okay. I use the same player.cs file for both models (soldier/our), just replacing the .dts/.dsq files... It IS the model and it IS my build .. together...
huh.. hope to find time in a few days to re-implement all my changes one by one to find where is the problem..
#3
01/29/2006 (11:49 am)
You might want to try experimenting with different bounding box sizes to see if the problem goes away - it should be less time consuming and may help.

Hmm, come to think of it theres a "boundingBox" property on the player data block too, you might want to adjust that as well. Honestly I'm not sure if Torque uses this value or the dts bounding box.
#4
02/01/2006 (5:19 pm)
Huh... okay.. that's really strange..
I didn't made any changes in scripts... no changes in engine code...
Our modeller send me updated avatar model (finally, he managed to export "Ground Frames") and... this bug with shadow gone! I'm really shocked. How can this two be related? ;)

About the bounding boxes.. For collision - tge uses the one you set in datablock of player. The one, that build in model - looks like it used in shadowing and something else I don't remember.. Too tired now.

Anyway, thanks for assistance John. And again, nice addition for Torque! Love it.. but still dont have spare time to play with lights yet.

edit: spl