Godot: 3D Particles color gradient / albedo of mesh is preferred over particle material

Created on 22 Jul 2017  路  8Comments  路  Source: godotengine/godot

Operating system or device - Godot version:
Manjaro, master as of posting
commit: aa798eb

Particles seems to ignore any color modulation in the process material. This is causing problems trying to create effects such as clouds and other fade out effects. Would be nice for 3.0.

Can provide a project if needed, but adding a color gradient to a particle3d node in the process material is enough to replicate. Was wondering if anyone else was getting this error.

documentation enhancement core rendering

Most helpful comment

This is not a bug, although it might be kind of confusing at first why this happens. You need to set the material of the particle mesh to use the vertex color as albedo (because internally, the particles are colored by setting the vertex colors). A demonstration:

albedo

parts

(also you should check the Transparent flag if you want alpha to work in the color ramp)

All 8 comments

Godot 3.0 alpha1, Windows 10 64 bits, nVidia geforce 940M:

I'm getting this too, color or gradient don't do anything. I'm using the built-in procedural quad meshes.

Project:
ParticlesColorRamp.zip

This is not a bug, although it might be kind of confusing at first why this happens. You need to set the material of the particle mesh to use the vertex color as albedo (because internally, the particles are colored by setting the vertex colors). A demonstration:

albedo

parts

(also you should check the Transparent flag if you want alpha to work in the color ramp)

This should be documented. I had to search for this issue to find out why colors weren't working.

Ideally, we should disable a node configuration warning if vertex colors should be enabled but they aren't, but this sounds difficult to detect programmatically.

Even better, Vertex Color > Use As Albedo should be enabled automatically when creating a new SpatialMaterial for use in Particles or CPUParticles.

@Calinou this is documented in the ParticleMaterial documentation here http://docs.godotengine.org/en/latest/tutorials/shading/shading_reference/particle_shader.html#vertex-built-ins

I disagree that we should force use_as_albedo on users. Many users use COLOR as a general purpose data container.

That's shading reference, not material/particle documentation, though.

@Zireael07 fair enough. Please also see the Particles Material documentation http://docs.godotengine.org/en/latest/classes/class_particlesmaterial.html#class-particlesmaterial-property-color

Was this page helpful?
0 / 5 - 0 ratings