Jump to content

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


Recommended Posts

This grass effect. If it's too slow for terrain, what about applying it to a farm field decal and use the feature for nice-looking 3-D farms that conform to the terrain?

Some of the slowness can probably be mitigated with the LOD feature that myconid just implemented. As for actors, maybe we can use some kind of UV map (e.g. RGB for color, A for blade length)? Then you could even color it brown, put it on a bear and call it fur :)

Link to comment
Share on other sites

Some of the slowness can probably be mitigated with the LOD feature that myconid just implemented. As for actors, maybe we can use some kind of UV map (e.g. RGB for color, A for blade length)? Then you could even color it brown, put it on a bear and call it fur :)

The LOD is actually just for models atm, though it'll get adapted eventually. As for fur on bears... it's possible, but is it worth it?

Link to comment
Share on other sites

What if we wanted grass on a pitched roof? Can that be done with decals?

Best way would be to add it as a prop, meaning it's a model with a grass material attached to a specific point on the main roof.

(when I'm talking about decals, I'm talking about terrain decals like the patch of dirt drawn under buildings)

Edited by myconid
Link to comment
Share on other sites

At the very least, that would give me an excuse to implement fancy materials for decals. ;)

This would solve an issue we've had for years and years--how to make farms look nice while conforming to the terrain grid. The current farms are not ideal, since they're just a flat decal. Adding that "grass" effect, while conforming to terrain, would pretty much look awesome.
Link to comment
Share on other sites

Could you try it again with this?

Yup, that looks more correct! http://imgur.com/a/CkHWf

In regards to parallax: when you are creating heightmaps remember that the parallax effect actually goes inwards (i.e. the real surface of the polygon is at height=white). If your entire polygon is much lower than that, it gets pushed inwards and the effect doesn't know what to draw to fill in the gaps at the edges. That's why you got tiling gaps on the roof of the roman civil centre. The solution? Make the brick heightmap brighter, until the tops of the stones=white.

Edited by myconid
Link to comment
Share on other sites

This is what I get. Also I still get the terrain texture flickering.

The flickering is sort of expected, as I haven't worked on the shadowmap at all... but there's no sign of any effects anywhere, which is odd (it should either work or fail miserably, not look unchanged). Just to be sure, are you on the "effectsdistance"branch and preferglsl/gentangents are set to true in the config?

(thanks btw)

Edited by myconid
Link to comment
Share on other sites

Yup, that looks more correct! http://imgur.com/a/CkHWf

In regards to parallax: when you are creating heightmaps remember that the parallax effect actually goes inwards (i.e. the real surface of the polygon is at height=white). If your entire polygon is much lower than that, it gets pushed inwards and the effect doesn't know what to draw to fill in the gaps at the edges. That's why you got tiling gaps on the roof of the roman civil centre. The solution? Make the brick heightmap brighter, until the tops of the stones=white.

Cool and thanks for the tip, I'll get that fixed up this afternoon.

Back to doing groundwork for the postprocessing effects manager. Here's HDR + bloom + fog: http://imgur.com/a/p1jxm

Looks great!

Link to comment
Share on other sites

Back to doing groundwork for the postprocessing effects manager. Here's HDR + bloom + fog: http://imgur.com/a/p1jxm

Code: https://github.com/m...d/tree/postproc

I get this error:

ERROR: Failed to compile shader 'shaders/glsl/model_common.fs':
0:194(27): error: Cannot access field `x' of non-structure / non-vector.
0:194(27): error: type mismatch
ERROR: Failed to compile shader 'shaders/glsl/model_common.fs':
0:194(27): error: Cannot access field `x' of non-structure / non-vector.
0:194(27): error: type mismatch

Also, there seems to be an issue with the fog being clipped at the edge of the map. This is from Atlas but it also shows in-game:

f18Z8s.png

Link to comment
Share on other sites

I get this error:

ERROR: Failed to compile shader 'shaders/glsl/model_common.fs':
0:194(27): error: Cannot access field `x' of non-structure / non-vector.
0:194(27): error: type mismatch
ERROR: Failed to compile shader 'shaders/glsl/model_common.fs':
0:194(27): error: Cannot access field `x' of non-structure / non-vector.
0:194(27): error: type mismatch

Also, there seems to be an issue with the fog being clipped at the edge of the map. This is from Atlas but it also shows in-game:

Please ignore the fog thing for now, it's not properly implemented yet so it gets drawn over the LOS. In the prototype I used multi-target rendering to draw the LOS to a different buffer and then recombine it with the output after the fog, though that feels like a massive kludge and I want to avoid it. Maybe there's something clever I can do with the renderbuffer's alpha channel, if you see what I mean...

As for the other error, fixed. Man, ATI's GLSL compiler will let me get away with anything. :disgust:

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...