lighting-dynamic

Posted By: DAVIDMORETON

lighting-dynamic - 10/27/09 11:33

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
Posted By: rvL_eXile

Re: lighting-dynamic - 10/27/09 15:39

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
Posted By: DAVIDMORETON

Re: lighting-dynamic - 10/27/09 17:04

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
Posted By: xXxGuitar511

Re: lighting-dynamic - 11/07/09 19:24

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.
© 2024 lite-C Forums