Implementing a AO map with RealRoad?

Discussion in 'Track Modding' started by SJ_, Mar 10, 2016.

  1. SJ_

    SJ_ Registered

    Joined:
    Feb 2, 2016
    Messages:
    19
    Likes Received:
    0
    Is this possible? The track I'm working on had an ambient occlusion map for the road but the detail map is now taking its spot. Is there a way to have the both the detail map and an AO map using the real road shader?
     
  2. Gijs van Elderen

    Gijs van Elderen Registered

    Joined:
    May 1, 2014
    Messages:
    1,393
    Likes Received:
    469
    Is there a specific reason you want an ambient occlusion map on your track?

    a screenshot from what you want to achieve?
     
  3. SJ_

    SJ_ Registered

    Joined:
    Feb 2, 2016
    Messages:
    19
    Likes Received:
    0
    The reason for including the AO map is to fake the shadows from the rocks on Bryce Canyon. While alternatives now exist to producing those effects with little performance cost it's a lot less effort to just be able to include the already existing AO map somehow.
     
    Last edited by a moderator: Mar 10, 2016
  4. Gijs van Elderen

    Gijs van Elderen Registered

    Joined:
    May 1, 2014
    Messages:
    1,393
    Likes Received:
    469
    If it's a not to big section of the road: you can create a copy of the main real road shader. And assign it to this section. And add the AO to the first diffuse with photoshop for this section.
    If it's a big section: you'll need an other copy with a transition map from light to darker asphalt.

    But i think you'll need to do it gentle and not to hard. Because the rocks will produce its own shadows which will be dynamic. And the mix between static and dynmic shadows needs to work.


    It's up to you what you want to achieve. IMO: i would let the rocks produce the shadows on the road. :)


    [​IMG]




    ISI Monaco 1966 is surrounded with buildings, trees and rocks. I think ISI let the shadows do its thing.
     
  5. Nuno Lourenço

    Nuno Lourenço Registered

    Joined:
    Oct 19, 2010
    Messages:
    593
    Likes Received:
    65
    In these days, using AO maps for fake shadows like those, makes no sense in my opinion. Let to players the choice to have shadows set to maximum or reduce them to have better fps, otherwise we will stuck in time with outdated effects for ever... That's my opinion.

    Keep in mind that fake shadows don't move as time passes...
     
  6. stonec

    stonec Registered

    Joined:
    Jun 19, 2012
    Messages:
    3,399
    Likes Received:
    1,489
    rF2 is not very good with certain shadows, that's why AO is sometimes a better option. On uneven surfaces like trees and this rock for example I've yet to see anything good from gMotor. It's my belief that ISI bakes in AO to the texture itself (I could be wrong).
     
  7. Nuno Lourenço

    Nuno Lourenço Registered

    Joined:
    Oct 19, 2010
    Messages:
    593
    Likes Received:
    65
    But from what I understand the point here is to bake stone shadows on road, or am I misunderstanding?

    For an object itself of course is a good idea. Buildings, rocks, etc...
     
  8. Tuttle

    Tuttle Technical Art Director - Env Lead

    Joined:
    Feb 14, 2012
    Messages:
    2,480
    Likes Received:
    775
    AO is ambient occlusion, and it simulate how much ambient light you have per pixel and this can be baked into an object, like 90% of games, using 3D assets, does. It's not about shadows. They are 2 different things.

    If you want that rock shadows on the road, just tag that rock as a caster, and if you think it's overdone for performance then you could make a low poly version and tag it as shadow object.

    If you need to bake occlusion into the road I don't honestly understand why as I don't think you have objects planted in the middle of the road, to justify an occlusion at tarmac level. In theory the ambient is working "flat" there, apart sun occlusion.

    Maybe you mean you would like a tad of radiosity but for this you'd need to work with vertex paint (alpha or color). Unfortunately our RealRoad is already using the vertex table to store and elaborate the RR dynamics. Same for maps as the RR has all available stages busy.
     
  9. Gijs van Elderen

    Gijs van Elderen Registered

    Joined:
    May 1, 2014
    Messages:
    1,393
    Likes Received:
    469
    AO to textures: Mostly for buildings.

    AO to vertex: for terrain.


    AO on roads is hard to do.


    BTW:
    Vertex colors on the real road shader is to mix the racegroove, marbles and wetness. The cars will "paint" the surface with vertex colors to make the race groove and marbles appear.

    I've accidentally applied the real road shader with textures to a terrain with vertex color in GJED. result was: Vertex Yellow = Race groove, Vertex Blue is marbles. I think black was wetness. (not sure)

    It opens up to opportunity's for Rally and dirt tracks with a static "real road". Vertex Blue to paint some lose gravel marbles. Black for some water puddles and Yellow for race groove line.

    If you name the object/trackmesh Racesurface_.... : the vertex colors will be painted by the cars. So you'll need to name the mesh differently if you want to paint the real road yourself.

    Don't know if painting the road manually with vertex paint will work propperly ingame though. But it seems to work in GJED... :eek: but it's nice to know who the real road works.



    If SJ_'s track is a rally stage. The real road is'nt that important since your not driving the same lap over and over again. So could he could use vertex paint and mix some stuff on the road...

    It all comes down to what you want to achieve...
     
  10. Tuttle

    Tuttle Technical Art Director - Env Lead

    Joined:
    Feb 14, 2012
    Messages:
    2,480
    Likes Received:
    775
    This is a good point.

    If the track is a dirt track, then I understand the question but we don't have a dynamic dirt shader and real road is not really engineered to work with dirt surfaces. So, as you said, he could apply a standard terrain radiosity on top of a multilayer shader.
     
  11. Gijs van Elderen

    Gijs van Elderen Registered

    Joined:
    May 1, 2014
    Messages:
    1,393
    Likes Received:
    469
    SJ_ , Nice work mate!

    [​IMG]

    [​IMG]
     

Share This Page