Shadow - does this increase track perfomance???

Discussion in 'Track Modding' started by sergioloro, Aug 31, 2012.

  1. sergioloro

    sergioloro Registered

    Joined:
    Oct 17, 2011
    Messages:
    190
    Likes Received:
    4
    hi all!!
    i am working with a track and i want to learn some stuff about shadow.
    if i had a 3d model (first picture) and i want to represent a shadow on track, it is better to create a single plane with a texture that represent object 2d and set this object to represent shadow (with render = false )?

    does this help with track perfomance??? i had something like 30 objects like this on my track, it worthwhile do this stuff???
    thanks in advance

    sergio loro
    View attachment 3799 View attachment 3800
     
  2. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    In most cases, this will result in worse performance as you will have to use a 'Textured' shadow caster. This means the graphics engine will run more complicated code to process the single plane (it needs to test the alpha channel to figure out which parts need to cast a shadow).
     
  3. sergioloro

    sergioloro Registered

    Joined:
    Oct 17, 2011
    Messages:
    190
    Likes Received:
    4
    thanks a lot, nice to learn something new every day!!
     
  4. DmitryRUS

    DmitryRUS Registered

    Joined:
    Apr 17, 2011
    Messages:
    439
    Likes Received:
    47
    Question. How to make shadow contrast without HDR.
    [​IMG][​IMG]

    How to make a reflection of the boards along the relief road, the slopes
    [​IMG]
     
  5. DmitryRUS

    DmitryRUS Registered

    Joined:
    Apr 17, 2011
    Messages:
    439
    Likes Received:
    47
    Hurrah! I made the contrast of the shadows!
     
  6. Slimjim

    Slimjim Registered

    Joined:
    Oct 5, 2010
    Messages:
    122
    Likes Received:
    2
    how do you make the shadows darker.?
    in the game they are very light, i am not using HDR
     
  7. MaXyM

    MaXyM Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,774
    Likes Received:
    29
    HDR makes it darker.
    Ahh found that Dmitry probably knows a solution.
     
  8. DmitryRUS

    DmitryRUS Registered

    Joined:
    Apr 17, 2011
    Messages:
    439
    Likes Received:
    47
    [​IMG]
    [​IMG]
    Это работает не корректно, это моё заблуждение( ...
    Я сделал темнее Ambient: . В итоге, выключенный HDR, темнеет текстура Ddiffuse.
    [​IMG]
     
  9. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    First of all, set shadow diffusion do 0.0. Values other than 0.0 are messing with your shadows. This is probably meant to make shadows gradually dissapear during bad weather, but unfortunately it's set to 0.25 by default in DevMode.

    Then play with Sky T Lum and Sky S Lum parameters to adjust strength of ambient and directional lighting. Note that this will also affect brightness of sky.

    I find sky too dark relative to ambient light strength, but I wouldn't recommend decreasing ambient color in your materials as Dmitry did. You may find yourself in bad situation when lighting in rF2 changes again.

    So, use the standard parameters (shadow diffusion and sky lum) but don't do any tricks like ambient color in material. It won't be perfect, but should be good enough for now.



    One more problem is that ambient lighting is grey during daytime. Since it represents both light coming from nearby objects as well as light coming from sky, it should be a bit more blue-grey, since sky plays a big part here.
    To acheive that now, you would have to shift ambient color in materials towards blue, but that would be a workaround, and like I said - I wouldn't recommend developing workarounds until gold.
     

Share This Page