Game Development Community

Casting shadows question.....

by steven pearce · in Torque 3D Beginner · 01/13/2010 (10:39 am) · 22 replies

The ONLY object that casts a shadow is the player, Gideon. NONE of the included objects nor any of my Lightwave collada exported objects cast shadows!? Any ideas/suggestions....?
Steve
Page «Previous 1 2
#1
01/13/2010 (11:45 am)
Are you using basic lighting by any chance? Only players cast (fake) shadows in BL, that's why it's called basic.
#2
01/13/2010 (3:02 pm)
Yes, I read a previous post about basic and advanced lighting, but there does not appear to be a differentiation between the two. How will I be aware as to which "setting" is enabled?
#3
01/13/2010 (3:06 pm)
Sorry, Steve. I should have added that the Lighting drop down which offers the choice of Basic or Advanced does not change when Advanced is selected....
#4
01/13/2010 (3:29 pm)
Do you have really old hardware? Are you on a Mac? (I don't think they support AL - Apple make crap video drivers ... apparently)

Do you have sun set to cast shadows? (tickbox on sun/scattersky object)

$pref::lightManager will tell you what it's set up for (AL or BL). in game/scripts/client/prefs.cs

Also, depending on hardware and how your PC is feeling, you might have to restart the app to get the change working correctly.
#5
01/13/2010 (3:47 pm)
Both tickboxes are checked.
It is set to basic, but the following is also within the prefs.cs file;

$pref::defaultLightManagers = "Advanced Lighting\nBasic Lighting";



MacBook Pro
Processor Name: Intel Core 2 Duo
Processor Speed: 2.4 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 4 MB
Memory: 2 GB

NVIDIA GeForce 8600M GT:
#6
01/13/2010 (4:07 pm)
Before buying T3D I did read that there were some advanced lighting issues with Macs....what I did not imagine was that the issues would involve basic shadows!
I've worked in Lightwave3D for 15 years and I take shadows for granted. Being completely new to T3D and game engines, my astonishment regarding the lack of basic shadows on a graphics intensive platform may be due to ignorance. BUT; C'MON!!!!
So, what, if any, is the work-around?

Unrelated issue; is it possible in some pref file somewhere to permanently alter the default camera speed?

#7
01/13/2010 (6:56 pm)
Default camera speed? Turn or forwards speed?
For turning speed either change getMouseAdjustAmount() in scripts/client/default.bind.cs or change $pref::Input::LinkMouseSensitivity in prefs.

No idea about momentum/forward speed.
#8
01/13/2010 (8:02 pm)
In the tool bar next to the Toggle Camera Mode is the word Camera....that has a drop down that defaults to 100. When moving around the World Builder, the speed 100 is way too fast. I bring it down to 5....I would like to make 5 the default.
Thanks for your help on both issues....
#9
01/13/2010 (9:22 pm)
Quote:Before buying T3D I did read that there were some advanced lighting issues with Macs....what I did not imagine was that the issues would involve basic shadows!
I've worked in Lightwave3D for 15 years and I take shadows for granted. Being completely new to T3D and game engines, my astonishment regarding the lack of basic shadows on a graphics intensive platform may be due to ignorance. BUT; C'MON!!!!
So, what, if any, is the work-around?

The difference here is rendered shadows versus real time rendered shadows, shadowing is a bit more complex in a game engine than in a program like Lightwave etc. Remember this engine is primarily a directx engine ported to a mac, which means you have to use GLSL instead of HLSL, for a better discussion on the limits of torque on a mac check this thread out
#10
01/14/2010 (5:54 am)

Note about shadows in BL: Projected shadows do work on other shape objects such as items and not just on the player shape.

For shadowing static level geometry, one would need to use lightmaps.

My personal opinion: on the Mac, the *only* option if one really wants an engine with real-time shadows, is to choose an engine with a classic forward renderer employing stencil shadows and/or shadow maps. I think, stencil shadows rather suck but they are better than no shadows at all.
#11
01/14/2010 (9:08 am)
Thanks, Kenneth, I did see that earlier post about the Mac update.

FIXME: I completely agree on the use of Macs, howeve, in this case how do I go about utilizing lightmaps for shadows in BL mode?
#12
01/14/2010 (11:47 am)
To posters; there is a HLSL2GLSL converter for the Mac. Does anyone know how it would be implemented?

Also, with my GEForce video card and Snow Leopard OS, I have OpenGL 2.0 available....when, then, am I still not able to select Advanced Lighting?
#13
01/16/2010 (7:12 am)
Re lightmaps:

Just have a second UV channel on your meshes and stick the lightmap textures into the lightMap slots of the respective stages in your materials.

How you generate the lightmaps depends a little on how you create these meshes in the first place.

I experimented with baking modo GI lighting out into lightmaps some time ago. Unfortunately, turned out that while baking in modo generally rocks, baking out GI is hopeless (maybe it changed with 401).

Re AL:

It's less a question of whether the hardware and the theoretically implemented OpenGL specification could handle AL on the Mac, but more a question of whether the drivers that Apple puts in place actually can do it in practice. And alas, they can't.

In fact, any statement from Apple's side that they are supporting OpenGL x.y or anything relating to that, I take for crap.

Did some GLSL work a while ago and tried to use GLSL 1.2. As such no problem on the Mac, only that it pretty quickly became apparent that Apple had arbitrarily chosen what to implement of the standard and what not.

The HLSL2GLSL converter is probably useful in general. Not with a Mac, though.
#14
01/16/2010 (7:21 am)

Kind of off-topic thing about graphics and Mac in general:

Remember that I read some time ago that id will be rolling out Rage on the Mac--even concurrently with the Windows version. If that really happens, I'm sure Apple will go out of their way to cater to id's needs and fix and workaround stuff that id has trouble with.

While in essence this sort of sucks (reminds me of ATI only fixing those bugs in their crap OpenGL drivers that show up in high-profile games), it could at least potentially have the side-effect of leading to *some* improvements in the OpenGL stuff on the Mac.
#15
01/16/2010 (12:27 pm)
Thanks much......regarding Mac and the issue; it is what it is, but it also is disappointing.
#16
01/17/2010 (1:27 pm)
I have heard from a few sources now that Apple really messed up with their "OpenGL" support in OSX which pretty much echoes what Rene is saying. It's unfortunate that the standards org hasn't come down on Apple about it.
#17
01/17/2010 (1:43 pm)
True, but, again; it is what it is and we (I) have to figure out the best way to get around it or through it.
Cheers, and thanks everyone for your help!
#18
01/17/2010 (3:54 pm)
Quote:
My personal opinion: on the Mac, the *only* option if one really wants an engine with real-time shadows, is to choose an engine with a classic forward renderer employing stencil shadows and/or shadow maps. I think, stencil shadows rather suck but they are better than no shadows at all.

I thought torque3d used deferred rendering only for advanced lighting and that basic lighting uses a standard forward renderer. Is this correct? Your statements seems to suggest that T3D doesnt use forward rendering even in basic lighting.
#19
01/17/2010 (4:03 pm)
Quote:if one really wants an engine with real-time shadows

(Shamelessly quoting myself)

BL indeed uses a forward rendering approach. The fact that it's significantly simpler than AL is what ensures it's running on the Mac. One could even hook up the shadow map code that's already there in Torque for AL to get real-time shadows in BL, I think.

The problem is that with the Mac it stops there. There is no engine (at least no quality one that I'm aware of) at the moment that's running a deferred renderer on the Mac.

C4 seems to be the engine pushing the Mac most at the moment and it uses a classic forward renderer with stencil shadows and shadow maps.
#20
01/17/2010 (4:09 pm)
You all speak of "stencil shadows"and "shadow maps"? How are they achieved?

Also, does ANYONE have any suggestions for learning material for T3D? I am so horribly lost and find the existing documentation a bit lean!
Page «Previous 1 2