Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (VoroneTZ, vicknick), 802 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
lighting-dynamic #295750
10/27/09 11:33
10/27/09 11:33
Joined: Jan 2005
Posts: 282
devon UK
D
DAVIDMORETON Offline OP
Member
DAVIDMORETON  Offline OP
Member
D

Joined: Jan 2005
Posts: 282
devon UK
Hi Folks,
I have 3DGS 7.8, coding in c_script and the lighting engine is not doing its stuff!
I have 12 dynamic lights and the engine should switch off those above 8 when not in view. This does not happen. 2 are switched off all the time as I move throught the level.

What am I doing wrong please?

David, in hope of help

Re: lighting-dynamic [Re: DAVIDMORETON] #295783
10/27/09 15:39
10/27/09 15:39
Joined: Apr 2005
Posts: 3,076
Germany, NRW
rvL_eXile Offline

3D Artist
rvL_eXile  Offline

3D Artist

Joined: Apr 2005
Posts: 3,076
Germany, NRW
maybe its a limitation of your Engine Version (Commercial ( extra / pro)... You have to script a sulution, to "fix" this...
Example...
Switch all Lights on, 500quants near player, else switch lights off...

cYa Sebastian


Tutorials:
[Blender]Terrain creation ENG/GER
[Blender]Low Poly Tree Modeling
[GIMP]Create a Texture for Terrains
CLICK HERE


Re: lighting-dynamic [Re: rvL_eXile] #295797
10/27/09 17:04
10/27/09 17:04
Joined: Jan 2005
Posts: 282
devon UK
D
DAVIDMORETON Offline OP
Member
DAVIDMORETON  Offline OP
Member
D

Joined: Jan 2005
Posts: 282
devon UK
Thanks rvl_eXile,
re problem above - I have com. version. Been through manual for data on "light manager" as mentioned in the manule, but can't find it.

Not sure what you mean by "scripting it" How do I do, that?

David

Re: lighting-dynamic [Re: DAVIDMORETON] #297488
11/07/09 19:24
11/07/09 19:24
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
One way to control this, is have a model for each dynamic light. Make this model a sphere that has a radius of 100 quants. For the light, have an action similar to this:

note: been a while since I've used GS, so the syntax is probably off...

Code:
action d_light()
{
    my.red = 200;
    my.green = 200;
    my.blue = 200;
    my.lightrange = 0;
    set(my, PASSABLE | INVISIBLE);
    //
    var range = 800;
    var scale = range / 100;
    vec_set(my.scale_x, vector(scale, scale, scale));
    //
    while (my)
    {
        if (is(my, CLIPPED))
        {my.lightrange = 0;}
        else
        {my.lightrange = range;}
        //
        wait(1);
    }
}




The sperical model is supposed to represent the extent of the lights range. When the model is not visible on the screen, then the light will not be visible on the screen, so the light will be turned off.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1