The Empire has fallen and a New Republic is born out of the conflict. But in the ashes of civil war, yet another life stirs...

  • View media
  • View media
  • View media
  • View media
  • View media
  • View media
Report RSS New Parallaxing Shader (view original)
New Parallaxing Shader
embed
share
view previous next
Share Image
Share on Facebook Post Email a friend
Embed Image
Post comment Comments
the_Farseer Author
the_Farseer - - 6,407 comments

For those who don’t know, parallax is the term used to describe distant objects moving past us slower than near objects. How this applies to the new shader is simple. Take 2D texture data (basically just an image file) and plug in a normal map, which supplies volumetric data (XYZ axes) based on color. Usually a normal map defines how a 2D texture interacts with light data, where the simulated color volumes cause certain pixels to show a highlight or shadow depending on the position of the light source in relation to said texture. Parallaxing takes this one step further by telling the GPU to “extruded” pixels based on this data and the angle of the game camera. In other words, if my normal map says that this 2D texture should have a crater in the middle of it then depending on the position of the game camera, it will stretch, hide, or move certain pixels in order to simulate a truly 3D object…without the need to actually model one. So as I scroll my camera over said texture, perspective is simulated…that crater won’t just stay a circular shape. The pixels will actually be manipulated so that as I view it from a more oblique angle, it looks like an actual scoop out of the earth (ie: can no longer see the bottom of the crater from extreme angels). Little details in my texture like rocks will appear to actually sit ON the terrain, rather than just be a flat texture. The examples above help to demonstrate:

1) An exaggerated example of what parallaxing does, so you can see it in action. This is a flat texture which normally depicts a rocky surface, like a riverbed. You can clearly see how it is pulling pixels to try and simulate a bunch of 3D objects. Again, this example is exaggerated.

2) A more natural example of how this shader looks in an in-game environment, when parallaxing small rocky textures.

3) Obsidian being rendered on Mustafar. The white line shows the actual map geometry, while the thin blue lines show where the shader is attempting to parallax. You can see how this adds more “depth” to a texture, beyond what a regular normal map can do.

4 and 5) Additional in-game examples, showing how even on more subtle surfaces, parallaxing can have an effect.

Reply Good karma+15 votes
the_Farseer Author
the_Farseer - - 6,407 comments

FYI, this shader is a WORK IN PROGRESS. I understand some details may no be perfect in the screenshots above. All in good time...

I also want to thank Doci from the Yuuzhan Vong mod team for collaborating on this. He and I troubleshot this shader for a while to get it about 90% done, where I finished up later that day. Really appreciate your teamwork here!

Reply Good karma+5 votes
{HEROIC}Doci
{HEROIC}Doci - - 1,848 comments

Glad I could help :3 Looking forward to more !

Reply Good karma Bad karma+2 votes
the_Farseer Author
the_Farseer - - 6,407 comments

*Changes name to LEGENDARY Doci*

Reply Good karma+5 votes
Jeroenimo
Jeroenimo - - 6,765 comments

As usual, amazing work, and looking forward to more!

Reply Good karma Bad karma+3 votes
the_Farseer Author
the_Farseer - - 6,407 comments

Thanks! Given the nature of parallax...the effect is much better when you can actually move the camera. Once I get the shader totally finished and work out all the finishing touches, I may post a video.

Reply Good karma+4 votes
Darth_Saber
Darth_Saber - - 917 comments

Beautifully done, the_Farseer! You and Doci together are bringing this game to a whole new level of awesomeness.

Reply Good karma Bad karma+2 votes
Burntstrobe
Burntstrobe - - 3,471 comments

Who would have ever thought Farseer and Doci working together....

Oh the possibilities of the things to come... Great work guys, this will be very exciting to have in the game (now that i have actually read the information and understand what this does :)

Reply Good karma Bad karma+4 votes
MapperLocutus
MapperLocutus - - 985 comments

Wow, this is ... impressive!

Reply Good karma Bad karma+2 votes
Blue_Fyre
Blue_Fyre - - 713 comments

i am ashamed; but i dont see it. am i blind or something?

Reply Good karma Bad karma0 votes
the_Farseer Author
the_Farseer - - 6,407 comments

Video is processing now... That will illustrate this more clearly. Stay tuned.

Reply Good karma+1 vote
SquishyforGDI
SquishyforGDI - - 400 comments

Could you use this shader to make engines appear as cylinders instead of hexagons?

Reply Good karma Bad karma+1 vote
the_Farseer Author
the_Farseer - - 6,407 comments

No, it doesn't work that way. The front face of the hex/oct/dec/etc would still appear low poly. This shader is means to make textures "pop out" on flat surfaces but it can't create the illusion of adding or smoothing out low poly geometry.

Reply Good karma+1 vote
Aetherial87
Aetherial87 - - 449 comments

Talk about an improvement, nice work

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: