RSP - Relief Shaders Pack on Asset Store

Released:
http://u3d.as/content/tomasz-stobierski/rsp-relief-shaders-pack

Please, take a look at documentation here for detailed description:
http://www.stobierski.pl/unity/__RSP_release_info.pdf

Latest working demos here (I had to split them into 5 to make them smaller as GLSL may be problematic at precompiling over 20 shaders per demo):
http://www.stobierski.pl/unity/RSP_demo1/WebPlayer.html
http://www.stobierski.pl/unity/RSP_demo2/WebPlayer.html
http://www.stobierski.pl/unity/RSP_demo3/WebPlayer.html
http://www.stobierski.pl/unity/RSP_demo4/WebPlayer.html
http://www.stobierski.pl/unity/RSP_demo5/WebPlayer.html

Mac users - as GLSL shaders used are rather complex so it might take a while to compile them - especially in demo1 - plenty of shaders on scene. Unwarmed shaders “hiccups” may occur (should gone after every object has been rendered by camera).

Also I had to disable antialias postFX everywhere because it seems that this is what crashes some machines (and most probably has nothing to do with my shaders).

Pre-release discussion here:
http://forum.unity3d.com/threads/152531-New-relief-mapping-techniques-%28fast%29/page2

Main features:

  • Procedural shaders
  • Distance map shaders
  • Extrude map shaders with real 3d volume
  • Steep Parallax Occlusion shaders with real silhouettes
  • Volume shader to mimic hi-poly geometries using lo-poly meshes
  • Rich features like self-shadowing, any lightmap handling and more
  • Adjustable to use features needed only
  • Requires GPU with SM3.0. Does not require Unity PRO (only example scenes use post FXes).

Version 1.0c update available → openGL hotfixes + POMVolume blend file with info how to setup it in Blender
Version 1.0d update available → openGL hotfixes for RTP bonus POM shader
Version 1.0e update - DX11 compatibility solved (works even faster than in d3d9 mode)

Very nice, impressed with the quality too especially with AA.

These are super good… nothing better than seeing relief mapping in a game…

very impressive!!!they work with mobile platform?support reflection or transparent property?

You’re probably too demanding when we concern mobile platforms, honestly I couldn’t and didn’t checked it. If only mobile GPU handles SM3.0 with conditional branching and is reasonably fast they could work. Procedural and distance map (refer to doc which are they) shaders are best candidates for mobile GLES target. They don’t need heavy GPU load in terms of texture fetching but uses a bit of math instead.

Reflection/transparent. At this moment I haven’t prepared such shaders but my techniques themselves don’t constraint such application. If we’ve got parallax texture offset calculated with right normal in tangent space I see no problem in making such shader versions, too. They could also handle self-shadowing even with transparency as shadows are calculated inside shader fragment program per object, not globally.

Tom

thanks,once again very impressive shaders!!

Send you a PM (not directly related to this) , so free bump to let you know in case you have PM notifications disabled.

Version 1.0c update available → openGL hotfixes + POMVolume (king kong face) blend file with info about how to setup it in Blender

Niice but a few questions :

  1. What about perfomance in a complete scene ?
  2. Does it works with beast ?
  3. Doest it works with Props ?

OK, I read your documentation so It works both with beast and lights props.

What about performance with a full AAA scene ?

You’ll just have to judge shaders performance by watching framerate of demos in fullscreen mode on cheaper hardware. The problem is that webplayer doesn’t always show the real FPS, but constrained by some kind of v-blank sync issues. That’s why I ask to test it on cheaper hardware, check GPU benchmark for them and make approximate performance for better GPU. I found it works fine. For example I test it on my hardware, then compare my GPU scoring with another GPU (on benchmarking websites) and FPS ratio fits quite well in most cases.

Full AAA scene means AAA hardware needed I guess ? Well, for AAA hardware RSP shaders behave very fast. They’re fragment shader dependent, so the performance is associated to number of pixels shaded only (polycount doesn’t apply).

Anyway - on my mid-range hardware (nVidia GT240) rendering full screen all covered by material using the most expensive shader @1280x1024 takes c.a. 5-6ms with all features included (self-shadowing) what gives about 200fps. Everything depends on settings. Shaders are fully adjustable. You don’t have to take all or nothing but tailor shaders features and quality against performance that would satisfy you.

I’m talking about most expensive POM shader (steep parallax with self shadow and correct silhouettes). Using specialized shaders like procedural or distance map shaders (quite enough for surfaces like pavements or brickwalls) will give you 2-3 times better performance. Most of my specialised shaders can take the fullscreen job with all bells and whistles below 3ms. SpaceStation scene in fullscreen w/o Unity shadows (they’re another story about performance and any shader even simple diffuse won’t make them working faster) runs at about 300-400fps on my hardware.

Also - remember to render the most expensive shaders last (setting their RenderQueue in shader code tag to higher value) this way every expensive POM surface that is occluded by another geometry rendered before will cost nothing (only object geometry will be considered for calculations by vertex shading unit).

It’s kind of myth that POM shading must be of extraordinary performance cost. In fact - it was for GPUs like nVidia 6000 series, but nowadays when you think about reaching AAA visual level you should definitely think about using POM shading as it’s alternative for DX11 tessellation (but works on wide range of platforms like dx9 PC and Macs). You can always add fallback subshader that would realise simple PM (parallax mapping) or bumped specular for low GPUs and switch it by using shader LOD level.

ATB, Tom

Thalks for all your answers !

Can you screen, or explain what kind of maps we need ? For exemple, if i want to use substances, must i create another texture for exemple a kind of heightmap (i think to specials heightmap made with a base one and normal map) ?

Due to much better performance shaders that use heightmaps use it alone (Alpha8), not combined with normalmaps. Substances can output diffuse with specular (in alpha), normal and heightmap. In examples I’ve just saved substance outputs as textures. However it would be cool idea to integrate substances with my SteepParallax shader. Will look into it for next update if it’s feasible.

So at maximum your shaders use 3 textures ?
1 : Diffuse, 2 : Normal Map, 3 : Classical Heighmap

Considering Steep Parallax and Extrude Shaders - yes (specular can be mixed with diffuase on alpha channel - it’s set in shaders define and is adjustable, we can also derive specularity from overall diffuse brightness - a few examples use it).

Procedural relief shaders - only diffuse/spec (color).

Distance map shaders (like bricks, space station) - diffuse, normal (optional), distance map (made by my tool included), displace map (optional - its’ kind of normal map that will modify a bit tangent space so that reliefed edges are not so sharp, synthetic).

Just to know, how/where did you learned to code shader ?

Examining surface shaders docs and Cg web resources and other web resources related to shaders (as I’m educated computer engineer general programming issues are just common tasks for me).

What might be important for users that indent to buy it in near future - Christmass sale is coming ! (waiting for Unity AssetStore staff moderation). 40% off :slight_smile: I hope it will encourage many potential users which then could put kind of feedback - testimony (positive I hope) here.

For anybody that could miss it - Christmas sale just started.

Don’t know which criteria is used by Unity AssetStore staff to mark product as “hot deal” in AssetStore. I see many featured products with its %50, but is it for choosen one ?

Just bought the package, but there are things I have to ask. The height map textures in the pack are quite different from what I have. How could I achieve such height maps? Mine do nothing. (Generated in CrazyBump) Also, when using objects that have more complicated geometry (such as interior building), when I put a silhouette shader, it starts stretching the texture when moving the camera. Also, if I put the Steep Parallax shader, the object starts clipping and at some points you could see through the model.

Is there any documentation to the pack? I can’t seem to find any…