Baking a 'dynamic' shadow - possible?

Discussion in 'Mapping Questions & Discussion' started by Riever, Sep 5, 2012.

  1. Riever

    Riever L2: Junior Member

    Messages:
    86
    Positive Ratings:
    0
    Dear all,

    If you name a light you can turn it on and off. But is there anyway of doing something similar for a shadow?

    My map has a ufo on it that casts a large shadow from the env_light (sun). Thing is the ufo is not always there, so should not always cast a shadow.

    Eventually the ufo will have a number of lights on the base and so what I would like to try and do is build the area of the map affected by the ufo's shadow twice. Once for when it's around and once for when it's not and then somehow switch the lighting between them.

    The only idea I have so far is to add a massively bright spot light somewhere on the map and toggle this, but I suspect this will just look odd.

    Is this possible? :confused:
     
  2. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,557
    Dynamic shadows and lightmap shadows are completely different processes. One is a post-process calculated ingame in real time (dynamic) and one is a material layer rendered during the game having been computed in the compile process. They appear vastly different in appearence too and dynamic shadows have a habit of overlapping.

    You can have a dynamic shadow rendered from the UFO that will turn on and off if the UFO is also dynamic. But it'll probably look... not good.

    For what you want to achieve though you might want to create a pseudo sun under the UFO that turns on and off.
     
    • Thanks Thanks x 1
    Last edited: Sep 5, 2012
  3. henke37

    aa henke37

    Messages:
    1,834
    Positive Ratings:
    420
    I don't think that "post-process" is the correct term, that is generally reserved for effects done on the rasterized 3d render, not during said rendering.
     
  4. Riever

    Riever L2: Junior Member

    Messages:
    86
    Positive Ratings:
    0
    Hi,

    Many thanks for the advice. Unfortunately I cannot get the UFO to render a shadow at all at present.

    [​IMG]

    Its made up of dynamic objects (prop_dynamic) and toggled on and off using a point_template.

    For some reason vrad is rendering the scene with it missing - hence no shadow. Does anyone know how I can force the ufo to be present during the vrad render?

    Many thanks in advance.
     
  5. Mr. Happy

    Mr. Happy L6: Sharp Member

    Messages:
    320
    Positive Ratings:
    144
    As a dynamic it casts shadow_control shadows, so you will need to place shadow_control and adjust it's angle to face down.
     
    • Thanks Thanks x 1
  6. Pocket

    aa Pocket func_croc

    Messages:
    4,480
    Positive Ratings:
    2,213
    Or more realistically, to face the same way as normal shadows. And use roughly the same color as the "ambient" lighting in the light_environment.
     
    • Thanks Thanks x 1
  7. Riever

    Riever L2: Junior Member

    Messages:
    86
    Positive Ratings:
    0
    Many thanks for the info on shadow_control. Thing is I already have one of these set as;

    Name - blank
    Pitch etc - 0 300 0
    Colour 128 128 128
    Max distance 75
    All shadows disabled - no

    Do I need to extend the max distance, or do I need to add another controller and somehow join this to the UFO?
     
  8. Riever

    Riever L2: Junior Member

    Messages:
    86
    Positive Ratings:
    0
    Hmm, well this is odd. I made the Max distance 750 then 75000 and still no shadow.

    I am confused.

    The UFO was made with propper using a set of cylinders that were made hollow. I then cut it up as the collision meshes were not allowing players to enter when it was a full 360 degree model.

    Do I need to do anything with the propper model to get it to create a shadow?

    Thanks in advance.