Home › Forums › Graphics / Blender › Realtime Foliage in Verge3D
- This topic has 6 replies, 3 voices, and was last updated 4 months, 3 weeks ago by adamabr.
-
AuthorPosts
-
2024-07-24 at 5:26 pm #76196adamabrCustomer
Hi!
I’ve been experimenting with how I can create good real-time foliage in Verge3D and Blender.
The results so far: https://v3d.net/11es
I am positively surprised at how well this has worked so far but feel there is room for improvement.
Goals: Realistic foliage (trees/bushes/grass) that still is performant in the browser.
What I have done:
– Geometry nodes system for generating leaf cards inside a volume.
– Looping procedural animation of the leaves by rotating a noise texture and affecting the instance rotation. This animation is exported to .mdd and imported again to convert to shape-key animation.
– I have a 3D-trunk but image planes for the tree branches.
– I put a darker, smaller and opaque shape inside the bush to darken the middle.
– Used AGX and look Punchy to get more vibrant colors.Ideas for improvement:
– There is three “levels” of shadows applied depending on zoom level. I wonder how we can control this. You will clearly see how there is a shadow line traversing over the grass when zooming in and out. Preferably this could be mitigated.
– The grass just doesn’t look that great and is a performance thief. I’ve been toying with the idea of somehow just breaking up the outline of the grass rather than distributing them all over the surface. I got an interesting effect when disabling “depth write” I think.
– Performance. This works well on my iPhone 14 and my beefy laptop. My less than modern Android phone struggles. Also this is a minor scene, I’d like to have room for scaling up the scenery.Here is a link to the project files. https://www.dropbox.com/t/H0iqRAoqWJg4gXwf
So, what do you think? I am very interested in ways to make this either more performant or more visually pleasing.
Thanks,
Adam- This topic was modified 4 months, 3 weeks ago by wpadm.
2024-07-25 at 10:16 pm #76207adamabrCustomerSome interesting new things. I found this excellent resource from SimonDev that talks about how grass is rendered in AAA games. Very inspiring and his demo seems to run smoothly on both mobile and desktop devices. This seems much more promising.
Video: https://www.youtube.com/watch?v=bp7REZBV4P4
Live demo: https://simondevyoutube.github.io/Quick_Grass/
However, it uses GLSL shaders in Three.js. Since Verge3D builds on top of Three.js I imagine it should be possible to do something similar. Going off to try this myself.
If anyone has experience incorporating GLSL shaders in Verge3D apps I’d be happy to hear your thoughts.
Thanks,
Adam- This reply was modified 4 months, 3 weeks ago by adamabr.
2024-07-26 at 5:31 am #76212Pavel KotovStaffHey that is awesome! I will look into it, I think I have some quick tips about making the look a bit more realistic using Blender shaders. Later today will post the vid!
I’m not a programmer though, so I can’t look into the the coding part sadly.
Anyway, thanks a lot for sharing!
https://v3d.net/nf1
2024-07-27 at 12:42 pm #76216visualizerCustomerHey
AS a part of experiment I also will take a look sometimes.
but its a good idea to create some sizable lawn i V3d for various project needs.
logically it looks little tedious to create all with opacity maps by maintaining their 3D orientations and motions but gradually it can be developed.2024-07-27 at 3:52 pm #76218adamabrCustomerNice to see some interest
I have started to implement a grass shader using shell shading.
Just like Acerola does here: https://www.youtube.com/watch?v=9dr-tRQzij4
Seems very promising so far!
Will share when I’ve come a little further.
/Adam
2024-07-27 at 4:25 pm #76220Pavel KotovStaffHere are the vids!
https://youtu.be/J0-ADVKYkq4 – overall thoughts and small improvements
https://youtu.be/w7sjCJS7-cw – a more optimized way to create animation for plants
https://drive.google.com/file/d/1zIX99_wdI0J2XeWKnwGV-V4hWAQvhR3a/view?usp=sharing – .blend file
Also I forgot to mention the cascade shadows – you can set the blur between cascades (and much more) in Verge3D segment under Sun settings!
Attachments:
You must be logged in to view attached files.https://v3d.net/nf1
2024-07-27 at 5:22 pm #76222adamabrCustomerThank you for taking your time to look into this Pavel! Very interesting to see your methods.
I’ll share what I find from my experiments coding custom shaders.
-
AuthorPosts
- You must be logged in to reply to this topic.