Protek Da Border - Ghetto All-Stars - Grass Root Edition - Volume One
Label: Ghetto Entertainment - GA-002 • Format: CD Album • Country: US • Genre: Hip Hop •
Search Unity. Log in Create a Unity ID. Unity Forum. Forums Quick Links. Introducing Asset Store Mega Bundles! Joined: Jan 6, Posts: A full project with all the code included can be found here.
One of Unity's 'big' problems is the lack of a decent vegetation system. Developing an open world quest I had to fix that issues. For me none of the current asset store or unity sollutions sorry guys proved to be effective and to both look good and work well.
My goal was the performance and looks of certain AAA games out there, that sucesfully used SpeedTree for everything from grass to trees. The current system uses SpeedTree grass with it's wind animation that are directly exported from the Unity's SpeedTree editor. Grass blade count: 10 milion - Well the count doesn't really matter, only the density per patch matters. Terrain size: meters x meters Big cell size: 90 meters, 25 cells in length, total cells Small cell count: 5 subdivisions for a large cell, 25 small cells per large cell, 18M each, at total count Grass density: blades per large patch, blades per small patch Take one terrain and divide it into large cells, creating a grid.
Overview Grid large cell Grid small cells Don't worry, we don't need to keep all those references and 'BoxCollider' objects, we can safely delete them. All we need is their world bounds that is stored with the grass. Having that determining in which cell the player is, is trivial based on terrain's local space player position using interpolation.
Code CSharp :. Clamp Mathf. FloorToInt pos. Add grass. DrawMesh grass, Last edited: Sep 14, Assembler-MazeSep 26, MauriDevMemberTerraUnity and 22 others like this.
Where do we get the grass from in order to render it? Stay tuned for an answer to that! After that it is extracted from Protek Da Border - Ghetto All-Stars - Grass Root Edition - Volume One terrain the grass is added to the terrain as trees and added to my system.
It can also be manually placed with the tree brush. In the future I have a plan to add it procedurally based on a density parameter and the underlying texture that the terrain has at that location.
Last edited: Oct 22, Joined: May 11, Posts: Amazing write up, really looking forward to the next part. I came up with a similar solution in my game but using only large patches x with are activated or deactivated as the camera moves around, I fade in and out in the shader directly. It's been quite effective the only issue is it's very memory intensive since I keep a reference to every blade position since the grass needs to be removed and the patch combined Jingles From: Radio Luxemburg, Radio Veronica, Radio Northsea, Radio Caroline, Radio Mi Amigo, Radio needs to be rebuilt when it happens but so far performance has been really good.
It only takes 1. Joined: Jun 24, Posts: This is awesome, I'm going to give it a shot this weekend and stalk the Science Of The Sacred - Army Of Lovers - MP3 in the mean time. AcissatharSep 28, Joined: May 22, Posts: It's true. Assembler-Maze I have two question for you, one related about the use of the instances and one specific to your solution: 1- I'm a 3d artist used to work with non-realtime rendering systems and in that world the instances of a mesh is a huge saver when your scene become Protek Da Border - Ghetto All-Stars - Grass Root Edition - Volume One of detail, both in the scene viewport management and in the image rendering phase.
For the scene management they're useful because with few 3d models you can quickly populate environments duplicating them and using rotations, scaling and so on. For the rendering phase, using instances saves memory. So when Unity introduces instances in the latest releases I was expecting to have finally a good tool for our realtime envitonment but, at the moment, I haven't seen too many working examples using this option from the Unity users base Yours seems the first.
What do you think about the use of instances in Unity? What are the difficulties to implement this? Do you think it's possible to use with trees too? If not, why? Thanks in advance for your reply. I'm impatient to see your progress and your demo. Last edited: Oct 3, Assembler-MazeOct 3, I have just updated the demo on Dropbox. There are several problems though: - No fading at the moment - In some camera angles the animation gets stuck - Not my fault, probs Unity 5.
Last edited: Oct 7, AlverikOfficialHermiejimmikaelkael and 3 others like this. Joined: May 20, Posts: Thanks for the demo. I'm getting pretty good results on my GTXm, still above 30 FPS at full density and view distance, albeit no post processing, shadows and on x The only really bad thing about this is the "popping" of grass very close to the camera, not sure if that is one of the drawbacks of the system.
Speaking of popping: Would fading in the grass defeat the purpose of the system? If so, scaling grass smaller with increasing distance could also help to mitigate grass popping into the view distance.
Also, I got a couple of errors in the log:. The referenced script on this Behaviour is missing! A script behaviour probably Grassifier?
Read 32 bytes but expected 76 bytes. Assembler-MazeOct 4, Joined: May 2, Posts: 3, I tried your demo, but I'm confused. When GPU instancing is turned on I get about half the frame rate. Shouldn't I get better performance? Assembler-MazeOct 6, Updated with a some new Passion X - Chill 1.
Of course, don't expect to go completely unnoticeable because in a real scene there is a lot more than grass. There are a lot of ground textures, rocks, trees, structures etc In the future maybe I'll also update with the fast SpeedTree system I've been working on. Possibility to set batch size that is sent to the GPU Still problematic: Grass popping at smaller distances.
Last edited: Oct 6, Assembler-Maze thank you for your reply. About the demo. Sorry, I forgot to update the second link. I have removed it so that it doesn't trick people any more. Just refer to the link in the original post.
Assembler-MazeOct 7, Joined: May 28, Posts: Assembler-MazeOct 8, Joined: Dec 4, Posts: 3, I downloaded the demo this morning. On the default settings I Protek Da Border - Ghetto All-Stars - Grass Root Edition - Volume One practically no difference between gpu vs non-gpu, both at around fps.
However when I raise the grass distance to the max 90 level, non-gpu runs around 40fps, and gpu Protek Da Border - Ghetto All-Stars - Grass Root Edition - Volume One around 75fps. Assembler-Maze likes this. Assembler-MazeOct 9, Joined: Aug 3, Posts: 5, If the post effect is enabled, no difference with or without instancing. Assembler-MazeOct 15, Assembler-MazeOct 21, I just ran the demo again and I see a lot of errors in the console.
World Beyond - Kreator - Hallucinative Comas (VHS), Your God - Nails - Unsilent Death, Ms. Sweetwater (Skit) - Ghostface Killah - Fishscale, Keep On Jumpin (Subclub Mix) - Various - Decadance (Volume IV)