Road reflection problem

Discussion in 'Track Modding' started by Nuno Lourenço, Jun 10, 2014.

  1. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,010
    Likes Received:
    1,071
    Apologies.

    Remember, the wiki I linked relies on community input. If you find something useful, add it to the relevant section for others. :)
     
  2. SPASKIS

    SPASKIS Registered

    Joined:
    Sep 7, 2011
    Messages:
    3,155
    Likes Received:
    1,426
    Your reply was excellent and my intention is to put it in clean in case you wanted to update track technology document. What I mean is that it is just unacceptable that something as real road is not properly documented where it should be. Assuming that we need to dive throughout the whole forum to look for answers is not right. I don't know other people's experience but I typically find it quite hard sometimes to find a thread that I know it exists.

    It is completely astonishing that even seeing that the OP is trying to folllow all available information he can find he still is unable to configure real road. He talks about track technology document being outdated and nobody seems to care about it except for myself.

    However you and some other people seem to feel personally attacked everytime I make a critic and think it is the way I enjoy my free time. If your reply is threatening me that you will never reply to any other quotation again, it's fine with me.

    However maybe you could answer if there is any intention from ISI's side to update and keep feeding the first released documentation pdfs or the procedure for learning will still be based on diving thorugh the forum. It's simple: yes or no.

    My bet is no after two years of no changes. My bet is also that there will be no answer to this.

    enviado mediante tapatalk
     
  3. SPASKIS

    SPASKIS Registered

    Joined:
    Sep 7, 2011
    Messages:
    3,155
    Likes Received:
    1,426
    Just in case it helps the OP... Here is the message that Tuttle sent to me which is quite complete.

    There are the 3 main reflectors we're using;


    - REFLECTEDENV
    - STATIC
    - REFMAP0


    What is REFLECTEDENV? This is what we want to be reflect by environments, so the wet road.
    It needs few important things to work properly:


    The "Road Shader Two Diffuse Maps" shader has a few drawbacks in terms of looks and flexibility. The new “Real Road Shader” builds upon that base, with a few modifications and enhancements:


    The Normal map stage now has its own set of mapping coordinates. This allows it to be linked to either the diffuse or the detail map channel (typically channels 1 and 2).
    The RaceGroove stage works a bit differently now: both the RGB and Alpha portions no longer mask (i.e. hide) the underlying road detail maps (the tarmac grain and its spec map), in order to keep the overall texture resolution of the road as a texture entity as high as possible. The RGB part is used in a multiplicative blend onto the two diffuse maps (T1 and T2); the alpha channel still contains the spec map and is ADDED to the existing detail spec maps. Please note that total specularity is clamped, so having a very white spec map means there is little headroom for the groove spec to show up.
    In the past, the wet mask was stored in the T1 diffuse alpha (used inverted), which was also used as the spec mask. This was a considerable flexibility handicap and either the reflections or the spec had to be sacrificed to some extent. Repetitive tiling patterns and potential seams only added to the diffuse alpha nightmare; not to mention the seams where two or more road sections meet. Some of that has been changed. Actually, the spec masked is still stored in the diffuse alpha, as should some of the wet mask (still inverted). The contents of this alpha channel though should now be limited to unique features of the diffuse RGB: cracks in the road, patches, tar stripes, ... In other words, it contains high frequency elements that are usually also visible in the RGB.
    The low frequency elements (something that looked like a subtle cloud pattern in the past that should have resembled some puddles) are now stored in the spec MAP alpha, which subsequently means it is locked to the detail map channel. This change has been made because the detail maps are typically applied uniformly and seamlessly across all road surfaces. The mapping of this cloud/puddle map inside the spec MAP alpha is currently hard-wired to a factor 20 of its base mapping channel, stretching it over an area of 20 times the asphalt grain stored in the textures' RGB channels. Typically, this would cover an area of about 1600m² or so.
    So the wet mask has now been effectively split into two components: cracks (diffuse alpha) and puddles (spec alpha). The advantage is that there will no longer be any puddle seams between various road mappings and/or materials, and that the repetition in the wet is broken by the two maps (and also in the dry to some extent by the lack of the low frequency clouds in diffuse alpha).
    Fresnel Reflect should still be set up for dry conditions. The underlying Real Road technology will saturate those values as the road becomes wet. For this reason, materials that require wet reflections should have a _WET suffix in their name.


    Here a visual scheme showing the new RR shader stage job:


    http://www.entropyxel.com/rF2dev/NEWRR.pdf


    Also remember to call the REFLECTEDENV in the road material to activate the Live Mapper.


    Then you need to set refplanes properly and prepare the Include list in the SCN: here few posts explaining how to set refplanes etc etc:


    http://isiforums.net/f/showthread.php/3840-Problem-with-Wet-Surface?p=47311&viewfull=1#post47311
    http://isiforums.net/f/showthread.php/3840-Problem-with-Wet-Surface?p=47435&viewfull=1#post47435


    - STATIC


    What is STATIC? These are static cube/parallax reflections used for buildings glass materials. It works exactly at explained in the old track tech pdf.
    The tricky part it's to find a proper set of coordinates to make glass reflecting something coherent with the reflected area. You need 3Ds Max to find that coordinate set, using a virtual box in front of your building glass and then porting those coords in the STATIC section, inside the SCN.


    - REFMAP0


    These are car reflections. You need a list of objects to be reflected above cars. Of course you've to find a balanced quantity of objects to not kill your track performance. I'd suggest to use roads and stripes, main buildings (if they're next to the track), few trees groups and hero objects.

    enviado mediante tapatalk
     
  4. Luc Van Camp

    Luc Van Camp Track Team Staff Member

    Joined:
    Oct 4, 2010
    Messages:
    1,030
    Likes Received:
    15
    Yes, at some point. The wiki post to explain the changes is temporary, to make sure the info was out there ASAP ... or maybe we'll just convert the PDF to the wiki so we no longer have to care about the PDF. Who knows. Either way, the shader descriptions in Max are pretty much self-explanatory if you know what you're doing.

    As for the OP issue, yes, the objects need refplanes, not the surface.
     
  5. Mario Morais

    Mario Morais Registered

    Joined:
    Oct 26, 2010
    Messages:
    1,465
    Likes Received:
    169
    I think the problem is (I mean road reflection problem :) )
    You add all objects to reflect to list "ReflectionMapper=REFLECTEDENV"
    Code:
    ReflectionMapper= REFLECTEDENV
    {
      Type=Planar
      TextureSize=(512)
      UpdateRate=(100.000)
      StaticSwitch=(100.000)
     TrackingIns=NULL
     IncludeIns=skyboxi
    IncludeIns=Adverts06
    .....
    
    If the each object don't have "Local plane" the Reflection is in global ReflectPlane
    Code:
    .....
    MaxShadowRange=(500.00)
    AmbientColor=(126, 126, 126)
    ReflectPlane=(0.014, 0.999, 0.036, 1.393)
    ....
    
    The reflection planes must be coplanar (Same Z value and Normal vector) with the road. If the all track is flat you can use the global ReflectPlane for all objects but is not the case.. So you need to create local planes for all zones when the road have other elevation or slope. Can use my GmaterialTool to create a plane from road.

    After create the planes must add objects that want to reflect.
     
  6. Nuno Lourenço

    Nuno Lourenço Registered

    Joined:
    Oct 19, 2010
    Messages:
    593
    Likes Received:
    65
    Well theres a lot usefull information now to work with. I'm not sure that i'm able today to try it but tomorrow I have time for sure and then i report the situation.

    Thank you very much
     
  7. Nuno Lourenço

    Nuno Lourenço Registered

    Joined:
    Oct 19, 2010
    Messages:
    593
    Likes Received:
    65
  8. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,010
    Likes Received:
    1,071
    Did you add mesh displacement and it created a rippled reflection as if over bumps?
     
  9. DmitryRUS

    DmitryRUS Registered

    Joined:
    Apr 17, 2011
    Messages:
    439
    Likes Received:
    47
    Reflections, can make the system more simple?
    Card name - reflects the hit objects. Do not use the plane ReflectPlane. Is that possible?
     

Share This Page