IPB Style© Fisana

Jump to content


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


  • Please log in to reply
1273 replies to this topic

#661 zoot

zoot

  • Community Members
    PipPipPipPipPipPip

  • Primus Pilus
    (1,475 posts)

Posted 10 July 2012 - 01:00 PM

The lightning changes on the terrain, but not on the models (as far as I can tell). This is with max sun elevation and overbrightness:

Posted Image

#662 wraitii

wraitii

  • WFG Programming Team

  • Primus Pilus
    (1,011 posts)

Posted 10 July 2012 - 01:13 PM

Could be normals not working, but the parallax works...
I'll look int it, but it works for me.
Wraitii
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.

#663 myconid

myconid

  • WFG Programming Team

  • Centurio
    (789 posts)

Posted 10 July 2012 - 03:31 PM

Wijitmaker, tried your Celt normalmap. It may be a bit too subtle (or, I chose the wrong building to test it on).
Posted Image

Edited by myconid, 10 July 2012 - 03:31 PM.

Myconid
Wildfire Games Programmer
Contact me: myconid@wildfiregames.com

#664 Wijitmaker

Wijitmaker

  • 0 A.D. Art Team

  • 0 A.D. Old Timer
    (9,451 posts)

Posted 10 July 2012 - 03:52 PM

Quote

Uh, I should remind people that the modelmapping stuff is limited to instanced objects, like buildings and ships but not people or animals!


Could it be applied to an unanimated actor just to see what the affect might look like on the unit?

Quote

Wijitmaker, tried your Celt normalmap. It may be a bit too subtle (or, I chose the wrong building to test it on).

I'm attaching the black and white elevation map, maybe I didn't convert it correctly - or maybe the brightness and contrast needs to be greater.

Sorry for pestering you so, I'd try it myself but ... well you know that story.

Attached Thumbnails

  • Attached Image: celt_struct_1_elevation.png

Jason Bishop [ aka Wijitmaker ]

Wildfire Games CFO, retired artist
Contact me: jason@wildfiregames.com

Support Wildfire Games!!!

#665 myconid

myconid

  • WFG Programming Team

  • Centurio
    (789 posts)

Posted 10 July 2012 - 04:37 PM

View PostWijitmaker, on 10 July 2012 - 03:52 PM, said:

[/size][/font][/color]
Could it be applied to an unanimated actor just to see what the affect might look like on the unit?
Maybe. I'll have to look into it.

Quote

I'm attaching the black and white elevation map, maybe I didn't convert it correctly - or maybe the brightness and contrast needs to be greater.
Ah, ok. Created a new map using a 3x3 Sobel filter, as opposed to the 2x2 filter you used. Using GIMP's normalmap plugin. Still pretty subtle.
http://imgur.com/a/Siwn4

Quote

Sorry for pestering you so, I'd try it myself but ... well you know that story.
Don't worry, I don't mind at all. After all, I want to test this as well! :)

In fact, do you have any other elevation maps I can play with?
Myconid
Wildfire Games Programmer
Contact me: myconid@wildfiregames.com

#666 plumo

plumo

  • 0 A.D. Art Team

  • Centurio
    (801 posts)

Posted 10 July 2012 - 05:04 PM

@myconid
http://imgur.com/a/Siwn4 too modest, my friend! It is clearly an improvement :rtfm: :yes3:
I
B. Guns [aka Plumo]
0 A.D. Community Liaison
Contact email: plumo@wildfiregames.com

#667 myconid

myconid

  • WFG Programming Team

  • Centurio
    (789 posts)

Posted 10 July 2012 - 05:19 PM

Wijit, I removed the bones from the Hero model and attached your textures. Here's what I get: http://imgur.com/a/ZsvjU
Myconid
Wildfire Games Programmer
Contact me: myconid@wildfiregames.com

#668 zoot

zoot

  • Community Members
    PipPipPipPipPipPip

  • Primus Pilus
    (1,475 posts)

Posted 10 July 2012 - 05:21 PM

Yep. Once the artists get their hands on it and can experiment with the normal maps, I think it will look great.

#669 wraitii

wraitii

  • WFG Programming Team

  • Primus Pilus
    (1,011 posts)

Posted 10 July 2012 - 08:02 PM

Myconid, do you believe it would be possible to (at runtime) export an heightmap of the map? I think I could use it in the water shader to start doing some fancy stuff (simulating ray-casting for depth)
Edit: scrap it, it may already be in the game…

Edited by wraitii, 10 July 2012 - 08:08 PM.

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

#670 zoot

zoot

  • Community Members
    PipPipPipPipPipPip

  • Primus Pilus
    (1,475 posts)

Posted 10 July 2012 - 08:10 PM

View Postwraitii, on 10 July 2012 - 08:02 PM, said:

Myconid, do you believe it would be possible to (at runtime) export an heightmap of the map? I think I could use it in the water shader to start doing some fancy stuff (simulating ray-casting for depth)
:o Dare I ask what you would use this (water) depth info for?

#671 myconid

myconid

  • WFG Programming Team

  • Centurio
    (789 posts)

Posted 10 July 2012 - 08:11 PM

It's possible, yes. You can access a raw 2D array of vertex heights by using
g_Game->GetWorld()->GetTerrain()->GetHeightMap();
with lineskip being
m_VertsPerSide = g_Game->GetWorld()->GetTerrain()->GetVerticesPerSide();
Values are unsigned 16-bit ints.

What on earth do you need raycasting for??
Myconid
Wildfire Games Programmer
Contact me: myconid@wildfiregames.com

#672 wraitii

wraitii

  • WFG Programming Team

  • Primus Pilus
    (1,011 posts)

Posted 10 July 2012 - 08:20 PM

I could use it for improving murkiness (calculating actual distance of light underwater), some sort of advanced refraction, and probably would be nice to have overall. It could also fix a rare, but possible bug with water being incorrectly transparent (if you look at the far side of a steep enough island).

Edited by wraitii, 10 July 2012 - 08:20 PM.

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

#673 zoot

zoot

  • Community Members
    PipPipPipPipPipPip

  • Primus Pilus
    (1,475 posts)

Posted 10 July 2012 - 08:29 PM

View Postwraitii, on 10 July 2012 - 08:20 PM, said:

I could use it for improving murkiness (calculating actual distance of light underwater), some sort of advanced refraction, and probably would be nice to have overall. It could also fix a rare, but possible bug with water being incorrectly transparent (if you look at the far side of a steep enough island).
Cool! I happened upon this page yesterday. They use water depth in a seemingly simple way to do foam (don't know how well it looks, though). Another interesting point they make is about the phenomenon of 'color extinction', which may be related to what you are doing with murkiness.

Posted Image

#674 myconid

myconid

  • WFG Programming Team

  • Centurio
    (789 posts)

Posted 10 July 2012 - 08:29 PM

You don't need real raycasting to calculate that. Here's a clever little algorithm I've come across:
  • First render the terrain.
  • Get the depth buffer which tells us the distance between the camera and the ground at each fragment.
  • Pass the depth buffer as a texture into the water shader.
  • Transform the water plane and calculate the depth value of each vertex, then interpolate with varying.
  • We now have the depth of each point on the plane and the depth of each point on the terrain exactly behind it.
  • A - B = the distance light travels through water.
And what's more, when I implement the Postprocessing manager, the depth buffer will always be available as a texture.
Myconid
Wildfire Games Programmer
Contact me: myconid@wildfiregames.com

#675 wraitii

wraitii

  • WFG Programming Team

  • Primus Pilus
    (1,011 posts)

Posted 10 July 2012 - 08:33 PM

Very good then... I'll just wait :)
(and no, I indeed didn't need real raycasting, just some info about the heightmap, or the depthbuffer, though I hadn't thought of that).

Would this (particularly points 4/5) require rendering the water twice?

Edited by wraitii, 10 July 2012 - 08:36 PM.

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

#676 myconid

myconid

  • WFG Programming Team

  • Centurio
    (789 posts)

Posted 10 July 2012 - 08:44 PM

View Postwraitii, on 10 July 2012 - 08:33 PM, said:

Very good then... I'll just wait :)
(and no, I indeed didn't need real raycasting, just some info about the heightmap, or the depthbuffer, though I hadn't thought of that).
I feel bad because everything you want to do depends on stuff I need to do first. :(

Quote

Would this (particularly points 4/5) require rendering the water twice?
Nope. You render it once and you can get the depth straight from the vertex shader.
Myconid
Wildfire Games Programmer
Contact me: myconid@wildfiregames.com

#677 Wijitmaker

Wijitmaker

  • 0 A.D. Art Team

  • 0 A.D. Old Timer
    (9,451 posts)

Posted 10 July 2012 - 08:47 PM

View Postmyconid, on 10 July 2012 - 04:37 PM, said:

Maybe. I'll have to look into it.

Ah, ok. Created a new map using a 3x3 Sobel filter, as opposed to the 2x2 filter you used. Using GIMP's normalmap plugin. Still pretty subtle.
http://imgur.com/a/Siwn4

Don't worry, I don't mind at all. After all, I want to test this as well! :)

In fact, do you have any other elevation maps I can play with?

That celtic texture looks very nice, I think that did well. I was hoping for a little better results with the unit texture, but I'm afraid I can't do much about it because I didn't make that one. I also don't have any more elevation maps. Though I could make another to demo. Is there one you had in mind you would like to see? I think all the shield textures have some benefit from both the specular and normal mapping.
Jason Bishop [ aka Wijitmaker ]

Wildfire Games CFO, retired artist
Contact me: jason@wildfiregames.com

Support Wildfire Games!!!

#678 wraitii

wraitii

  • WFG Programming Team

  • Primus Pilus
    (1,011 posts)

Posted 10 July 2012 - 08:49 PM

Was parallax activated on the unit?
@Don't overstress yourself: the less I can work on shaders, the more I'll work on my bot :)
Wraitii
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.

#679 myconid

myconid

  • WFG Programming Team

  • Centurio
    (789 posts)

Posted 10 July 2012 - 09:06 PM

View PostWijitmaker, on 10 July 2012 - 08:47 PM, said:

That celtic texture looks very nice, I think that did well. I was hoping for a little better results with the unit texture, but I'm afraid I can't do much about it because I didn't make that one. I also don't have any more elevation maps. Though I could make another to demo. Is there one you had in mind you would like to see? I think all the shield textures have some benefit from both the specular and normal mapping.
Well, when all this is done and committed I guess we'll probably want to do a "tech demo" for PR. Maybe first check if whoever is in charge of promotional materials has some specific preference. Personally, I'd love to see how the roman buildings look like, especially the Mars temple and civil centre that I've been testing with all this time. If not those, pick whichever buildings you think will come out looking the coolest.

View Postwraitii, on 10 July 2012 - 08:49 PM, said:

Was parallax activated on the unit?
@Don't overstress yourself: the less I can work on shaders, the more I'll work on my bot :)
No parallax, it's just a normalmap. Nope, not stressing at all, I just like to be efficient.
Myconid
Wildfire Games Programmer
Contact me: myconid@wildfiregames.com

#680 feneur

feneur

  • 0 A.D. Project Leader

  • Cartographer of imaginary worlds
    (7,062 posts)

Posted 10 July 2012 - 09:49 PM

View Postmyconid, on 10 July 2012 - 04:37 PM, said:

Ah, ok. Created a new map using a 3x3 Sobel filter, as opposed to the 2x2 filter you used. Using GIMP's normalmap plugin. Still pretty subtle.
http://imgur.com/a/Siwn4

I personally don't think that's subtle at all, in fact I'd say it looks a bit extreme on the stone walls =) Perhaps it needs a higher resolution texture to make any difference for the straw roof/wood though, but on the other hand perhaps it's not ever going to make a big enough difference on such areas at the zoom we're using :unsure:

Erik Johansson [ aka feneur ]

Wildfire Games
Contact me: feneur@wildfiregames.com



Support Wildfire Games!





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users