Post-processing effects test (SSAO/HDR/Bloom)
#1
Posted 06 May 2012 - 04:35 AM
I've been coding some very rough GLSL post-processing tests just to see what they'd look like in 0ad, and thought I might share some results. The following images are in pairs, with the "plain" images first and the filtered images after: http://imgur.com/a/zZe2L
These images use SSAO, HDR and Bloom filters. The dark halos around the character models are due to the SSAO, which otherwise looks pretty decent.
Credit where it's due: the shaders are modified versions of the fantastic work of user martinsh on the Blender Artists forums.
Peace
Myc
#2
Posted 06 May 2012 - 08:47 AM
To eliminate the halos perhaps it would be possible to not apply SSAO to the terrain. This might require an extra buffer, I am not experienced with this stuff.
Jonathan Waller [ aka quantumstate ]
Wildfire Games AI Scripter
Contact me: jonathanmarkwaller at gmail dot com
Support Wildfire Games!
#3
Posted 06 May 2012 - 09:50 AM
Not applying SSAO to the terrain would indeed fix the halos. My guess is that most units wouldn't require it either (or as a setting for really advanced graphics, since that would computationally be slower.). Afaik, specular is dealt with on a case-by-base basis already, can't SSAO be done that way too? Buildings could use finer SSAO, while most units hardly benefit from it.
For the terrain, you could have, on the contrary, a very rough filter that would have the effect or pretty much not detecting units, but would make the inside of forests darker or something (perhaps a huge downscaling, or something, I have no idea of the technical details behind all this).
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com
Also the world's only three-dimensional poodle.
#4
Posted 06 May 2012 - 01:18 PM
wraitii, on 06 May 2012 - 09:50 AM, said:
Wildfire Games Programmer
Contact me: philip@wildfiregames.com
#5
Posted 06 May 2012 - 06:29 PM
Anyway, the halos were easy to fix once I stopped being lazy. People suggesting not to render on the terrain were onto the right track, and there's actually no need for an extra buffer: the models can be rendered first, then have the effect applied, then render everything else with depth testing on.
New example: http://imgur.com/Tfa1b
#6
Posted 07 May 2012 - 04:13 PM
Wildfire Games CFO, retired artist
Contact me: jason@wildfiregames.com
Support Wildfire Games!!!
#7
Posted 07 May 2012 - 09:46 PM
Wijitmaker, on 07 May 2012 - 04:13 PM, said:
The units do have shadows, they're just hard to see when zoomed out this far.
Yes, it would certainly be possible to have such effects (at least in GLSL mode)! Ideally, there would be a postprocessing filter manager that gets its instructions straight from map files/scripts to load specific effects and their parameters. I'm not too familiar with the codebase and how easy it would be to add a new manager type, but most of the heavy-lifting parts are definitely already there.
#8
Posted 08 May 2012 - 06:19 AM
myconid, on 06 May 2012 - 06:29 PM, said:
I still think the effect is too strong, because for example in your screenshot the whole ground is bloomed... at such a scale bloom should only happen on extremely white stuffs, I think (which should solve the 'units lose their shadows' problem). But hey, that's for the art department to decide, and anyway, it's very cool
Edited by wraitii, 08 May 2012 - 06:28 AM.
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com
Also the world's only three-dimensional poodle.
#9
Posted 10 May 2012 - 11:32 AM
wraitii, on 08 May 2012 - 06:19 AM, said:
I still think the effect is too strong, because for example in your screenshot the whole ground is bloomed... at such a scale bloom should only happen on extremely white stuffs, I think (which should solve the 'units lose their shadows' problem). But hey, that's for the art department to decide, and anyway, it's very cool
That could be fixed by reducing the overbrightness/sun colour values in Atlas. Anyway, since we're on the topic of fancy shaders, perhaps a different solution to add more texture to the terrain could be to add bump maps so things don't get shaded so evenly. I see code for materials that use shaders, but I still haven't found if there's a system for loading extra normal maps, specular maps, etc.
Maybe one of the programmers could point me to the right functions/documentation if they exist.
#10
Posted 10 May 2012 - 04:41 PM
Wildfire Games Project Leader
Contact me: michaeldhafer[at]gmail.com
Support Wildfire Games!
#11
Posted 10 May 2012 - 06:16 PM
Mythos_Ruler, on 10 May 2012 - 04:41 PM, said:
I might give it a shot if I find the time. Parallax mapping would open a world of new possibilities for the art team!
#12
Posted 10 May 2012 - 06:30 PM
Wildfire Games Project Leader
Contact me: michaeldhafer[at]gmail.com
Support Wildfire Games!
#13
Posted 10 May 2012 - 10:50 PM
myconid, on 10 May 2012 - 06:16 PM, said:
Normal and parallax mapping would be great to have.
Jonathan Waller [ aka quantumstate ]
Wildfire Games AI Scripter
Contact me: jonathanmarkwaller at gmail dot com
Support Wildfire Games!
#14
Posted 11 May 2012 - 01:09 AM
#15
Posted 11 May 2012 - 02:33 AM
Wildfire Games Project Leader
Contact me: michaeldhafer[at]gmail.com
Support Wildfire Games!
#16
Posted 11 May 2012 - 05:56 AM
This all looks particuarlry promising anyway, keep up the good work
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com
Also the world's only three-dimensional poodle.
#17
Posted 11 May 2012 - 12:00 PM
Edit: A Sobel-based map works much better http://i.imgur.com/R3U7r.jpg
So far, I can add normal maps for models with a new <normal> tag in the "actor" description files. What you see in this example is object-space bump mapping, which has some very serious limitations compared to tangent-space mapping, but it's much easier to compute.
Next step is tangent-space mapping.
Edited by myconid, 11 May 2012 - 01:22 PM.
#19
Posted 11 May 2012 - 02:53 PM
Edited by wraitii, 11 May 2012 - 02:54 PM.
Wildfire Games Programmer, AI developer, auxiliary map designer, dealing with anything water.
Contact me: wraitii@wildfiregames.com
Also the world's only three-dimensional poodle.
#20
Posted 11 May 2012 - 03:28 PM
wraitii, on 11 May 2012 - 02:53 PM, said:
Agreed, I started with this just because it feels simpler. The plan is to:
- first do proper tangent-space bump mapping for models,
- then the same for terrains,
- then parallax mapping for terrains,
- finally parallax for models.
Anyway, I'll keep the thread updated as I go along.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











