Game Development Community

Shadowmap questions

by Gabor Forrai · in Torque Game Engine · 08/25/2003 (11:06 am) · 12 replies

Ive trying to learn more about the RELIGHT switcher
in my TGE experience, and i see that only INTERIOR like objects can casting a shadowmap into itselfs, and to the terrain.
Interior objects are DIF files, and shape files are DTS. So there wasnt any shadowmap around casted by DTS's only the DIFs did it.

My question is that, what is the difference between a DIF and a DTS 3d objects, why the DTS cant do it, and how its possible to generate shadowmaps for DTS with those RELIGHT switcher ?

Thanks for reading

G.

#1
08/25/2003 (4:49 pm)
You can get the DTS to generate shadows; I think there is a resource available to do this. You just need to get the shadow code to take that model data into account.
#2
08/26/2003 (6:25 am)
Thanks Ben, but I didnt find any resources on this topic, anyone can help ?
Any experience with shadows on DTS ? :)
#3
08/26/2003 (6:28 am)
Thanks Ben, but I didnt find any resources on this topic, anyone can help ?
Any experience with shadows on DTS ? :)
#4
11/02/2003 (1:01 pm)
GenerateShadow = true;

In the shapebase datablock.

You could change it in shapebase.cc line 776

currently default is:

mGenerateShadow = false;

just chnage it to true.
#5
11/15/2003 (4:36 am)
Anyone can to give a tip, where is located the brightness of the casted player-shadow ?
Its still looks like the shadowparameter is not connected for the ambient light,- or sun parameters. I wanna a MUCH stronger casted shadow with players, something similar like the darkness of shadows in Marble Blast.
#6
11/15/2003 (5:00 am)
The marble blast shadows were done using stencil buffer shadows I believe. Not the same as the one for the DTS shadows.

Phil.
#7
11/15/2003 (11:06 am)
You probably need to edit shadow.cc if you want to make the shadows darker.
#8
11/15/2003 (2:08 pm)
Actually, it's in bitRender.cc at line 632. It's even nice and documented :)

// These macros currently define how black the shadows get
// Set the shift factor to zero results in totally black
// shadows.  Be nice to have this dynamic...
#define SF(x)           ((x) >> 2)
#define SF32(a,b,c,d)   {SF(a),SF(b),SF(c),SF(d)}

In experiementing with it, I've had great success in changing the define for SF to

#define SF(x)           ((x) * .75)

It creates a nice dark shadow. The closer you get to 1, the darker the shadow.
#9
11/17/2003 (12:40 pm)
@Joe
Thank you mate, its working nice :)
**
I have now only one more question here. The player character isnt casting shadow
for the DTS. Its a complex dungeon, but its floor havent got any of the nice -and now dark- shadow on, any of the player like characters.
Someone have a tip on the solution ?
#10
11/17/2003 (1:19 pm)
Is the dungeon a DTS?
#11
11/18/2003 (4:46 am)
@Ben
Yes, its a DTS just for the reason of the high detail on it. Its have an environmental mapping on the floor, but with or without this multitexture, its havent got casted shadow on it by the players.
And NO, i dont wanna to use DIF instead of DTS.. :)
#12
11/18/2003 (5:40 am)
@Ben
Yes, its a DTS just for the reason of the high detail on it. Its have an environmental mapping on the floor, but with or without this multitexture, its havent got casted shadow on it by the players.
And NO, i dont wanna to use DIF instead of DTS.. :)