A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by larsbertram1, Oct 17, 2012.
it won’t work on ios for it needs shader model 3.
sorry about that,
just a little late easter egg: i have picked up work again and this time it has turned out well so far – so mesh blending is coming:
shader and script are nearly done, now i am working on the docu.
just a few more pictures to show what you will be able to achieve using the the mesh blending script and shader…
i hope you enjoy,
and finally a first webplayer:
You know, at least someone took the time to release something. RTS is a whole lot more expensive. To be honest, I suggest you Edit your post to be less of an ass.
That is the most inapropriate comment or review i have ever read. I mean this shader is pure gem. If you want 1 second terrain solution you should use default Unity terrain, thats what its for, it takes a lot of time to built very realistic terrain in ANY engine with ANY complex shader as this one. And if you really think that you are going to build RTS with your attitude you are very wrong.
Lars mesh blending looks great, just wondering how are drawcalls handled with those meshes. Each mesh ads another drawcal or? Can you use like hundreds of them?
in fact each mesh adds 1 or even 3 draw calls when using real time shadows.
if your meshes share the same material you might think of using static batching – but unfortunately this does not work and corrupts shading.
however you can use the "combine children" script to reduce the number of draw calls. that’s absolutely not a perfect solution though but might speed up rendering for nearby meshes.
nevertheless i would not recommend to add hundreds of blended meshes to your terrain: that would make the built in terrain obsolete.
blended meshes still are just ordinary game objects using a pretty heavy pixel shader. so try to get the best out of the built in terrain and add blended meshes only where they are really needed.
Kyrix, tone down the language and be more constructive please.
I can not wait for that blend shader!!!!!
How flexible is this if I want to make changes to the terrain?
well, i guess you will have… at least for some more days ;-)
right now i am working on a custom editor which – i hope – will make the work with setting up the shader much easier.
it will contain a lot of help boxes guiding you through the whole process of setting everything up, will give you the possibility to just calculate average color values of the detail textures with a single click, apply the splatmap and let you create and update the blend mesh materials, so they will always fit your terrain’s settings.
it works in unity 3.x – now i have to make it work in unity 4.x.
next to that i have tweaked the shader so that the multi uv mixing factor is now adjustable.
nevertheless it will still take some time to iron everything out, write the documentation and get it on the asset store.
i hope you will stay tuned,
preview of the new editor:
depends on what you mean with "changes"…
as the shader was built for use with a custom color and a terrain normal map these both textures limits your freedom of making chages to the terrain a bit.
of course you can use all built in terrain tools like painting and sculpting or lets say a plugin like easy roads to lay out paths and streets, but any major change on the heightmap will break the relationship of heightmap and terrain normal map.
so minor changes are absolutely ok like raising the height of the terrain a bit in order to make it fit better with your placed game objects like houses but flattening a whole moutain will give you some weird results at far viewing distances as the terrain normal map will still hold the information about this mountain. in thois case you would have to adjust the terrain normal map.
same with the painting tool: of course you can redefine the distribution of your detail maps right within unity using the built in painting tools but painting a brown rock texture on top of a green color map will give you: green rock... however - you can paint decals!
so in case you are used to fully model and paint yout terrain within unity this might be a bit disturbing unless you find a good workflow like not working with a terrain normal map and assigning a simple grey texture as colrmap, which you will replace later on by a color map created from your splatmap and some filters may be.
alternativly you can just model and paint your terrain using up to 6 normal mapped detail textures and unity’s build in terrain shaders and then create your terrain normal and color map and import the color map ultra shader just to do the finishing.
is that flexible?
Looking great lars.
Happy to wait.
it seems like i can do do the needed adjustments rather fast.
the new version will bring an editor script for unity 4 too which helps you to setup the terrain and mesh blending materials.
it looks pretty much the same like the editor for unity 3 but works differently as it only handles materials and no global shader variables.
for this reason it is pretty easy to setup multiple terrains in unity4.
Preview from unity 4 indy:
Looks awesome,great and Pro improvements here..
Ich warte sehr gerne... (hope is that correct!?)
the work on the new version is nearly done.
i am just working o the docu an doing some small fixes here and there.
so i would like you to give a brief overview on what has changed and what’s new:
- The new editor guides you step by step through the whole set up process and offers a lot of help.
- It lets you create average color values for each detail texture just with one click.
- It lets you combine normal maps right within unity, so testing different textures is rather quick and simple.
Multi UV Mixing
- Changed: The size of the first and second version of the blended texture has changed. Now you adjust the size of the detailed version with the "Size" value within the painting tool whereas the size of the upscaled version is set via the editor. So you do not have to set huge sizes for the third texture in the painting tool anymore.
- Changed: The upscaled version of the normal map won’t fade out in this version. It will be present even at close viewing distances.
- The size of the second version of the textures which get’s blended with the originally scales one can be adjusted within the editor.
- Next to the blending mode of version 1 this one offers a new mixing mode which simply multiplies both scaled version of the texture which gives you a very lively and rich in contrast result. You may have to adjust your textures though to get nice results using this mixing mode.
- Next to the color correction for each decal already present in version 1 you now have to possibility to adjust the sharpness for each decal.
Painting with Detail Texture 6 and 7 and adding Decals
- No second terrain is needed anymore. You simply paint on your terrain. That’s all.
- This version comes with a mesh blending shader and script that will you allow to fade any abitrary mesh smoothly with your terrain as far as texturing and lighting is concerned.
- The editor lets you simply create proper mesh blending materials and keep them in sync with any change you make to your terrain.
i hope i will finish the work this weekend and upload it to the asset store on monday.
Sounds great! Looking forward to the next release
Hi there larsbetram1, to begin with your terrain toolset is fantastic, and I'm looking forward to the newest changes you've made.
Now for the question. I'm having issues with the terrain I'm trying to use the shader with. When I apply my color map and splat map the terrain has a very big difference between the lights and darks. What I mean by that is that the darks are way too dark and the lights are way too bright. Now when I implement the color map and splat map that comes standard with the tool set everything looks fine. I read through all of the documentation and I couldn't find anything definitive on what would be causing the problem. I'm sure you've probably bumped into this problem and I'm sure it was probably just a minor overlook, but any help or suggestions would be greatly appreciated.
i never had that kind of problem, but just to get you right:
- using the textures that ship with the package everything is ok, right?
- using your own textures the terrain gets overexposed, right?
if so it should have something to do with the import settings of your textures, most likely the terrain normal map.
make sure that it is marked as normal map.
that is all i can think of now.
there was another problem described with overexposed terrains – the reason that was responsible for this was the fact that he forgot to assign the detail textures to the terrain…
while version 1.5 – which will bring the new editor and mesh blending – is still under review by the asset store team, i have started to wotk on version 1.5.1:
* next to some more performance improvements
* there will be an in editor color map painting tool i always wanted for myself
the color map painting tool – although it is very rudimental – will give you the possibility to paint directely onto the used color map right within unity. lay out paths or redifine the detials of your terrian just within editor.
in order to give you a short impression: let’s talk about decals:
usually you would give them an avarage color correction around 0.5 in order to make them fade well with the originally added textures (in case you added them to redefine textures edges). just keep this and add decals every where else and use the color map painting tool to give them the right coloring:
A couple of days ago, I actually thought about suggesting an in-editor colormap-painting feature
you would have been right to do so: just a very simple but incredibly powerful tool.
and it is fun working with it.
good news for that have been waiting for the mesh blending tool:
version 1.5 has been accepted by the asset store and is ready to download.
Main features and changes:
- setup up the shader beeing guided step by step using the new editor
- create combined normal maps as needed by the shader just within unity
- simply grab average color values as needed by the shader with a single click
new mesh blending tool
- use the new mesh blending shader and tool to blend any abitrary geometry seamlessly with your terrain to create cliffs, overhangs or sand bunkers
- keep your your meshes in sync with any change you make on the terrian just with a single click
new painting workflow
- no second terrain is needed any more. simply paint all 6 detail textures plus the 2 decals onto your terrain using unity’s bulit in painting tools.
- next to to already present multi uv blending mode you now can choose a multiply mode for multi uv mixing.
- the multi uv mixing factor is exposed to the editor and can easily be adjusted
- spec power was added which let’s you simulate wet terrains
- decals can now not only be adjusted as far as color correction is concerned – the shader let’s you also control the sharpness between decal and underlaying detail texture
just try it out and let me know what you think about the changes,
and may be the best about it all: version 1.6. is right on its way!
it will bring a built in color map painting tool, some more performance boost and fresnel based color reflections.
Just did a quick test of the new version. Everything works fine and the ability to combine normal maps in the editor is a huge time-saver. Thanks for implementing the spec-power too
Now I'm really curious about the "fresnel based color reflections" and of course looking forward to the Colormap painting.
i am glad that you like the update.
unfortunately fresnel based color reflections turned out to work not well with the mesh blending options so i had to skip it for the moment.
but even with just the spec power and some tweaked gloss maps you can create some kind of wet surfaces:
Thank you for all your hard work!
just a little preview on the upcoming update which will contain fresnel based color reflection to better fake wet surfaces:
Oh wow. From Germany, With Love!
Hey Lars, congrats on the latest version, looks fantastic.
Is there a way of easily transferring an old terrain (including the decals made on the additional terrain) to this latest version?
Hope that makes sense.
thanks a lot.
as far as transferring an old terrain is concerned: right now you do not have the possibility to copy the 2nd splatmap from your additional terrain to the original one (i will add this in the upcoming version).
so for the moment you can either keep your splatmaps (by simply using the additional terrain instead of the original one). in this case you will have to setup all other variables on this terrain again – which should not be a big problem though as the new editor makes it very easy to set everything up.
or you can keep most of your settings by still working with the original terrain but you will loose the second splatmap.
sorry for that but i am working on it.
Any idea what might be causing this?
it seems as if the original "CustomTerrainScriptColorMapUltra" is missing.
you have to load both scripts: the original one plus the editor script.
Awesome. Thank you. Also is this supposed to be compatible with Direct X 11?
i am on mac and still with unity 3.x – so i can’t really say.
compiling the shader in unity4 on mac i get some warnings about dx11 but no errors. so i guess it should work.
it would be interesting to get some feedback though.
Just checking out the Webplayer. What is that:
* Just recognized that the color-overlay disapears on a big distance.
that looks pretty strange…
please check out the other webplayer as well.
despite of eye cat’s strange discovery here is a preview of the latest feature of the upcoming release: bump map elevation – which gives you a much nicer look on the terrain:
That's looking great! Visually emphasizes the relief and brings out the color reflection.
Lars what does bump map elevation does? It just strenghtens power of normal map? Or is this POM? And what is color reflection used for?
bump map elevation simply strengthens the normal map and gives you the impression of more depth: it is not like PM or POM which really add depth.
fresnel based color reflection is a rather simple method to add some kind of wet look to your terrain. please have a look at the attached image.
Looks to me like a Fresnel term was added, or he's approximating the contribution from skylighting without it being strictly Fresnel. However it was implemented, looks great! (Edit: Ninja'd )
Wanted to chime in and say that I also have the same errors with the webplayer as EyecyArt showed a few posts above. I have a GTX 680 4GB, Windows 7 64-bit if that helps any.
Also, it's hard choosing between this and the Relief Terrain Pack. I don't know how well you're fitting within the current supported Shader Model, but might you add PM/POM in the future? If both have open shader source I guess I could get both and attempt to merge the POM with your shaders, but that sounds like a nightmare. Might you bump up the Shader Model in the future, or come out with an "Ultra Ultra" shader, to allow for more maps for instance? I guess if the shader source is included I can do whatever I want to the shader of course...
hmm, i am a bit confused, as i have tesed it on an old asus laptop with intel graphics under win7 and everything looked ok.
i even do not really have a clue what might cause this strange shading.
as eyecat has written that the color overlay fades away on large distances it should be related to the splatting terrain textures blended with the meshes.
but those colors should not show up on the upper parts of the mesh! as all blending is controlled by vertex colors baked into the meshes it seems a bit like vertex colors get corrupted.
i have built a quick test. please have a look at the webplayer and compare it to the image attached.
i will come to this back later.
The secound demo looks like your image.
Btw I run a similar system with a GTX460.
And how did you came up with eyecat!?
then vertex colors are ok... i will have to think in a different direction.
sorry about that.
@eyecyart: have you also checked the second webplayer? does it look the same?
That webplayer looks correct for me.
From your previous reply, the "vertexcolortest" webplayer, I can't see whatever image you attached for comparison. So I screencapped what it looks like to me:
i am glad to read this as that is the latest version...
it looks like it should. but i really do not understand what the forum does to attached images...
thanks a lot,