Shadows in player mode/truePlay?

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Shadows in player mode/truePlay? // truePlay

1  |  

Post by ProfessorKhaos // Oct 5, 2006, 4:29am

ProfessorKhaos
Total Posts: 622
pic
Hi all,


This is probably covered somewhere in that thick artist's guide but has anyone been able to cast shadows in player mode or truePlay using light sources other than spotlights and projector lights? I have an application where I want to cast light from the sun on an object and I'd like the shadows to relatively accurate. If I try to use a spotlight to do this I can't place the spotlight far enough away without the shadows disappearing.


infinite light - no shadow

spotlight - shadow

local light - no shadow

projector light -shadow

sky light - no shadow (didn't really expect one here)

IBL - shadow (appears like a spot light from above, not really a useful light for player mode)

goniometric light - no shadow

area light - no shadow

Foreground Global Environment - N/A (no shadows)

Post by parva // Oct 5, 2006, 4:55am

parva
Total Posts: 822
pic
you can currently just use spot-like shadows. Means a shadow in a fixed distance. You can change the distance of this shadow as well as the resolution. A larger shadow map size (1024) will give you more accurate shadows as a low shadow map size (265), similar to hard edge shadows vs. soft shadows (but soft shadow becomes very flickering).

An infinite light shadow isn't possible yet as well as a local light shadow. Maybe in a future tS version.

For a sun like illumination you need a large map size (1024 to 2048) and a far distance but this depends on your scene and needs some tweaking (adjusting the two clipplane values far and near).

Post by ProfessorKhaos // Oct 6, 2006, 7:30pm

ProfessorKhaos
Total Posts: 622
pic
Thanks parva!


Been playing a bit with that and I think I've gotten pretty close to a scenario that will work for me in this particular app doing exactly what you mentioned above.


After discovering that I can view lights in the LE (after turning that on in prefs) I also discovered that a lot of the wiring for spotlights is also available.


Makes me wonder if there's something I can play with in there that might allow me more control over interactive lighting/shadows in the player side.


I've got a visualization project in mind and the closer to an infinite light source I can get the better.


I can see where shadow casting for an infinite light would be a heavy hit because the parallel rays are not limited in terms of the extent in the X and Y directions (assuming rays are in the Z direction). Creation of a 'parallel ray' light that was limited in extent might allow one to assign a shadow map with enough resolution packed in a small enough area that the shadows would be accurate for an infinite light source yet not too heavy of a hit performance wise.

Post by parva // Oct 8, 2006, 4:33am

parva
Total Posts: 822
pic
little addition:


try a "Directional Light" source. This one creates parallel shadows in a defined area. I hadn't know that :D

Post by ProfessorKhaos // Oct 8, 2006, 10:48am

ProfessorKhaos
Total Posts: 622
pic
Hey! That works pretty slick! Perfect for my application! I looked in the lights library before but I didn't see that one (wrong lights library...there's the one you bring up from the icons to the left and then there's the one you can bring up with all the other libraries to the right (assuming default setup).


Of course it was in the manual too (once I knew to search for directional lights).


Anyway, thank you!!!
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn