VOLUME GRASS - Unlimited Density

The answer is not obvious. I might tell you - yes, it IS fixed in world space, but I’m doing a trick depending on direction of viewing vector from the camera to rendered pixel. When we’re pointing down I bend the grass to hide grid structure of how billboards are placed on the ground. This might break stereoscopic impression a bit. I mean “a bit” because I don’t touch the grass when we look at this at mid and narrow angles. This bending parameter can be adjusted. You can try to set it on the value which is both - acceptable for stereoscopy and the same time hiding grid structure. The other problem might be wind. Can’t exactly tell how it would behave looking from separate oculus camers (for left/right eye). I believe that this IS stationary in world space but I’m not 100% sure. Anyway - making grass waving less will fix eventual problem. And I DO NOT turn the grass towards the camera which kills 3d impression in case of traditional grass system. My billboards are placed firmly on terrain as a XZ planes grid

Yes, VolumeGrass 2 will allow you to choose one of terrain control splat texture channel as volume grass guide. Simply you can paint grass on the terrain using Unity’s texture painting brush. W/o my grass you’ll see flat texture (grass). With VG you’ll see 3d grass extruded upward.

I guess black problem sits somewhere in difference between DX9 and open gl. Shaders can behave different in certain situations (for example when normalizing zero vectors, divisions by uncertain values near zero or zero). When soccer works for you I believe situation is not that bad. We’ll probably need to work together on finding the reason, because I can’t get this behviour on my side in open gl mode on my Win.
Refering to your impression about wind. I don’t see the effect on your machine. I can however imagine that I overused wind distorion under the propeller to present the idea. VG makes wind by locally displacing uv offset. Actual billboards are not displaced. They are purely virtual and we only dynamically change the position from they are rendered (modification of viewDir in tangent space speaking technically). When wind is overused (too large amplitude) this reveals the technique used. Yes, that’s about cheating eye, but is effective and visually acceptable. Anyway - it makes the grass much more “elasticly” distorted comparing to animation of two upper vertices of classic billboard grass approach. Grass is rather waving not stifly streching.

As I said above - you need to tweak wind parameters to the visually acceptable results. When the wind amplitude is not quite big grass is waving w/o any strange results. You need also to consider that grass look depends on the angle we’re looking from. At angles perpendicular to the ground grass is bent to hide grid.

Short and tall grass on the same volume - not possible in current version. I’ll add such option (to push down gras areas locally) in VG2. I actually tested this and it looked quite nice. Unfortunately it also affects performance as raycasting takes longer to hit something (ray needs to travel thru large empty spaces within the volume). In current version you can place two volumes on the same place using z write feature. One volume can be higher, the other shorter. I haven’t tested this yet (surely will - I’m curious about it), and this should work. Both volumes can blend then.

The problem is not related to AFS. However I haven’t placed AFS on the volume grass, but it will work. I’m sure about it. I intentionally placed some default Unity grass under the tree in the meadow demo to prove that my grass and other objects can blend together. As I’m AFS user I can put some vegetation here and there and make a screenshot for you how it looks like.

About your screenshot I can’t tell too much because I don’t see how the mesh is constructed, maybe give me another screenshot with volume mesh wireframe present. I see your grass is high comparing to its horizontal dimention. Volume Grass can render grass with side walls (we simply cut edges vertically) or be gradually pushed down to the ground at borders (possible easily with volume made in my VolumeGrass.cs editor, when using custom mesh you need to paint vertex color to green to push it down). VG2 will make borders looking even better using dissolve mask. About your other problem - that’s related to mentioned VG feature that bends viewing vector to hide grid structure. Yes - you can remove this artifact playing with material “settings” section - use “bend” slider to adjust strength of distortion. We need to consider that actually not free 3d grass blades are rendered, but billboards thus looking at them downward reveals the grid structure.

Tom

Hi Tom. I’m looking at purchasing but am wondering if it would work with Unity terrains generated procedurally at runtime. If I understand how the product works I’d have to generate the mesh for the grass volume at runtime. Beyond that, are there any issues with Grass and procedural terrain as far as you know (for example, processing delays that one would normally not care about when working in the editor)?

SOLD!!! :smile:

Thanks for the info

I not understand what means by “cut edges” and “side walls” how i can do it in VG editor ? Can you give several instructions how to do it.

Now i have example :

Not smoothed border when rendering

1696783--106557--volume grass-border1.jpg

And how its look like in editor

1696783--106558--volume grass-border1-editor.png

I try to check option “Fadeout borders” and press button “Rebuild LOD” but in this case grass disappered at all

1696783--106559--volume grass-border1-editor-fade border.png

Yes it’s work, thanks.

Hello Tom,
I like your great work. One short question, in the readme file i read:
“4. To make custom grass billboard textures use a tool (Window/VolumeGrass Tools/Prepare grass texture)”
Where do I find that tool?

Tia,
Jochen

… found it :wink:

Hello again,
about the Silhouettes backcut stuff… It doest work for me, also the soccer sample dont cut out. I have the unityPro version :wink: Btw, there is a missing texture file for the soccer ball. He is pink.

Please, can you check the soccer sample scene?

Tia,
Jochen

… and no cut out from the grass borders, see pic…

1696893--106563--GrassBorders.PNG

Works great overall. But it doesn’t seem to work with the Alloy shaders and there’s a border around the edge of the grass bounding area which shows the Skyshop Skybox, any ideas?

I would like to ask if this could be used in an aircraft sim, would the grass be visible at low altitudes for example? Can you set eh height of the grass and have different types of grass?

Beautiful grass Tomas!
One question…the grass is very Uniform. Do you think having some sort of noise based height, even off of a texture, would add to the attractiveness of it?

1 Like

I too think it would add to the realism of things, however I don’t feel the need to worry.
Judging by the amazing work Tomas has made available through RTP3
I’m sure the additions and changes to VG2 won’t be any different :slight_smile:
I personally am very excited for the future of Volume Grass.

It’s thanks to developers like Tomas Unity is maintaining its momentum as a great platform to make games on.

I bought this yesterday, i have been up all night trying to get it to work, with no succes.
The grasshader.shader won’t compile, i literally waited for four hours the first try, after that i tried it
on 2 different pc’s, with Unity pro and Free, shader won’t compile, whatever i try.

You have any idea what i can do to get it to compile so it can be used ?
I have been at it for 12 hours now, i’ll try some more tomorrow.

If i can’t get it to work at all, could i get a refund ?

not works on MAC better indicate on store description

Hi Tom,
a small misunderstanding…actually the soccer also doesn’t work. The web player version at your first post is working in the web player demo, but I can’t get it to work in Unity.
So every scene open in Unity is black.

When I open this link: then I get black.
http://www.stobierski.pl/unity/meadow1_5.html
When I open the scene in Unity which comes with the asset, it is black too.

When I open the soccer, I get grass in the web player, but in Unity, this scene also is black.
http://www.stobierski.pl/unity/soccer1_5.html

This is my system:
Processor 2,8 GHz Intel Core i7
Memory 16 GB 1600 MHz DDR3
Graphics NVIDIA GeForce GT 650M 1024 MB
Software OS X 10.9.3

RT

If you can make dynamically volume meshes that are placed over your terrain at the grass heihgt distance then it’s no problem to make it fully dynamic. To control coverage you can adjust your gtras meshes (painting them on the areas where grass actually occurs) and to make softer transfitions between grass and terrain on the grass borders use vetex green channel (when it’s green you’re removing the grass for such vertex).

Cut edges means that we can see properly rendered sidewalls. in your attachment you hadn’t it. When using “Write to Z buffer” shader keyword (toggle in VG material property) the result should be seen in editor view. When not writing into Z-buffer you need to use script component on your camera (pro only) and results will be seen in playmode only. Not writing to depth might be faster in certain situations. Check how your sidewalls look like when you watch then from the side of grass volume (that is when you looking at grass border standing outside it). The problem in your case is you need to put VG control points clockwise (you’ve got it clock counter wise) when building. To use fadeout borders you need to put more tesellation on your resultant mesh. It’s not normally a problem when doing grass on wavy ground (additional vertices will be added inside edited bounds). On flat areas you need to add more tesellation points using alt+shift+click inside mesh. Fading roberds means that they are pushed to the grund, but in your case ALL edges are the only one in resultant mesh that’s why all vanished on build.

Look above - you probably got the same issue like jquery has.

+1 for this, I’m aware, definitely, but you need to wait for such feature in VG2.

I’ve replied on AssetStore. I think trying on different Unity will help. I’d recommend Unity 4.5 - compilation time is very small then. In the end I could give you compiled shader. We can try to make it working together when you only tell me more about your computer and Unity version (try U4.5 before). If you still can’t get it working (which would be very strange as it works on so many PCs I’ve tested) refund is no problem for me.

When webplayer works - VG will work in open gl on Macs, it’s only matter of finding the feature which makes it not working. In worst case it won’t work in Unity Free for Macs, but I assume it won’t be the case. I made much more complex shaders (Relief Terrain Pack) that works on Macs and I see no reason VG might not work.

I need Mac user to cooperate with… Using open gl mode in my Windows is not enough I see. (it works on my side)
I see your point clearly, only give me some time rather than posting discouraging reviews on AssetStore as it is not my intention to mislead anybody… Just wasn’t aware about Macs.

mmmhhh… the borders work with the “write to z-buffer” toggle-off.

But look at the attached picture, that’s how the soccer example work for me. It doesn’t look right, or what you mean?

greetings,
Jochen

On which platform exactly you work ? Windows 7, 8, Mac ? Which Unity version it is ? I disabled shader compilation for soccer ball on “d3d11_9x” - WindowsRT. The ball itself is textureless. It’s shader can make it w/o texture even if you see empty texture slot for main texture.

It`s windows 7 64bit and unity3d Pro 4.5.1f3
and a NVIDIA GTX780