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 'Works In Progress - Archive' started by Diab1O, Sep 19, 2016.
Yes I got the same problem, pity it can't be used by an external program like Easy Scatter.
If you have Terrain Composer 2 you can use that and then AltTrees imports nicely.
I've got much better performance out AltTrees in the last few days. Still learning the system and really want to see the documentation of what each setting is and of course the next update.
A solid beta start for this product I've got high hopes it will do want i need it too.
Ive been executing unity with this addition and has helped speed the whole UI up. Might be worth a try.
I've uploaded a video to YouTube - having played around with some settings I am getting much closer to the desired effect. LOD is now visibly working. It's also much, much harder to drive through a billboard tree.
The main issue remaining is that there is still some "popping" visible in the video - sometimes the camera gets close to a large block of billboard trees which then all change at once. This corresponds to a spike in CPU usage, as high as 180ms on my PC. I left the debug drawcalls on so you can see where the blocks change.
To give you a little context, my terrain is 8km x 8km, with approx 115k trees (all one prototype for now). It's taken a lot of trial and error to get to this stage, but these are the AltTrees settings I am using:
"Distance Patch Factor" seems to be the most important - with the default value of 1.5 I was getting over 6000 draw calls and less than 20fps. Lower than 0.3 and I could get too close to a tree before it changed to a mesh tree.
I know you are working hard fixing issues at the moment, and things seem to be getting better all the time - but I am really looking forward to some documentation And also tips on which settings to tweak for performance vs. quality.
Hi, I will think about it.
I sent you a file. Replace it in Assets\Plugins\Editor\AltSystems\AltTrees
Try it please.
If this does not work - try like AndyNeoman said.
Thank you. Documentation will soon do. Difficult for me to, because I do not know much English.
Need to increase the "Distance Patch Factor".
In the near future I will make support multi-threading - then billboards are faster to switch at high speeds.
Now you can increase the "Check Trees Per Frame", but it creates a heavy load on the processor.
Hey thanks for the file, I'll try to test it out over the next few days.
I did a test with the following scene, which I had created earlier. I imported AltTrees and then converted all the trees. However, when I ran the game in play mode the scene took about 10-15 minutes to initiate the trees, then Unity crashed while initiating the banana tree. What settings do you recommend for the scene in the video below? Note, this video was without Alt Trees, but the scene I used to test AltTrees in.
On a second note, every tree I convert from Baldinoboy's Tropical Forest pack, and every plant from Yughes Bushes and Weeds pack pops up with a dialog saying that the normal maps must be fixed. Is this expected, or have I set it up incorrectly? I didn't see this message in your tutorial videos appear.
By the way, I really like the automatic conversion and the step-through installation process. I think that's been really well done.
Good news, I just tested that new file on some low poly trees on my Android, and it works fine. In the video the billboards are set to 1024, and I was getting about FPS 25 on my Moto G3, but when I reduced to 512 I was getting FPS30. Here is the video.
EDIT: Just tested it without Alt Trees and got better performance. So I don't think it is effective with low poly trees, but imagine there would be an improve with mid-poly trees such as Speedtree for mobile. I've got some mid-poly African trees I can test out with later.
Update, just tried the new file on the scene above, abeit with far fewer trees but the lag still appears at runtime. Strange because in the editor the trees are populated almost immediately.
How many trees on the scene?
There are errors in the log?
This Unity window. It comes, if your texture is not marked as a normal map. This is normal. Click on button fix.
I'm working on optimization.
better not, as they might use combined textures... at least baldinoboy does.
That's good to know, sure Yughes do as well, can't imagine he'd forget to mark them as normal map. In fact I can't imagine any tree from the store would not have normals marked as so.
I thought you might say that I'll leave it as is for now, and eagerly await the multi-threading!
Is there any suggestions for what to do with baldinboys trees if pressing fix is not advisable?
Im also having issues with the random colour of the trees. I presumed unclicking random leaves/bark colour would turn it off but maybe they all need reimporting. What i would ideally like is slight ramdom colours (shades of green only) but without documentation it's tricky.
If anyone has worked out settings for aspects of the pack I think here would be great place to list while diab gets around to documentation. In fact it might even help him as I understand english is not his primary language.
I would appreciate any tips and tricks in any case. .
Are the leaves not being shaded correctly? Are all the leaf/branch normalspec textures showing this error?
Some bushes are black in parts of the leaves. Also i am getting too much colour variation on my trees. Lots of autumn reds/yellows but my game is set in tropics so needs to be only green shades.
That is strange. I do not know why AltTrees would cause that. Check the combined normals and make sure the import looks like this:
Did a import test of TFP 1.01 into 5.5.0 and, besides some broken image effects, it looks fine. @Diab1O , does AltTrees change the shaders or normals of non-standard shaders? Not sure what else to do.
AltTrees uses custom shaders. If your trees using custom shaders, it will be necessary to make modifications to the shaders to work with AltTrees.
After importing trees from Terrain, or planting a brush?
Oh alright so Tropical Forest Pack is not compatible with AltTrees at the moment. Unfortunately I am not a programmer so can not say when and if it will be
If you want, you can send me one tree with shaders, and I'll try to make support AltTrees.
Thanks! Sending a PM.
That's great news guys I am relying heavily on both your assets for the PC version of my game. I actually thought TFP used normal unity tree shaders. My mistake.
The colour issues affects imports from terrain for sure, will try the painted trees later.
I'm trying to use AltTrees on a rather big terrain generated by TerrainComposer2
Currently it takes a lot of time (more than 40 minutes) to convert trees from Terrain to AltTrees which makes them unusable in production pipeline
Am I doing something wrong?
Maybe author will come up with solution for TerrainComposer2 which will allow to generate trees directly to AltTrees instead of generating them for Terrain and then converting to AltTrees
Currently TerrainComposer2 can not be combined with AltTrees, but in the future, I'm sure, this will be possible.
Either the author TerrainComposer2 make AltTrees support, or I make wrapper for TerrainComposer2.
Thanks for quick reply
May I contact you through email?
Any plans to implement billboard shadows? This is something that SpeedTree has, and it makes a really big difference.
Billboards have already cast shadows.
Hm, really? I've never have had billboard shadows since I started with AltTrees, so I didn't know it supported them. I have verified that they are in my shadow draw distance, but still get nothing.
Here's a test screen to show the issue:
In AltTrees there are two types of billboards. First - Near single billboards. Second - far group billboards.
The first type has a shadow. The second type - has no shadow.
I gotcha. Are there any plans to add an options for shadows to the Group Billboards? That is one big area, IMO, where all other tree systems including Unity trees fall short compared to SpeedTrees.
Ok, I'll do it
When will the new update be out ?
Before the end of January.
Will you implement horizontal (ie top down) billboard before release ?
a nice option would be also to create 3 axis billboards without rotation as LushLodtree does, should not take that much overhead as it is basically 3 quads but probably saves some calculations.
result is very nice...check video here...
Yes, I will do it. But not in this update.
I'm using the VR arc teleporter https://www.assetstore.unity3d.com/en/#!/content/61561 to get around my scene in VR but billboards dont respond when I teleport around my scene. With this plugin you use the VR controller to click to spots to move around. What does the ALtTree system look for in the player or the camera to be able to work with the system? Like is there a certain Tag or Layer the camera or player has to be set to.
Hi, I ran into a bug. When importing the terrain everything works fine. There were 36 prototypes that I had to convert from the terrain. However, in AltTree I only was able to export 3 of the prototypes. Meaning, I lost all of the prototypes that I had added manually to the terrain. This is a huge problem as now I have to re-add over 30 trees back into Unity Terrain Trees because AltTree didn't keep them. Just because I only have 3 prototypes currently on the terrain doesn't mean that I don't want to keep all of the prototypes that I had added into the Unity Terrain Trees
Soon I will send you a PM with a fix for the test.
Sorry, I'll fix it.
i am testing this asset but what i want is to instantiate the trees before the scene show because the main camera is spawned in a middle of the terrain showing trees pops is anot a good things ,it takes me more than 20 seconds to see the first tree (iphone 5) , if this is not applicable , i might ask for a refund if that is applicable
Just purchased this half an hour ago, really like the performance so far(finally I can populate the horizon with trees, I was looking for a solution like this for the past 2 years) but I'm a bit confused about something. Do I have to place the trees via the AltTrees script? To my understanding the "import trees from terrain" option will also convert the trees, instead of just reading the data(I already changed the trees to the converted ones so this is pretty much unnecessary - and I don't want to use the placing tool at all, I already have a nice way to generate the trees)
Btw there is a typo on the interface, Debug Settings -> Draw debug putches
Edit: as expected it was a user error, figured it out eventually. However I have another question, do I always have to place the trees on a terrain if I don't want to paint them manually via the AltTrees tool? I have a huge mountain mesh, I would like to populate it with GeNa, is there an easy way to convert those to AltTrees as well? Or will be in the future?
The next update this process will be faster.
At the moment, it is possible through import. First place in the GeNa, and then import it into AltTrees.
If you have imported a tree incorrectly into AltTrees how do you delete it, have several I've imported incorrectly but can't work out how I get rid of them?
OK, think I worked it out, deleted them from the plugins directory under the database folder .... hope this is the right way to do it.
Really impressive! I woudl love to see some different rendering styles. The colors are pretty bright for realism, and woudl love to see some more cartoony low poy stuff. But the sheer number of trees you are demonstrating is amazing.
Thanks, I'll think about it!
I feel your pain - my 200,000 trees took well over 2 hours to import from my terrain. So I had a look at the Import() method in AltTrees_Editor.cs, and there are a few optimizations to be made there. My last import took 17 minutes, so it was approx. 7-8 times faster. All I did was this:
In the loop at or around line 1627 (starts with "for (int j = 0; j < treeCounts; j++)"), add these lines at the start of the loop:
var tree = terrainData.treeInstances[j];
var prototype = prototypesTemp[tree.prototypeIndex];
Then just replace all instances of "terrainData.treeInstances[j]" with "tree", and "prototypesTemp[tree.prototypeIndex]" with "prototype". I can't believe that all those array accesses made it so slow! Let me know how you get on.
@Diab1O - Maybe you could sneak this optimization into the next release?
I think there is a bug in the wind converter as well, if there is an uncoverted tree it can't get past 99%(I let it work for over 30 minutes but it was still at 99%). If this is the case(I didn't investigated it any further but as soon as I hardcoded the names to the ones I actually converted it worked) I believe it would be best if the wind generator would only look for converted trees as there might be cases where we don't want to use AltTrees, and maybe a nice feature would be to be able to convert every tree(in the whole project) with a single button(or better yet list the trees and let us mark the trees we want to use - I realize that there are much bigger problems yet of course, I'm just trying to come up with workflow improvements as that part is at least as important as the functionality itself, hope you don't mind).
Feels like this was my best investment since RTP as far as terrain stuff goes, in a few months it might be something absolutely epic. Btw do you have a public roadmap for AltTrees?
Excellent thank you! I'll look into it and included in the next update.
Hello! I'll look for the error. The number of trees has no effect on time converting wind. 1 and 10 trees should be converted the same amount of time.
Thank you, I will soon publish a roadmap.
This happens when I convert wind
I sent a PM with fixed file. Try it please.