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 LennartJohansen, Jun 23, 2017.
Yes, I'm using the MapMagic's VS node. PMing right now =)
Is there a way to have some water plants float on top of water? Using AQUAS.
use aquas bouyancy? it would kill your fps touh.. projection? naah that more suitable for leaves..
You would have to make some custom code to get the plants follow the water movement. Problem is speed. You do not want to do this on the CPU as it could potentially be a lot of plants. One solution could be to make a GPU version of the Aquas wave math. Then add a section to the compute shader in Vegetation Studio that does frustum culling.
There you modify the Matrix4x4 that holds the mesh position/rotation/scale to follow the wave.
This have to be done before the frustum culling part since the wave might move it into view.
Send me a pm if you want to give it a try. I can show you where inject your code.
I dont have my tree trunks when i place them with Vegetation Studio..When i put them in scene manualy by draging in from Hierarchy they have everithing.. :/
What trees/shader are you using? Could the tree be split up in multiple meshes?
Hi, I trying to remove trees (with possibility to re-grow) dynamically from terrain.
I have access to desired VegetationItemInfo and using 'RemoveVegetationItemInstance'
I have terrain with initialized 'Persistent Storrage' but with custom Debug.Logs I see that method stops in file 'PersistentVegetationStoragePackage' on method 'RemoveVegetationItemInstance' saying that 'persistentVegetationInfo' from 'GetPersistentVegetationInfo(vegetationItemID)' is null
For test I using free camera which is casting raycast and trying to remove vegetation instance at position, if hits gameObject with 'RuntimeObjectInfo' component.
After few tries I noticed that something happening after using 'RemoveVegetationItemInstance' it looks like it is destroying tree but respawning it immediately (inspector shows null transform for a blink, but in game view it isn't noticable)
What I am doing wrong? Can't figure out right now.
You can remove and add instances with the persistent storage API. But if you want the tree to regrow it could be better to create an VegetationItemMask that will remove the tree as long as the component is present.
Have a look at the harvesting script in the demo scene. It does this. This approach works for run-time spawned vegetation also.
Just send me a pm if you have more questions.
Has anyone else had the following happen when going in to play mode? The scene initialises, the camera shows the terrain and there's no vegetation at all and then after a second or two it suddenly pops up?
Am I missing an option somewhere to get it all to appear before the scene is shown?
The way the culling group works in Unity we can only get the internal cell culling working from frame 2.
I am adding an event at first render that allows you to remove loadscreens etc. I will also try to do a manual culling the first frame to have the right selection.
Hmm... perhaps I need to have 2 cameras initially - the main one to render the terrain, VS, etc. and a secondary one that is initially active but pointing somewhere to a 'blank' area so you don't see the pop in of the
Easiest solution is probably to make a loading screen image you have full screen on a canvas and turn this on at the "first render vegetation" even I am adding now.
its prefeb that have 2 parts 1 of them top and other is trunk trunk uses Legacy Shader / Bumped specular..
That is probably the issue then. Vegetation has to be a single mesh. Multiple submeshes and materials works good.
Using multiple meshes would complicate the structure and be slower since we would have to store and process a Matrix4x4 for each mesh (they could be children with a different orientation/position). With submeshes this is not a problem.
Is there any way to blend the edges of perlin noise? I have a dense 2D grass that looks weird because it just stops at the edge. If I add another grass with a lower cutoff and density to make it appear like it's fading, the second grass overlaps the original so I am getting additional renderings that I would prefer to not have for optimization purposes. Any ideas?
I will look at using the 0-1 value of the perlin as a density and not a cutoff. that will give a more smooth transition.
Adding this as an option.
That sounds like a good option. Rarely do you get such defined boundaries in nature. This will just make already exceptional looking grasses look even better
what about adding a noise slider under the perlin noise ? i could really use that one too !
same thing when you want to limit vegetation spawning with Height ... transition is very abrupt and unatural.
Hello there, does Vegetation Studio work with WebGL builds? (Targeting only WebGL 2.0)
Hi. I do not think WebGL 2.0 supports instancing. I did a test now with the lates 2018.1 beta.
I managed to get it running in the editor with some components disabled and render mode to normal but you loose all the speed benefits of instanced rendering that Vegetation Studio is built on...
I will look at the noise.
For the height rules there is an advanced mode you can enable. then you can configure a curve for the height distibution that will give you a gradual result.
I'm probably overlooking extremely simple and obvious, but how can I stop grasses from spawning close to trees and leave a small area around each tree? (a bit like the area around that can be made around a navmesh obstacle)
Thank you for testing. At least it works, which should be enough to beginn with
Found somehting in Unitys Manual, where it lists WebGL2.0 to supports GPU instancing.
Dont know if his helps.
I wish I could double like this post !
Hey Lennart, any progress on the pooling system for multi-tile terrains?
Also: Did I read somewhere that you are planning to add dynamic snow on trees? (I know I can swap out different veg packages for snowy trees, but I'm thinking of dynamic accumulation during snowfall.)
I found the same info, but in playmode Unity reported. Instancing not supported. Target was set to WebGL 2.0 only.
I will try to get a prototype pool ready later this week.
What I want to add is a way to pass snow and wetness info to the shaders. Then 3rd party shaders that support this can get the settings passed to the matierial.
Have a look at this post.
Thanks. I was sure I'd read something like this before, I just couldn't remember where I'd seen it.
Hi. I just submitted a new update to the Asset Store. It should be available soon.
This is the list of changes
Speedtree vertex LODFade is now working on Unity 2018.1+
Added LightProbeUtility to extract lighting components from SphericalHarmonicsL2
Trees and objects can now be painted on the peristent storage.
Max radius on painting tool increased.
Max sample distance on painting tool increased
Grass meshes generated with the GrassPatchGenerator now supports the wind in the HD.Lit shader of the HD SRP
Added single and Quadoption for billboard atlas (1x1 and 4x1)
Added a Gaia extention to easy add Vegetation Studio to scenes with Gaia terrain.
Added advanced option to enable editing Vegetation Item IDs
Vegetation Masks now have an optional Ground Layer for snapping to terrain. This is for future mesh terrain use.
Increased perlin noise max value to 500
Fixed error when trying to paint with an empty vegetation package. Fix for washed out billboards in Linear mode on 2018.1
Fixed material refresh when changing some spawn rules not syncing accross multiple vegetation systems
Fix for computeshader link error on OpenGL on Windows.
Added fix for curve labels in wrong color on light skin.
Colliders now work for instanced indirect rendered vegetation items
Fix for error in Amplify Editor node for touch bend
Added workaround for another asset hiding the UnityEngine.Tools class
Fixed error that could happen in 2018.1 with Speedtree lodfade and invisible trees casting shadow.
I'm getting this error, I believe it has to do with having over 64 items added:
IndexOutOfRangeException: Array index is out of range.
AwesomeTechnologies.VegetationSystem.UpdateVegetationInstanceLists () (at Assets/AwesomeTechnologies/VegetationStudio/VegetationSystem/VegetationSystem.cs:1325)
AwesomeTechnologies.VegetationSystem.ExecuteRenderVegetation (Boolean forceRender) (at Assets/AwesomeTechnologies/VegetationStudio/VegetationSystem/VegetationSystem.cs:1979)
AwesomeTechnologies.VegetationSystem.Update () (at Assets/AwesomeTechnologies/VegetationStudio/VegetationSystem/VegetationSystem.cs:1876)
Is there a limit of 64 items Vegetation Studio can handle?
Thanks in advance,
delete the last item you added, and add it again
Hi. There is a 64 item limit on the internal threading pool. I am adding a workaround for this.
Hi Lennart, I posted this on Easy Roads forums but it's related do Vegetation studio. Can you have look at it? I had same kind of problem before but opposite. https://forum.unity.com/threads/eas...g-new-road-system.229327/page-96#post-3465919
Excellent update @LennartJohansen . This one I was really waiting for it's great to have colliders on instance indirect trees.
Unity 2018.2 Beta 1
Hi. I just did some fast testing on the new 2018.2 Beta that was released today. Everything seems to be working with Vegetation Studio.
Hey, where exactly did you exclude the vegetation layers in Enviro? I'm having this same exact bug. I did as you did; put all vegetation on a different layer, and then excluded that layer from Enviro Lightning Prefab's culling mask. But the artifacts still persist. Thanks for your helpful post.
Make sure the vegetation that is rendered instanced indirect is on different layers. You can set this on the render tab.
Search for "light" in the project. this should give you all the objects with a light on. Find the enviro lights that are not the main directional light and exclude the instanced indirect layers.
Switching to Deferred mode would also remove this issue since the lighting is done on the g-buffer. In the 2018.2 Beta Unity added instanced support for multiple ADD passes in shaders. I did not have time to test this yet, but I will when the beta gets stable. Should be only 1 pragma setting to add in shaders.
@LennartJohansen Could you explain the difference between Sample Distance and Density. They both seem to do the same thing.
Hi, i am having an issue where i cannot modify splatmaps and receive an error when clicking the Generate Terrain Splatmap button.
I am using Unity version Unity 2017.3.1f1 (64-bit)
when i press it i get the following error:
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[AwesomeTechnologies.TerrainTextureSettings].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
AwesomeTechnologies.TerrainSystem.GenerateTerrainSplatMap (Bounds bounds, Boolean useBounds, Boolean clearAllLayers) (at Assets/AwesomeTechnologies/VegetationStudio/TerrainSystem/TerrainSystem.cs:245)
AwesomeTechnologies.TerrainSystemEditor.DrawGenerateInspector () (at Assets/AwesomeTechnologies/VegetationStudio/TerrainSystem/Editor/TerrainSystemEditor.cs:98)
AwesomeTechnologies.TerrainSystemEditor.DrawAutoTextureInspector () (at Assets/AwesomeTechnologies/VegetationStudio/TerrainSystem/Editor/TerrainSystemEditor.cs:115)
AwesomeTechnologies.TerrainSystemEditor.OnInspectorGUI () (at Assets/AwesomeTechnologies/VegetationStudio/TerrainSystem/Editor/TerrainSystemEditor.cs:72)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editors, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1253)
Thanks in advance for any assistance
There is several settings that affect vegetation spaning.
There is a global density setting for grass, plants, trees, object and large objects. The idea behind this is to set up your scene with the default density of 1. Then use these settings to run-time modify density based on user settings or hardware. You can have a mode for low end computers that render grass and 50% (0.5) or increase it at a "Ultra quality" mode
Sample distance is used to set up a samle grid on the terrain where each point is evaluated based on all enabled rules to see if a vegetation item would be spawned.
The distance setting is used on top of this as a spawn chance for each sample point. Setting a lower density will give a bit different distribution than a higher sample distance. Items could still be spawned closer together based on the random sample. This value is also there to allow Vegetation Mask include rules to modify density for the mask area. The density you set on vegetation masks are multiplied with the set density.
Hi. I will add a test with a warning message to this. It seems related to the number of textures on the terrain and in the vegetation package. Are they the same?
We just passed 100 000 views on the Vegetation Studio forum thread
Hi Lennart, congratulation for the great audience
I saw on this post that you 'll work on a event system for the scene loading, is this still topical ? I am trying to optimize the scene loading, but I got a huge fps drop and no vegetation for a few seconds at start.
Hey I have a question, So I'm using Blender to create my "Terrain" can this some how work on a mesh or does it have to be a terrain system? Please Say Yes!!! lol
mesh is supported
Hi. I will get the onFirstRender event included for the next update.
I am traveling for a few days this week. I might be slow responding on the forum and Discord.