Unity Community |

That sounds great, thanks Azert2k. I look forward to what you come up with, and am really curious about the results
By the way, my questions weren`t meant to nag you about missing features. I am not really unsatisfied, i am simply just learning and am curious. I`m just one of those satisfied customers that always wants even more
When you cannot provide the missing functionality, then i`m fine with that. But maybe there is nevertheless a solution. Thus my question if there are other ways around.
Hm, but what about the benefit? Less drawcalls means better performance, doesn`t it?Keep in mind that if I make more scripts to resemble at the UnityTerrain, less you will have of performance.
Your terrain system doesn`t only get used with mobiles. I for example am using it for Windows standalone as the target platform. So what about a modular approach for such stuff where you can turn on or off what you need?
Last edited by Arunderan; 05-11-2012 at 01:43 AM.
Free Game Graphics, Freeware Games http://www.reinerstilesets.de
Die deutsche 3D Community: http://www.3d-ring.de
Touché ! In this case (windows build), you right. Some unityterrain features can be missing. Anyway, I will do my best to find the best compromise
I keep you aware this weekend
Edit : the benefit of less drawcall is good but a script algorytm to control all that can be very bad for performance on mobile device...
The T4M works fine on all devices, but for PC/Mac it can be limited than unityterrain. Its normal.
To be continue this weekend![]()
Last edited by Azert2k; 05-11-2012 at 02:16 AM.
T4M Sources Edition
Mobile Starter Pack #1 : FPS
My little game that I made for the contest : GreenZone
Ok, so :
I'm glad to say the UnityTerrain don't batch the tree like you say, each tree give 1 drawcall ! exept that the culling works InEditMode (the T4M using culling in playMode (Fixed now).
But the difference is : when the tree is far of the camera, the tree become a billboard... So I will try to add this feature on the T4M. It's a UnityTerrain feature, so I don't know yet, if I can use it externally of Unity Terrain
I think you must to read the documentation to learn how use the cullingDistanceLayer function in waiting I find a way (if I can) to use a part of TerrainEngine.
Anyway, I will make some modifications on the T4M to simplify that, I need to optimize the LOD and Billboard systems. Create the shaders for Treecreator. I have a lot of work ...
First Screenshot
No Culling, no Billboard, Distance of view Maximum (900 vertices per tree). I have planting all trees manualy, with UnityTerrain System and T4M System (approximately the same place but exactly same number)
To equalize approximately the vertices, I use 12100 vertices for T4M terrain.
UnityTerrain : 290 drawcalls
T4M : 203 drawcalls
Same Scene but with culling at 160... UnityTerrain use a build-in TerrainEngine script for that, the T4M the LayerCulling Distance, so you can see more trees on T4M screenshot
UnityTerrain : 113 drawcalls
T4M : 38 drawcalls
EDIT :
So, you can try youself with this 4 scenes the differences of Drawcall and performances (I need to work on Update), for Billboard culling, I will try integrate that on the T4M.
In these scenes, I use the Unlit Shader + lightmap for T4M to show how you can optimize the scene for Mobile.
COMPARATIVE SCENES
Last edited by Azert2k; 05-12-2012 at 08:27 AM.
T4M Sources Edition
Mobile Starter Pack #1 : FPS
My little game that I made for the contest : GreenZone
Thanks for diving into this issue. Every improvement is very welcome. And your terrain system is getting better and better by that. Keep it up
This still confuses me a bit. Because when i mass place 10.000 trees then i don`t get 10.000 more drawcalls at the unity terrain. Does the billboards count as one drawcall then?I'm glad to say the UnityTerrain don't batch the tree like you say, each tree give 1 drawcall ! exept that the culling works InEditMode (the T4M using culling in playMode (Fixed now).
Free Game Graphics, Freeware Games http://www.reinerstilesets.de
Die deutsche 3D Community: http://www.3d-ring.de
In fact, after an distance (Billboard Start), the tree will become a billboard tree, just an texture, in this case the tree is batched.
So less vertices and less drawcall.
In my demo scene, I have deactivate this, to compare the comparable.
Right now, I go crazy to find a way to activate it on my new shaders, and I don't know if I can, because like the wind, on classic mesh all settings haven't any effect, exept on "UnityTerrain" and "Tree" component...
If there are one way, I will find it, otherwise, I will contact Unity Team, to know if it possible and how.
This is a good feature for T4M.
Last edited by Azert2k; 05-12-2012 at 10:07 AM.
T4M Sources Edition
Mobile Starter Pack #1 : FPS
My little game that I made for the contest : GreenZone
hi azert2k,
just some words about trees:
it is true that:
a) trees placed within the terrain engine (both: tree creator trees and imported models using the the tree soft occlusion shaders) and
b) trees created with the tree creator but placed as single game objects outside the terrain engine
do not get batched.
it seems that both the terrain engine and the tree creator script disable batching.
this makes sense because the bending function of the tree shaders needs the position of each single tree in order to create some variation in bending. plus each tree has to have its own wind parameters in case you use a spherical wind zone.
but let’s assume that we do not care about all trees bend in the same phase and we just wan’t to use directional wind then it is possible to place single game objects (not trees made with the tree creator but imported meshes using the tree creator shaders) and make them be effected by wind.
all you have to do is to pass the wind to the shader as globalvector – somehow like this:
please note, that this wind has nothing to do with built in wind zones.Code:
{ }
those meshes can be batched!
by the way: each tree causes 2 draw calls as it uses 2 materials: 1 for the trunk and branches, one for the leaves
i hope that will help somehow.
if you have further questions just let me know.
lars
Advanced terrain shaders [free]: http://u3d.as/content/forst/advanced...in-shaders/1WJ
Advanced terrain shaders V2 [free]:http://u3d.as/content/forst/advanced...shaders-v2/2Bo
Advanced mobile foliage shaders [free]: http://u3d.as/content/forst/ats-mobile-foliage/2XM
ats Colormap terrain shader [free]: http://u3d.as/content/forst/ats-colo...ain-shader/3fr
ats Snow Suite [free]: http://u3d.as/content/forst/ats-snow-suite/3fq
That`s with selfmade trees. The Tree creator creates one material and one texture for both. Just wanted to add thatby the way: each tree causes 2 draw calls as it uses 2 materials: 1 for the trunk and branches, one for the leaves![]()
Thanks for explanation. And, yes, this would be a marvellous addition. Fingers crossed that you can manage it![]()
Free Game Graphics, Freeware Games http://www.reinerstilesets.de
Die deutsche 3D Community: http://www.3d-ring.de
Hi Lars,
Thank for this, I will make some tests...
Yes, but in my scene I use one shader for bothby the way: each tree causes 2 draw calls as it uses 2 materials: 1 for the trunk and branches, one for the leaves![]()
Hard to know that I can or I can't make with all that, when nothing is written in Unity Documentation about this.
With all ramifications between shader/Cg, I just make a node to my brain![]()
Last edited by Azert2k; 05-12-2012 at 12:36 PM.
T4M Sources Edition
Mobile Starter Pack #1 : FPS
My little game that I made for the contest : GreenZone
you are right: leaves and trunk share the same texture but still have their own materials: optimized leave material and optimized bark material. hence: 2 drawcalls.
batching "hacked trees" works pretty well and gives you a significantly lower number of draw calls unless you do not use real time shadows:
but as you can see in the images above dynamically batching trees does not necessarily speed up rendering…
using real time shadows reduces the safe of drawcalls dramatically:
* 80 drawcalls for 8 original trees
* 60 drawcalls (batched: 24) for 8 hacked trees (both in deferred rendering mode)
lars
Last edited by larsbertram; 05-13-2012 at 04:34 AM.
Advanced terrain shaders [free]: http://u3d.as/content/forst/advanced...in-shaders/1WJ
Advanced terrain shaders V2 [free]:http://u3d.as/content/forst/advanced...shaders-v2/2Bo
Advanced mobile foliage shaders [free]: http://u3d.as/content/forst/ats-mobile-foliage/2XM
ats Colormap terrain shader [free]: http://u3d.as/content/forst/ats-colo...ain-shader/3fr
ats Snow Suite [free]: http://u3d.as/content/forst/ats-snow-suite/3fq
I stand corrected, thanks Lars![]()
Free Game Graphics, Freeware Games http://www.reinerstilesets.de
Die deutsche 3D Community: http://www.3d-ring.de
hi there,
a lightmapped unlit shader supporting bending and the necessary tweaks on Azert2k’s original palm model are done.
dynamic batching is supported so all trees get drawn with just one draw call:
watch it in action: http://bit.ly/JalVNG
lars
Advanced terrain shaders [free]: http://u3d.as/content/forst/advanced...in-shaders/1WJ
Advanced terrain shaders V2 [free]:http://u3d.as/content/forst/advanced...shaders-v2/2Bo
Advanced mobile foliage shaders [free]: http://u3d.as/content/forst/ats-mobile-foliage/2XM
ats Colormap terrain shader [free]: http://u3d.as/content/forst/ats-colo...ain-shader/3fr
ats Snow Suite [free]: http://u3d.as/content/forst/ats-snow-suite/3fq
Super cool! just what I was looking for!!
Hi,
The link is broken, but great jobI can't wait to try this !
I'm not enough strong in shaders programming to make dynamic shaders, and I'm glad to see that.
I believe I make an mistake, when I make the 2.0.5 version of my tool. I had modify the algorythm of the Unityterrain convertor to adapt correctly the brush projector, but it seems that before the Terrain Mesh converted had a best loading speed. I will make some tests on this, and if it's the case, I will make the modification to fix that.
T4M Sources Edition
Mobile Starter Pack #1 : FPS
My little game that I made for the contest : GreenZone
Hi,
I've been testing the T4M demo for a while, but i'm having a few issues with the planting system. When i create the terrain I am able to plant some trees normally, but after i play the scene, select other objects and come back to add more trees, I cannot access the plant mode again. I was able to enter the plant mode only once after that. Any tips?
Wierd ! Don't worry, the next update will come soon and new demo (normally before this weekend)
I keep you aware
T4M Sources Edition
Mobile Starter Pack #1 : FPS
My little game that I made for the contest : GreenZone
I have the same thing happening, looking to the next updateHi,
I've been testing the T4M demo for a while, but i'm having a few issues with the planting system. When i create the terrain I am able to plant some trees normally, but after i play the scene, select other objects and come back to add more trees, I cannot access the plant mode again. I was able to enter the plant mode only once after that. Any tips?
Hey, i was wondering if the T4M tool has or plans to have a feature to 'slice' the terrain into smaller objects, keeping the UVs and the texture painter information?
It would be extremely useful to avoid sending too much info to the GPU and can help optimize the terrain even more.
Not yet, I had try to make that but I failed... But it's a great idea
T4M Sources Edition
Mobile Starter Pack #1 : FPS
My little game that I made for the contest : GreenZone
I made an environment in 3ds max and converted it to t4m and brushed on some textures. Everything worked like a charm but now later this day I noticed that I can't draw to geometry any more, neither can I place trees or bills whatever I try. If I open the tutorial scene I can start brushing to Volcano immediately but my own geometry doesn't respond to anything. There's no errors or anything it just doesn't work... Any help?
Hi Nexxus,
Use you the full or demo version of T4M?
Apparently, some people have a problem with the demo version...
Anyway, I have some days of holiday so, I will make the update this weekend + new Demo version.
T4M Sources Edition
Mobile Starter Pack #1 : FPS
My little game that I made for the contest : GreenZone