Open QbieShay opened 2 years ago
I think instead of having a custom shader for ParticlesRenderMaterial, we should instead have ParticlesRenderMaterial inherit from BaseMaterial so it has all the same options as StandardMaterial, but can have all the Particles-specific features enabled by default. That way we can maintain consistency between the Materials. We could still add particle-specific code to BaseMaterial and then disable them by default when using StandardMaterial, or have particle-specific code in ParticlesRenderMaterial.
The situation I would like to avoid is the awkwardness we have now with Sprite3D and AnimatedSprite3D where users add an override material because they want a single effect from StandardMaterial, but then they suddenly lose some of the helpful fields that are built into Sprite3D.
Hey @clayjohn ,
Most VFX use custom shaders. I don't think it makes sense to add the ramp and erosion to the standard material, considering that they are very specific to particles.
I understand what you're saying, but particle materials are radically different in usage from normal materials, unless you go for realism, and in that case our spatial material already works well
Additionally, i feel like Spatial Material got a lot of features precisely because we decided to not specialize it so far. It's used for static meshes, skinned meshes, emissive material, transparent materials..
Overall, it just does a lot out of the box, of which many things are exclusive with each other
We could add features to ParticlesRenderMaterial not present in StandardMaterial. But so far Godot's design has been to let you combine any rendering feature with particles, they aren't limited to typical billboarded quads, accordingly, things like fade, emission, normal maps, etc. all just work out of the box.
I don't feel good about adding features to a ParticleRenderMaterial and not exposing the other features as you run into the problem where someone wants something seemingly basic like normal maps or emission, but they are not available. Then we are stuck either duplicating code or forcing the user to make a custom shader.
Using SpatialMaterial is still possible for particles. This material would just be the one assigned by default to a particle system
Using SpatialMaterial is still possible for particles. This material would just be the one assigned by default to a particle system
The problem is if someone needs a feature only available in SpatialMaterial and another feature only available in ParticlesRenderMaterial.
At that point they'd make a shader. Ideally, all basic functionalities (normal map, erosion, etc.) will be supplied each in a VS node so recreating these behaviours is not hard.
Again, this isn't meant to cover all particle uses. It's meant to be a first step for people that use particles, making it easy for them to obtain a good looking particle system out of the box, without having to tweak all the parameters in a spatial material, which for particles is full of noise.
In most cases, VFX artists will make custom shaders anyway.
Of note, this shader is the product of professional experience in stylized games. With a shader like this one, I can cover most of the particles I need.
I had started with an ubershader in the past (see here https://qbieshay.itch.io/godot-vfx-kit). I still consider the shader proposed here an easy to learn and tweak first step for people (and artists unfamiliar with shaders) starting out. Using kits like this one https://www.artstation.com/marketplace/p/YDnN0/handpainted-flipbooks-01-assets-for-vfx-artists?utm_source=artstation&utm_medium=referral&utm_campaign=homepage&utm_term=marketplace is not possible with spatial material.
Describe the project you are working on
Various VFX and Godot
Describe the problem or limitation you are having in your project
Godot doesn't offer a good out-of-the-box material for particles. Specifically, while SpatialMaterial has been improved tremendously, it's too big for particles and making defaults that work with particles would compromise the UX for everyone else.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Note: the following shader works best for simple stylized particles. For realistic particles that use normal maps, motion vectors and emission maps, we will need a more complicated shader. But it would be probably best to just have a motion vector node in Visual Shaders, since the format of these textures isn't 100% standard.
Add a new material
ParticleRendererMaterial
:Download shader + scene: https://gfycat.com/scalyofficialbighorn DefaultParticleMaterial.zip
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Download and try the following shader:
If this enhancement will not be used often, can it be worked around with a few lines of script?
Yes it can, but it's about good built-in materials. Plus, it enables
from https://github.com/godotengine/godot-proposals/issues/5044
Is there a reason why this should be core and not an add-on in the asset library?
Improve editor and Godot UX for VFX Artists, out of the box.