-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve foliage instancing #43
Comments
Maybe to add up on the description it could be faded in the distance like the visibility ranges, and giving an ability to get replaced in the distance by another mesh/alpha card. It could be good to see how the roblox engine manages a high amount of grass with a small loss on performance with particle shader. https://youtu.be/luhAhuR_nw4 at first it seems there's only s region that uses grass and by the distance lods appear there. and also botw https://youtu.be/3eN3h6hV45s |
Sounds pretty good how it coming, though something that should be taken into account are custom lods, where for example for short distance you can have mesh foliage and in longer distance a billboard mesh is used with less vertices. I think for lod system the mohsen foliage paint can be useful ( it allows various lods and are customizable if you want to check it out https://github.com/mohsenph69/Godot-MTerrain-plugin, though don’t remember if he uses MMI). Edit, yep he uses multimesh based on his grass introduction video https://www.youtube.com/watch?v=w31Mrag05cc Also wouldn’t the particles be even faster in 4.3 thanks to the acyclic render graph(gpu particles)?. |
Distance fade is handled in the material of the user's object. If using MMI chunks distant chunks won't be generated.
We'll be lucky to get any LODS at all. Custom lods with MMI chunks means 2-4x the number of chunks and instances to manage. If autolods work, and I haven't tested them yet, great. There's a proposal or idea to connect custom lods into the built in system, so that's perhaps the best way to get custom lods in MMI. However, I will look at other systems to see what they do. Links to the specific section of code are appreciated.
I don't know much about it. Do you have a link where it talks about particles? |
Yea sounds understandable though i think for that you could talk with mohsen about his approach, which seem’s to work well. As for his system let’s see if i find the files where he uses it. Edit: alright the part of the code that shows grass is at https://github.com/mohsenph69/Godot-MTerrain-plugin/tree/master/gdextension/src/grass Where it seem’s to show the lod part is in lod sething h and gdextion, where it seem’s to store the lods and being used at the mgrass code, which could be included in the grass chunk code where it calcultates that part ( it what i think, i am no expert in this stuff and i can commit a lot of mistakes. ).
Yes here it is about the performance diference when it talks results — gpu performance. |
Good discussion on #rendering godot dev chat. Bottom line, acyclic graph won't help fixed particles like grass much. MMI is simpler and more efficient than a particle shader (which uses MMI in the background).
|
Adding collisions to objects can't come soon enough. We can't have people running through trees! Once that's in, I can move on from Proton Scatter. Love the plug-in: you're doing God's work here! |
It's fine , the devs are busy with other stuff rn that is pretty important too , in the meantime keep it with proton |
Would be nice to have the ability to select more then one mesh for building forests with random trees or a field with grass and flowers |
Would be cool to have presets where each mesh has it's own weight. Also, big thanks to all devs and contributors for making this plugin. |
Update
First pass of an MMI implementation was merged in #340, improved in #402 and individual commits
Redesign of the data structure was laid out in #524 and implemented in #523.
This ticket will stay open to track these future improvements:
Original
My idea for a paintable instancer is:
#324 and #278 need to be completed before this.
Reasoning:
Other Notes
The current control map format has 11 bits free, and most likely need 9 of them for paintable uv scale, slope, and rotation. 2 more could possibly be added to the base & overlay, or used for non-destructive layers.
Thus we probably need a second control map that could allocate foliage particles, water, and other items. However this other control map may not need to be in vram. It could be used to populate an MMI or a buffer filled with positions for a vertex shader.
Surprisingly, Godot's autolod apparently works with MMIs, according to SimpleGrassTextured, so this should be tested with MMIs and particle shaders.
Other solutions
Hterrain approach uses splatmaps to store detail layers, then uses that data to generate MMI chunks
SimpleGrassTextured appears to be an MMI painter. See https://github.com/IcterusGames/SimpleGrassTextured/blob/main/addons/simplegrasstextured/grass.gd.
What do other solutions use? MTerrain, UE, Unity?
My ideas
https://godotshaders.com/shader/wandering-clipmap-stylized-grass/
https://godotshaders.com/shader/wandering-clipmap-foliage-particle-process/
Ghost of Tsushima style Grass
https://www.youtube.com/watch?v=bp7REZBV4P4&t=2s
https://www.youtube.com/watch?v=Ibe1JBF5i5Y
https://www.gdcvault.com/play/1027033/Advanced-Graphics-Summit-Procedural-Grass
Consider rendering foliage without meshes
https://www.youtube.com/watch?v=R-bjXOEQyX8
VERTEX_ID and mesh-less rendering godotengine/godot#19473
ArrayMesh with flag USES_EMPTY_VERTEX_ARRAY still needs vertex array for rendering work godotengine/godot#83446
GL Grass
https://github.com/SomePineaple/GLGrass
https://www.youtube.com/watch?v=2h5NX9tIdno
https://gpuopen.com/learn/mesh_shaders/mesh_shaders-procedural_grass_rendering/
https://www.youtube.com/watch?v=jw00MbIJcrk
Ghost of tsushima style grass in Godot
https://github.com/2Retr0/GodotGrass
The text was updated successfully, but these errors were encountered: