I’ve been working on a shader that uses blended splatmaps (like Unity’s terrain) for any mesh, but also has normal mapping, detail normal textures and displacement mapping (Parallax or Relief) for as much realism as possible. All of the options can be turned on or off, so that the one shader can be used on a wide range of desktop hardware, as well as fallbacks for PS2.0 capable hardware, and even a very basic version (blended textures only) that’ll work on flash in 3.5. At the moment it works on arbitary meshes, and I’m working on a version (mainly the scripting side) that’ll work with Unity terrain. Hopefully, when it’s ready, I’ll put it on the Asset Store.
In a state of flux at the mo, so the old info isn’t accurate anymore. I’ll edit this when it changes.
My friend, you just saved my life… I created a material that has nearly everything I want on it… but I hope this will allow me to paint textures directly in Unity on the terrain meshes and have a GREAT looking mountain… Do you use Vue or Zbrush to design your mountains or caves?
I use L3DT for the terrain meshes as it allows you to export a splatmap, and a mixture of L3DT and Silo3D for the caves. When I complete the Unity terrain version, I’ll put up a webplayer of that too, so you can see if it meets your needs!
That is cool…I just do my terrains in Vue, export the super high res version of and detail it some more in Zbrush… I am not used to terrain painting in Unity…
Here’s the 3.5 flash fallback shader, which is the equivalent of Unity’s terrain shader ,running those two scenes. As Unity Flash doesn’t work with terrain at the moment, I might write an obj exporter for it, so that you can decimate the terrain in something like MeshLab and reimport it, then render it with this shader. I’m not sure about Unity Technologies’ stance on exporting terrain meshes though.
In a state of flux at the mo, so the old info isn’t accurate anymore. I’ll edit this when it changes.
it seems as if it doesn’t work on os x. but even if it would i do not see the point of this shader for chris morris has already brought bump and paralax mapping to the built in terrain. in spite of all its limitations using the built in terrain engine i think gives you a lot of advantages as long as you are targeting desktop devices and do not need cliffs and overhangs: automatic LOD, grass, trees.
New webplayers up (see OP) with more sensible normal maps and tiling.
larsbertram:
This will work with the built in terrain too (am finishing up the scripting), and provides support for relief mapping at reasonable frame rates on modern hardware, an overarching normal map for the entire terrain that can be blended with the splat maps, per splat map detail normal mapping (as in a second set of normal maps blended at a higher tiling), per splat mono specular maps which can be coloured in forward rendering and per splat displacement levels (although the demo doesn’t show that, for simplicity). This is in a single shader that takes a different pathway depending on which form of displacement mappng you choose. Also, for performance reasons, you can set the displacement and detail normals to cut off depending on the distance of the pixel from the camera.
As for OSX, try the latest version of the webplayers (same link as in the OP) - they work on my iMac as well as they do on Windows machines. Also I’m working to get the PS2.0 fallback to work on iOS devices.
After doing some testing after larsbertram’s comment, it doesn’t seem to work correctly on OSX Leopard with Intel GMA 950 graphics. It does however work on Windows with the same card (in fallback mode, obviously), I suppose due to the use of DirectX over OpenGL. I cannot see how to solve this at the moment.
I have got it to work on iOS, albeit not at interactive framerate., I’m seeing if the fallback shader can be simplified further for iOS only.
Sorry it’s taken so long to continue, but I’ve been in and out of hospital for the last few weeks, which has been rather annoying;)
As for this shader, I worked out the problem that affected a lot of cards, but then Unity 3.5 broke it, even though it worked on the beta. When I can get it stable, I’ll post again.
As there have been problems getting the terrain replacement part of this shader working on 3.5(see here), I’m thinking about just releasing the mesh version of the shader, if anyone is interested.
It’s a shame, but can’t be helped.
Here’s a demo - please tell me if you have any problems (note, as said above this is a mesh, rather than a Unity Terrain, and also the displacement level is per splat as opposed to a single level, as in the demo): (Webplayer Demo)
The textures used aren’t the best to display relief/parallax mapping. Maybe you should try something with a different distribution of high frequency details.
The textures used aren’t the best to display relief/parallax mapping. Maybe you should try something with a different distribution of high frequency details.
Right - I’ve decided to write a manual, as I think it needs one, plus it can also outline a pipeline for transferring Unity Terrains into a useable mesh.
When I’ve completed that, I’ll decide on a price.
koyima - I agree completely - I’ll also stick up a demo which shows off the features better - starting with better textures
Well, I definitely wouldn’t suggest that amount, it seems to unfinished. Too much shimmer everywhere, etc. Would be interested in experimenting, but not for that.
How much would you suggest - it’s up in the air at the moment?
Also, if you don’t mind, could so tell me what GPU you get shimmer on? I’ve seen it on some nVidia cards(and am working on fixing it asap), but not on AMD ones so far.
Also in regards to writing the manual, that might take some time, for the same health reasons mentioned earlier.
I would be interested in the mesh shader. I am currently looking at writing my own splatmap shader for custom terrain in my game but haven’t had any luck/time to really get into it. I personally value a non-unity terrain shader more than a unity terrain shader.