Futurecraft Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Futurecraft Forums

A forum dedicated to communication and innovation!
 
HomeLatest imagesSearchRegisterLog in
Welcome, one and all, to the Futurecraft Forums!

 

 Parallax Occlusion Mapping

Go down 
4 posters
AuthorMessage
fr0stbyte124
Super Developrator
Super Developrator
fr0stbyte124


Posts : 1835
Join date : 2011-10-13

Parallax Occlusion Mapping Empty
PostSubject: Parallax Occlusion Mapping   Parallax Occlusion Mapping Icon_minitimeThu Jul 12, 2012 10:41 pm

I've seen some HD texture packs for the shader mod, which have featured parallax maps before, and it was always fairly unimpressive looking because it was being used where it wasn't needed. Well, it turns out the technique is quite a bit more powerful than I had thought.



Now imagine, instead of a wooden pyramid, that is a pyramid made of stone in minecraft, and imagine that there's an extra layer of shader logic in there which forces the displacement pattern to conform to a grid. This is it, right here. The answer to how Futurecraft will render 3D terrain on the planetary level. The displacement map and base geometry can be calculated and stored alongside the terrain texture. Trilinear interpolation can ensure a smooth transition all the way to the regular geometry mesh. It can even support self-shading, which will allow shadows to work even at extreme distances.

Pros:
Affordable in terms of GPU cost.
Easy to adjust the level of detail to fit the data available.
Requires no additional geometry, allowing for unlimited scale (resolution permitting).

Cons:
More expensive than bump-mapping, which might provide adequate results at a distance. Also more expensive than hardware tessellation, but that can only be done on high end cards.
Height-map based. Can't show concavities or holes without additional geometry. Doesn't happen a whole lot in Minecraft terrain but it is worth mentioning.
Doesn't handle silhouettes, so something else would need to be done at the horizon, particularly from a ground-based perspective. Tessellation with displacement mapping would work, but again that is only available on new cards.
Limited depth. Height is stored to a texture, so there is a finite range of displacement possible. The the range can be scaled, and tweaking geometry will help. Plus, another shader layer can refine the terracing effect so that more can be done at less resolution.


Even with its flaws, parallax occlusion mapping would greatly improve the look of planets and long distance viewing, and I've got a good feeling about it.
Back to top Go down
Keon
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
Keon


Posts : 3076
Join date : 2012-01-17
Location : Hahahaha.

Parallax Occlusion Mapping Empty
PostSubject: Re: Parallax Occlusion Mapping   Parallax Occlusion Mapping Icon_minitimeFri Jul 13, 2012 12:09 am

fr0stbyte124 wrote:
I've seen some HD texture packs for the shader mod, which have featured parallax maps before, and it was always fairly unimpressive looking because it was being used where it wasn't needed. Well, it turns out the technique is quite a bit more powerful than I had thought.



Now imagine, instead of a wooden pyramid, that is a pyramid made of stone in minecraft, and imagine that there's an extra layer of shader logic in there which forces the displacement pattern to conform to a grid. This is it, right here. The answer to how Futurecraft will render 3D terrain on the planetary level. The displacement map and base geometry can be calculated and stored alongside the terrain texture. Trilinear interpolation can ensure a smooth transition all the way to the regular geometry mesh. It can even support self-shading, which will allow shadows to work even at extreme distances.

Pros:
Affordable in terms of GPU cost.
Easy to adjust the level of detail to fit the data available.
Requires no additional geometry, allowing for unlimited scale (resolution permitting).

Cons:
More expensive than bump-mapping, which might provide adequate results at a distance. Also more expensive than hardware tessellation, but that can only be done on high end cards.
Height-map based. Can't show concavities or holes without additional geometry. Doesn't happen a whole lot in Minecraft terrain but it is worth mentioning.
Doesn't handle silhouettes, so something else would need to be done at the horizon, particularly from a ground-based perspective. Tessellation with displacement mapping would work, but again that is only available on new cards.
Limited depth. Height is stored to a texture, so there is a finite range of displacement possible. The the range can be scaled, and tweaking geometry will help. Plus, another shader layer can refine the terracing effect so that more can be done at less resolution.


Even with its flaws, parallax occlusion mapping would greatly improve the look of planets and long distance viewing, and I've got a good feeling about it.

YEEEEEAHHHH! That's awesome. How does it work?

Also, silluettes are just objects with no light.
Back to top Go down
fr0stbyte124
Super Developrator
Super Developrator
fr0stbyte124


Posts : 1835
Join date : 2011-10-13

Parallax Occlusion Mapping Empty
PostSubject: Re: Parallax Occlusion Mapping   Parallax Occlusion Mapping Icon_minitimeFri Jul 13, 2012 1:05 am

How it works is kind of complicated, but the criminally oversimplified version is that the pixel shader tries to figure out what displaced pixel belongs in a given spot rather than what is actually there.

Also, silhouette refers to the outline of an object. Not lighting it up is simply an easy way of showing it.
Back to top Go down
Danice123
DEV
DEV
Danice123


Posts : 607
Join date : 2012-01-06
Age : 30
Location : The Dankins

Parallax Occlusion Mapping Empty
PostSubject: Re: Parallax Occlusion Mapping   Parallax Occlusion Mapping Icon_minitimeMon Jul 16, 2012 10:14 am

So load chunks like normal minecraft, but any chunk not loaded and visible can be rendered cheaply using this. That's pretty cool.
Back to top Go down
http://wbcentral.com
Tiel+
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
Tiel+


Posts : 5497
Join date : 2012-02-20
Age : 26
Location : AFK

Parallax Occlusion Mapping Empty
PostSubject: Re: Parallax Occlusion Mapping   Parallax Occlusion Mapping Icon_minitimeMon Jul 16, 2012 10:16 am

Yes, this is really cool!!
Back to top Go down
fr0stbyte124
Super Developrator
Super Developrator
fr0stbyte124


Posts : 1835
Join date : 2011-10-13

Parallax Occlusion Mapping Empty
PostSubject: Re: Parallax Occlusion Mapping   Parallax Occlusion Mapping Icon_minitimeMon Jul 16, 2012 10:47 am

It can be rendered (relatively) cheaply, but only within the real estate of the flat mesh. To show actual 3D structure, you need something stronger. I'm going to see if there are any good hybrids between the two.
Back to top Go down
Danice123
DEV
DEV
Danice123


Posts : 607
Join date : 2012-01-06
Age : 30
Location : The Dankins

Parallax Occlusion Mapping Empty
PostSubject: Re: Parallax Occlusion Mapping   Parallax Occlusion Mapping Icon_minitimeMon Jul 16, 2012 9:23 pm

But since this is distant rendering, it really doesn't have to be 3D, it just has to look like it is 3D. Like the static backgrounds to a lot of video games, they aren't ever reachable by the player, so they only have to be an image that looks like it is 3D from every point on the map. (I may be totally off-base here, just suggesting stuff)
Back to top Go down
http://wbcentral.com
fr0stbyte124
Super Developrator
Super Developrator
fr0stbyte124


Posts : 1835
Join date : 2011-10-13

Parallax Occlusion Mapping Empty
PostSubject: Re: Parallax Occlusion Mapping   Parallax Occlusion Mapping Icon_minitimeMon Jul 16, 2012 11:54 pm

That's usually handled via skybox. In this case, however, the distant terrain needs to be fairly accurate since you can actually travel to it. Plus, depending on where you are on the planet the distant scenery is going to be different, so you have to be continuously rendering new perspectives for the skybox, which kills most of the savings, especially at high speed transit.

*edit*
There might be some potential do doing other things with the horizon, though. For instance, masking the silhouette of the terrain so the edges show up properly. Not entirely sure how or if that would work, but I'll think about it.
Back to top Go down
fr0stbyte124
Super Developrator
Super Developrator
fr0stbyte124


Posts : 1835
Join date : 2011-10-13

Parallax Occlusion Mapping Empty
PostSubject: Re: Parallax Occlusion Mapping   Parallax Occlusion Mapping Icon_minitimeTue Jul 17, 2012 2:27 am

Okay, forget what I said before about POM not being able to do silhouettes. This video clearly shows it is possible. (About half way through when the depth is increased.)



Looks like there have been some additional advancements in this technique I was not aware of.
In this case, it doesn't seem to actually extend past the bounds of its host polygon, but in can retract behind the edges of it, allowing the viewer to see through. That's actually ideal behavior for our terrain model. All we have to do is generate a low-poly hull around the mountains and other terrain and then handle the difference between the two by storing a heightmap texture (in this case it's all behind the face). If we're smart about it, we can do texturing (though at the scale this will be used, there probably won't be much to texture), normal mapping the 6 faces, and depth enhancement procedurally, all in the shader (possibly with a two-pass system). This in turn would let us describe the terrain with significantly lower-resolution data, particularly if we can make certain assumptions about the error level of the approximated geometry.

I probably won't say a whole lot about it until I finish the algorithm for the distance shader. Some of this will require novel techniques, which should be fun. Turns out, there's not a whole lot of research in the area of how to make objects look blockier than they are.
Back to top Go down
Sponsored content





Parallax Occlusion Mapping Empty
PostSubject: Re: Parallax Occlusion Mapping   Parallax Occlusion Mapping Icon_minitime

Back to top Go down
 
Parallax Occlusion Mapping
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Futurecraft Forums :: General Area :: Members' Lounge-
Jump to: