Sun blocking mesh?

Discussion in 'Track Modding' started by Jorgen, Nov 11, 2012.

  1. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
  2. Johannes Rojola

    Johannes Rojola Registered

    Joined:
    Sep 8, 2011
    Messages:
    1,038
    Likes Received:
    38
    I tried it once, did not work... Maybe it still can be made somehow.
     
  3. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    I'll give it a shot and see if I can get it to work.
     
  4. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    Nope, nothing that I tried works even the slightest bit. I added a huge box below the track mesh and tested both with it set as ShadowObject and as ShadowCaster, but in both cases the sunlight passed right through as if it wasn't there. Even conventional shadow objects on the track do not always block the sun, so I'm starting to believe this is indeed a bug after all. Or is there some magic material property that has to be set for something to always block the sun?

    Hopefully someone from ISI can help us out here.
     
    Last edited by a moderator: Nov 12, 2012
  5. Abriel Nei

    Abriel Nei Registered

    Joined:
    Aug 7, 2012
    Messages:
    714
    Likes Received:
    37
    If I understand the post from Joe (in the other thread that you posted link to) correctly this will be done automatically for every track. Or maybe it will depend on the modder but either way it is not done yet (so you probably can't do nothing about it).
     
  6. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    I would appreciate if someone from ISI could clarify exactly what needs to be done, or if it will sort itself out automatically.

    Thanks.
     
  7. racechicken

    racechicken Registered

    Joined:
    Sep 27, 2011
    Messages:
    53
    Likes Received:
    1
    the terrain gmt´s as shadow caster? Is that possible?
    Just an idea and not tested but maybe a little bit to much for good fps. (if it works)
     
  8. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    I think we had this discussion before, with K explaining the "obvious" sun-blocking mesh solution in some detail.
    You wouldn't use a 1:1 copy of your existing terrain. You can use a much lower-res mesh that approximates your terrain from below/the sides. Also note that the orientation of the polys must be such that they block the sun when it's coming from below/the outer side, i.e. usually the other way around from the way your terrain is set up (or you wouldn't need the extra mesh in the first place).
     
  9. Tosch

    Tosch Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,872
    Likes Received:
    51
    You can build a custom hdr profile for the track and set the Sky T Lum value to zero when the sun is below the horizon. I hope ISI will implement this in the near future.

    [​IMG]
    [​IMG]
     
  10. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    Wow, that's a good tip! Thanks for sharing. :)

    EDIT: What would that parameter correspond to in the .hdp file?

    Snippet from a stoch HDR profile: (64950 is a little after 18:00, so I guess this implies "hardcoding" when the sun sets?)
    Code:
    [Element]
    SkyType=Bright
    StartET=64950.0000
    AdaptET=0.2500
    Luminance=0.0000
    WhitePoint=6.0000
    BlackPoint=0.0000
    MiddleGray=1.0000
    PostGamma=2.6000
    ShadowDiffusion=-0.2000
    LocalCloudIntensity=0.2500
    SunTransLum=0.1500
    SunScatrLum=0.6000
    MoonTransLum=0.1500
    MoonScatrLum=0.6500
    UseBloom=0
    BloomWhitePoint=2.0000
    BloomThreshold=0.5000
    BloomOffset=0.0000
    EDIT 2: After a bit of reading, it has to be the SunTransLum parameter. Giving it a go now.
     
    Last edited by a moderator: Nov 18, 2012
  11. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    I cannot seem to get my HDR profile to become active. I was under the impression that the file name has to be <name><identifier>_CLEAR.HDP and so on, so I named mine so that <name> matches the layout name at the very top in the .gdb file, and I chose "REALISTIC" as <identifier>, but it had no effect at all. Where is the file supposed to go? (Mine's in one of the track .mas files, just like in the stock tracks)
     
  12. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    Check out my older post: LINK - especially the last picture.

    I've described why one big box doesn't work and how you can solve it with enclosing smaller portions of terrain.
     
  13. Tosch

    Tosch Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,872
    Likes Received:
    51
    Custom profiles do not work in game as far as i know. That's why i wrote that i hope they will implement this feature soon, but custom profiles work in dev mode.
    Check this post from Joe Campana.
    http://isiforums.net/f/showthread.php/2872-rF2-screen-shots?p=113135&viewfull=1#post113135
     
  14. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    That's the one I was referring to. That technique should definitely work with the current state of the sim.
     
  15. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    Sigh... Oh well, thanks for the heads-up anyway. I won't spend more time on that for now then. Brilliantly simple idea though, whenever it will be possible.

    About that mesh: I still don't really get why a big box wouldn't work in my case, since the terrain is almost dead flat, but I guess I have to take your word for it. Would a series of reasonably high walls underneath the terrain do the job? (all facing the direction from which the sun sets) Would the wall need to be a box structure in itself, or will a rectangle with a double sided material do?

    Silly question: If the terrain materials were double sided and the terrain objects set as shadow casters, would that do? (I guess not, that would be far to simple, right? :))
     
  16. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    Well, a wall with a double-sided material made no difference at all. However, while testing, I noticed that this might be a rendering issue. As soon as I approach an incorrectly lit object, the neon orange/red color gradually disappears until it's gone. Can this be a shadow distance rendering thing? Is there any way the shadow distance can be altered? I have tried the old MaxShadowRange parameter in the .scn file, but that had no effect at all.
     
  17. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    Sorry for the bump, but does anyone know if the shadow drawing distance can be extended? (If not, I don't think there is any way to block the light from the sun once it has dropped below the horizon at the moment)
     
  18. ethone

    ethone Registered

    Joined:
    Nov 30, 2011
    Messages:
    1,153
    Likes Received:
    37
    K mentioned one workaround: Don't use one big mesh but split it up into several smaller ones.
     
  19. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    I did, but it won't work anyway since the shadows cast onto the trackside objects do not render when seen from a distance, so the far away buildings are still neon red... Catch 22 it seems, at least for now?
     
  20. Jorgen

    Jorgen Registered

    Joined:
    Oct 5, 2010
    Messages:
    558
    Likes Received:
    3
    I'll give this one a final bump before I give up. Does anyone know if the shadow rendering distance can be extended? ISI? Right now shadows progressively fade in as you approach objects being shadowed which I guess is for performance reasons, but in this case it sort of works against the whole sunblocking mesh idea...)
     

Share This Page