Jump to content

Post-processing effects test (SSAO/HDR/Bloom)


Recommended Posts

:D

Definitely looks better, but have you tried tweaking the 'blending range'? In GPU Gems, they seem to obtain rather epic results with a range of 'roughly 10 to 20 degrees'.

Already done, though I guess that last pic was a bit messy. How about this one:

SewtA.jpg

Triplanar + normal mapping + specular mapping. The stretching problem is solved. :)

I should note that triplanar texturing is a pretty GPU intensive effect: it replaces every texture access with 3x accesses, and memory access is pretty much the slowest operation. I think I'll make it so it lives in a separate material of its own that is used for cliff textures..

On a completely different subject, did you know that Nvidia's CG compiler can automatically convert a subset of GLSL to ARB assembly? That means it may be possible to 'port' some of the lighter GLSL effects (eg AO) to ARB with very little effort...

  • Like 2
Link to comment
Share on other sites

Then a biome would select different versions of the above based on the angles things faced. You could do things like

  1. 75-90 degrees vertical: granite rock
  2. 180-270 degrees (z-axis rotation): snow+grass (south facing has less snow on ground)

This would sort of blur the distinction between manual and generated maps, making both tasks easier. Of course, if map-makers didn't like the way something looked, they could override with a forced normal ground type too.

I'm not sure I understand your suggestion, Sonarpulse. Are you talking about storing that information in the terrain files?

Link to comment
Share on other sites

Already done, though I guess that last pic was a bit messy. How about this one:

SewtA.jpg

Triplanar + normal mapping + specular mapping. The stretching problem is solved. :)

I should note that triplanar texturing is a pretty GPU intensive effect: it replaces every texture access with 3x accesses, and memory access is pretty much the slowest operation. I think I'll make it so it lives in a separate material of its own that is used for cliff textures..[...]

That looks much better on slopes!

Is the effect used for every terrain texture tile? Because if I get it right it's mainly helpful when the gradient of the terrain is high and so might only be used there. Then the resource needs might be not that much of an issue.

It seams like not all textures are in a right angle towards each other. This could look strange at the border sometimes I guess?

Link to comment
Share on other sites

That looks much better on slopes!

Is the effect used for every terrain texture tile? Because if I get it right it's mainly helpful when the gradient of the terrain is high and so might only be used there. Then the resource needs might be not that much of an issue.

It seams like not all textures are in a right angle towards each other. This could look strange at the border sometimes I guess?

The idea is to make a special material just for slopes to avoid using this everywhere.

Whatever you see that looks odd, it's most probably intended. When used like this, the triplanar effect is a trick that removes one type of artifact (the stretching) and replaces it with other artifacts that are hopefully a lot less noticeable..

Edit: Or maybe it's not intended... I'll look into it.

Edited by myconid
Link to comment
Share on other sites

The idea is to make a special material just for slopes to avoid using this everywhere.

Whatever you see that looks odd, it's most probably intended. When used like this, the triplanar effect is a trick that removes one type of artifact (the stretching) and replaces it with other artifacts that are hopefully a lot less noticeable..

Edit: Or maybe it's not intended... I'll look into it.

For sure it looks better. And I guess theres no way to avoid textures in non-right angles towards each other (and the textures where originally not meant for that). So at the bottom and top (where the effected terrain meats the unaffected parts) textures doesn't line up well. Still it's better than the extreme texture distortion without the effect.

EDIT:

Cliff textures and "multi-planer" can be combined for super basic "biomes"

That would a normal ground type:

Then a biome would select different versions of the above based on the angles things faced. You could do things like

  1. 75-90 degrees vertical: granite rock
  2. 180-270 degrees (z-axis rotation): snow+grass (south facing has less snow on ground)

This would sort of blur the distinction between manual and generated maps, making both tasks easier. Of course, if map-makers didn't like the way something looked, they could override with a forced normal ground type too.

Great idea!

The problem is: It has to be implemented twice: Once for simulations to be used in atlas and once for the RMGEN part (since it has no access to simulation AFAIK).

I think it would be highly valuable to think of fusing RMGEN into simulations. So one could add e.g. a circular wall in Atlas by drawing a box.

Edited by FeXoR
Link to comment
Share on other sites

I'm not sure I understand your suggestion, Sonarpulse. Are you talking about storing that information in the terrain files?

Basically with normal multi-planer projection, one uses the same texture for all perspective. I am saying based on the direction the surface normal faces, a different texture is projected. (I edited my first post to make the angles clearer.)

E.G. for very horizontal normals (i.e. very steep surfaces, a rock/cliff texture is used, but for very vertical surface normals (i.e. flat surfaces), a grass texture is used.

Edited by Sonarpulse
Link to comment
Share on other sites

Basically with normal multi-planer projection, one uses the same texture for all perspective. I am saying based on the direction the surface normal faces, a different texture is projected.

E.G. for very horizontal normals (i.e. very steep surfaces, a rock/cliff texture is used, but for very vertical surface normals (i.e. flat surfaces), a grass texture is used.

I see. This sort of thing could be useful for implementing something like seasons. For example, you could have dynamic snow that accumulates on surfaces higher than P and less steep than X angle. Or seasonal plants that bloom over Q texture at Y angle...

Link to comment
Share on other sites

I'm very curious to see that in the game... I think it'll make a cliffy map like my Corsica random map look really good.

Adding a terrain that changes depending on the orientation is a good idea, but should imo not be a priority: it can be faked pretty well right now, even by RM.

Link to comment
Share on other sites

On a completely different subject, did you know that Nvidia's CG compiler can automatically convert a subset of GLSL to ARB assembly? That means it may be possible to 'port' some of the lighter GLSL effects (eg AO) to ARB with very little effort...

If this is true, I think even the programming dept will like it :)

Link to comment
Share on other sites

Triplanar + normal mapping + specular mapping. The stretching problem is solved. :)

I don't know if it has been prepared for testing yet, but this is what I get in Atlas:

OHGNI.png

In-game I get a similar message, though it renders everything but terrain.

Link to comment
Share on other sites

I believe it selects one on the basis of a quality setting:

The version of the material that is loaded depends on the materialmgr.quality setting in the config (which is out of 10, float). For instance, parallax is only enabled if the config setting is >= 8. If it's smaller, the material redirects to a simpler version of itself that only contains normal mapping, which redirects to the completely basic material if the quality setting is not >= 3).

Link to comment
Share on other sites

Haha, no I was just kidding.

sHWQT.jpg

Or was I?

Impressive.

Already done, though I guess that last pic was a bit messy. How about this one:

SewtA.jpg

Triplanar + normal mapping + specular mapping. The stretching problem is solved. :)

I should note that triplanar texturing is a pretty GPU intensive effect: it replaces every texture access with 3x accesses, and memory access is pretty much the slowest operation. I think I'll make it so it lives in a separate material of its own that is used for cliff textures..

On a completely different subject, did you know that Nvidia's CG compiler can automatically convert a subset of GLSL to ARB assembly? That means it may be possible to 'port' some of the lighter GLSL effects (eg AO) to ARB with very little effort...

Most impressive.

Link to comment
Share on other sites

Splendid! :thumbup:

myconid, DUDE - who are you? You certainly aren't the average programmer that visits our forums. What is your story? Are you a student? Working as a programmer? Do you work in game development? Your making this look to easy (not that I'm complaining - because the game is going to be forever better because of the additions your making).

Link to comment
Share on other sites

Very nice work on the hills myconid.

I second Jason's enquiry. Tell us a bit about yourself. How did you find 0 A.D.? Have you done other game development? What do you plan to do after finishing your renderer changes? Keen to pick up other features 0 A.D. needs? (like multiple obstructions per entity).

Link to comment
Share on other sites

A question, though, will the use of both types of displacement maps be "read" by the game engine? Or just the one with the "normal" gradient. (not the ones with black&white old bump) ?

The black and white bump mapping algorithm is pretty old and not supported, however I do use such "bump" maps (heightmaps) for the parallax effect, which is the "new version" of bump mapping in a sense. It should also be possible to generate normal maps from bump maps, if that's an issue for you.

I don't know if it has been prepared for testing yet, but this is what I get in Atlas:

In-game I get a similar message, though it renders everything but terrain.

Fixed, sorry. A bunch of broken debug stuff, mostly.

myconid, DUDE - who are you? You certainly aren't the average programmer that visits our forums. What is your story? Are you a student? Working as a programmer? Do you work in game development? Your making this look to easy (not that I'm complaining - because the game is going to be forever better because of the additions your making).

I second Jason's enquiry. Tell us a bit about yourself. How did you find 0 A.D.? Have you done other game development? What do you plan to do after finishing your renderer changes? Keen to pick up other features 0 A.D. needs? (like multiple obstructions per entity).

I'm a programmer, though not a game programmer. In my day job, I need to know more about AI, optimisation ('pathfinding') and scripting than about 3d graphics. Don't want to sound overly mysterious or anything, I just don't know what else to tell you. :)

I discovered 0AD a couple of years ago, and I've always wanted to contribute, so here I am! After I'm done with the renderer, I'll just pick out something that looks interesting... not sure what yet.

Link to comment
Share on other sites

Improvements in all of those areas are greatly needed, if you're still interested in working on this project after the graphics. :)

After I'm done with the graphics (which could be a while from now), I might have a look at scripting. As long as I can find interesting problems to solve, I'm happy. :)

I should probably mention that by saying I know stuff about scripting I mean I know stuff about writing compilers and VMs... probably a bit different from what's done in 0ad, but I should find something I can help with.

Edited by myconid
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...