Ambient occlusion, is it possible?

I wonder what other things could/should be there, but are not?!

Is there a recommended spec/standard for CG, so that we can make sure we can implement everything we want to in future?
It seems counter-intuitive to have CG that is meant to give freedom and massive power, but then have key things not passed to it... leaving it fairly limited from a creative point of view.

Dave
 
  • Tiberius

It's a bit like what we were talking about with the car.ini variables, so much potential there if it would be used (look at my last post on the 088 thread).

Even so, there's a lot can be done with CG, going back to the old OpenGL shaders after that, they're really limited in comparison with what the cg can do :)
 
Haha, oops.

That oa/ao thing is gonna bite us lots unless it gets resolved at the source :redface::smile:


That said, by the time we get a racer.exe that works, this code will be in with the release anyway :)

Dave
 
Nice screens there. :) Depth maps in TEXUNIT5 are definitely not in v088, so I'll have to release a v089 soon to get that to work (pretty hard to do final version with all these progressions ;-) ).
I'll talk to Mitch since I don't think he committed the Z-enabled version yet (and taking care not to have a half-shadowmapped version).
 
Really looking forward to this shadow 'upgrade' as it were.

The AO stuff looks like it could be quite hungry on processing power, but I guess that is where we need to test lots...


After watching some videos on GT Planet today of GT5 Nordschliefe, I'm not so sure it is using any kind of AO, but probably still baked vert type data... however, the live shadows and impacts on car lighting DO look realtime, and add a great deal of quality. To have those, with nice shadows cast inside our cars, and self shadowing, it'll all be another big step forward on visual realism!


If Racer can tie in TOD with AO and decent sun shadowing, then the level of diversity and quality will be quite stunning really. Any one track rendered beautifully at any TOD will be quite impressive without needing any artistic inputs for vert lighting or specific TOD artistry (I guess this is kind of what Operation Flashpoint 2 kind of uses with TOD active with atmospherics etc all done automatically)


Good work guys!

Dave
 
  • Tiberius

The 90% drop in framerate we were all getting on that shader is probably a taste of things to come :tongue:

089 sounds good, more toys to play with :smile:
 
The 90% drop in framerate we were all getting on that shader is probably a taste of things to come :tongue:

The nice thing about fullscreen shaders like this, is that their framerate cut is completely independent of the game content - it's not making the whole process 10 times slower, just adding a fixed time to each frame. So it won't scale up with new cars/tracks at high poly counts, if you can get an acceptable frame rate you're probably good to go for any content.
 
Hah, the best I can get is the same result I could get before with the bodged depthmap.

If we had the real depthmap passed to CG shaders a year ago I would already have an implementation :)

Boomer, not sure...I guess it depends on the edges of objects/faces whether or not light passes through...I'd say not, we'll have to see though.

Looking forward very much to 089, should be pretty good :D
 
Really looking forward to this shadow 'upgrade' as it were.

If Racer can tie in TOD with AO and decent sun shadowing, then the level of diversity and quality will be quite stunning really. Any one track rendered beautifully at any TOD will be quite impressive without needing any artistic inputs for vert lighting or specific TOD artistry (I guess this is kind of what Operation Flashpoint 2 kind of uses with TOD active with atmospherics etc all done automatically)

While on the subject of TOD (Time Of Day), it would be great if we could define the ambient and diffuse for each hour of day per track. Currently, the night is way too bright, the ambient values are pretty weird at night.
 
  • Tiberius

Night time is chucking out way too much ambient light, it should be somewhere around 0.2-0.3.

Rain and snow curves work great, would be good to have overall ambient/diffuse/specular lighting and fog levels set that way too. Then you could control what amounts you were getting at which times of day, even have tracks which clouded over and rained at certain times of day or which were clear and sunny during the day but foggy at night (Alpine type tracks)..

sun diffuse=0.2
sun ambient=0.8
fog mie=0.03
fog rayleigh=0.003

That put into a script works well here for a foggy day, all it needs is a console command to turn off the sun too.
 
TOD could do loads of things if the code was left more open.

Sun location in sky, global coords, TOD, and maybe a north direction, and you have the suns trajectory through the scene.

A pair of curves (probably can be generalised down to a quadratic or polynomial) for the sun intensity and colour, and the same for ambient intensity and colour.

Mie and rayleigh the same.

Once we have good ones then we can just copy the good ones, and those who want a bit more control can tweak them.

You could even just have the sun trajectory set the physical way, then define 'scene' parameters for different TOD, and interpolate between them.



Simply by removing parameters from the code and putting them in ini files means we get more out of Racer and make more interesting content, and Ruud has to put less work in, in theory :D


All very good potential, it just needs opening up rather than hard coding :D

Dave
 
  • Tiberius

Yep, it would be nice to have more control over some aspects :smile:. Lighting seems to work a lot better in the last couple of versions, set the mie slightly higher than the rayleigh to get some distance haze, going to a ratio of about 10:1 mie/rayleigh to get thick mist/fog..even just being able to control at least the ratio of the two would open up a lot of possibilities :smile:

The other major issue at the moment is sun bleed through objects and through the horizon at dawn/dusk, would be nice to have some kind of basic ray tracing to switch the sun off when it was behind objects..

Getting back to the AO, does this finally mean the end of static baked textures? I had a look at the Plymouth last night, I had all the bright trim baked to a 1024x1024 tex, have the same on the XJ-S and the Capri (even have the black plastic trim baked on the Capri)..but now I'm wondering if the lighting calculations are good enough to just use plain block textures then perhaps a basic detail (bump or spec) texture on top of that. I'm at the point now where I've got to admit that turning off the shading on my body textures looks as good or even better on light coloured car body textures, I just can't bring myself to get rid of all the baked textures, even if it made the car load/run much faster.

Really, this belongs on another thread, but what would be really great would be support for some kind of parallax mapping as opposed to the basic bump mapping we have now (basic mapping works great on most things but having something more would be nice). The original Far Cry used Parallax mapping I think, even down to bumps on mirrored surfaces which affected reflections (I'm thinking some subtle effects for orange peel on paint, dimples or ripples on chrome or bright metal surfaces).

The list goes on.. :tongue:
 
The other major issue at the moment is sun bleed through objects and through the horizon at dawn/dusk, would be nice to have some kind of basic ray tracing to switch the sun off when it was behind objects..

I believe, the problem is in the shader atmosphere.cg at line 206:
Code:
finalColor=(rayleighPhase+miePhase)/(atmosRayleigh+atmosMie)*(rayleighColor+mieColor)*max(lightColor, lightAmbient);

Comment it out and uncomment the next line, this should take care of the bleed-through:
Code:
//finalColor=(rayleighPhase+miePhase)/(atmosRayleigh+atmosMie)*(rayleighColor+mieColor)*max(lightColor, lightAmbient);
finalColor=(rayleighPhase)/(atmosRayleigh)*(rayleighColor)*lightColor;
 
  • Tiberius

I believe, the problem is in the shader atmosphere.cg at line 206:

Yep, that fixed it, thanks :smile:

After a few tries, I came up with this, pretty much ended back at what it was but deleted the miePhase (seems that's what causes the sun to render through other objects?):

Code:
finalColor=(rayleighPhase)/(atmosRayleigh+atmosMie)*(rayleighColor+mieColor)*max(lightColor,lightAmbient);

To quote Whippy, hmmm.. :smile:
 

Latest News

Are you buying setups?

  • Yes

  • No


Results are only viewable after voting.
Back
Top