TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

GameGuru MAX - Request - Parallax Occlusion Mapping for Materials #3049

Closed MonkeyFrogStudio closed 1 year ago

MonkeyFrogStudio commented 2 years ago

I would love to see Parallax Occlusion Mapping added to MAX at some point. It's an amazing way to add details to models without adding geometry. If used wisely, such as creating a texture atlas or a single material sheet of "decals" or "atlases" these details can be used an all sorts of models all over a level to add immense amounts of details with little overhead (again, if used wisely). Here's an example of a sci-fi crate I made in Blender that uses a parallax occlusion material for all the details:

https://user-images.githubusercontent.com/36735507/167040453-aedda8fe-4878-4ef6-bcd5-f06c764c8831.mp4

Here's a still of the crate: paralax1

And this shows which parts are the parallax occlusion pieces: paralax3

Necrym59 commented 2 years ago

Parallax Occlusion Mapping should be implemented, it is in nearly all the engines now, (god even minecraft are using it) no point in being left behind now. Its overhead is small if used wisely especially on object and decals. Im sure the wiked engine would have this capability. The effects are remarkable and effective especially with dynamic lighting . sample_decal even used on standard areas it can make vast differences to the overall game giving AAA quality. Although this is like Displacement mapping the results are similar both or either could be implimented. paralax_sample

MonkeyFrogStudio commented 2 years ago

Wicked Engine already has Parallax Occlusion Mapping:

https://github.com/turanszkij/WickedEngine

68747470733a2f2f747572616e737a6b696a2e66696c65732e776f726470726573732e636f6d2f323031392f30312f706f6d2e706e67 7

fearlesswee commented 2 years ago

Parallax occlusion mapping would especially be super beneficial to terrain, which can be pretty flat and "smooth" feeling atm.

MonkeyFrogStudio commented 2 years ago

@fearlesswee From what I understand, parallax occlusion mapping is one of those things that you have to use carefully because it can hit hit the engine pretty hard if used too heavily. Instead, they need to use PBR materials on the terrain (if they're not) with a sufficient normal map and nice roughness, etc., to get the terrain to look less "smooth".

earthling45 commented 2 years ago

POM is very suiting for terrain and walls. FS22 now uses (though done ugly in certain areas, too much too deep) POM for ground and walls. The fps even on 3440x1440 never dip below 60 fps.

But i see what you are getting at, i did something similar a few years ago when we were suposed to get POM in classic. :)

Only normal map FLjL4rl

with heightmap elyobZr

Yet i wonder if those extra polygons are still going to matter much if displacement is used. This question because of those multi million polygon structures with which 3com has been testing. :)

MonkeyFrogStudio commented 2 years ago

Yet i wonder if those extra polygons are still going to matter much if displacement is used.

Parallax Occlusion Mapping doesn't create any extra polygons. It's purely a texture trick:

"Parallax Mapping refers to the offsetting of the texture coordinates and Occlusion refers to the ability to shadow the parallaxed result accurately. Parallax Occlusion Mapping, or POM for short, works by taking iterative steps along the height field checking for intersections."

It's more like a normal map on steroids, adding additional "height" information for more accurate lighting and deeper/higher effects. However, it still has very similar limitations (i.e. viewed from severe angles will reveal the surface is actually flat, etc.) and is very GPU intensive, so should be used wisely.

earthling45 commented 2 years ago

Parallax Occlusion Mapping should be implemented, it is in nearly all the engines now, (god even minecraft are using it) no point in being left behind now. Its overhead is small if used wisely especially on object and decals. Im sure the wiked engine would have this capability. The effects are remarkable and effective especially with dynamic lighting . sample_decal even used on standard areas it can make vast differences to the overall game giving AAA quality. paralax_sample

The latter example is displacement i think, not parallax. :)

earthling45 commented 2 years ago

Yet i wonder if those extra polygons are still going to matter much if displacement is used.

Parallax Occlusion Mapping doesn't create any extra polygons. It's purely a texture trick:

"Parallax Mapping refers to the offsetting of the texture coordinates and Occlusion refers to the ability to shadow the parallaxed result accurately. Parallax Occlusion Mapping, or POM for short, works by taking iterative steps along the height field checking for intersections."

It's more like a normal map on steroids, adding additional "height" information for more accurate lighting and deeper/higher effects. However, it still has very similar limitations (i.e. viewed from severe angles will reveal the surface is actually flat, etc.) and is very GPU intensive, so should be used wisely.

I know but POM requires extra passes whereas displacement adds extra geometry, which is preferable?

cybernescence commented 2 years ago

parallax occlusion with soft shadows Also hoping to get this into GG Classic, prototype with soft shadows in the gif (the test cube has only 6 planes, no other geometry)

LeeBamberTGC commented 2 years ago

@cybernescence Looks fab!! I notice as well, might be my imagination, but are you moving the SUN in Classic? :)