We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Realtime Foliage in Verge3D

Home Forums Graphics / Blender Realtime Foliage in Verge3D

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #76196
    adamabr
    Customer

    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 3 months, 3 weeks ago by wpadm.
    #76207
    adamabr
    Customer

    Some 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 3 months, 3 weeks ago by adamabr.
    #76212

    Hey 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! :good:

    https://v3d.net/nf1

    #76216
    visualizer
    Customer

    Hey
    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.

    #76218
    adamabr
    Customer

    Nice 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

    #76220

    Here 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

    #76222
    adamabr
    Customer

    Thank 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.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.