Skip to content
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

Quick trails, vector fields and collisions for particles #8583

Closed
ghost opened this issue Apr 29, 2017 · 14 comments
Closed

Quick trails, vector fields and collisions for particles #8583

ghost opened this issue Apr 29, 2017 · 14 comments

Comments

@ghost
Copy link

ghost commented Apr 29, 2017

Unreal engine has very robust modular particle system which allows for some great stuff: https://docs.unrealengine.com/latest/INT/Engine/Rendering/ParticleSystems/Reference/index.html
It would be great to have some of these features available in godot right away without messing with shaders.

Vector fields allow for some really funky and great particle spreading effects that I'm sure a lot of games would benefit from: https://docs.unrealengine.com/latest/INT/Engine/Rendering/ParticleSystems/Reference/Modules/VectorField/index.html

Benefits of having collisions and trails quickly available I'm sure I don't even need to describe, that stuff is great.

@eon-s
Copy link
Contributor

eon-s commented Apr 29, 2017

On Godot 3 particles can do that but a built-in particle editor with some preset shaders could be handy.
Related #4250


Particle collisions are planned for 3.1, I think.
Related #3994 #6377 and #4250 again.

@ghost
Copy link
Author

ghost commented Apr 29, 2017

I'm pretty sure particles can't do vector fields, at least I've been looking through a build I did today and found nothing of sorts.

Particle editor with stuff quickly accessible would be simply amazing

P. S. You could probably do a really small grid of areas with each having their own gravity vector and strength and it would work sort of like a vector field but that seems like a dirty hack and then there's a question of accessing particles when they enter.

@eon-s
Copy link
Contributor

eon-s commented Apr 29, 2017

@ArcFutahito can't test even trails because Godot crashes when I open the shader tab (but I don't know anything about the new shader language anyway), just have seen trails and I believe the "vector field" may be possible too because you can set emission points and modify particles with a shader.

@ghost
Copy link
Author

ghost commented Apr 29, 2017

Vector field is less about emission and more about applying force to particle based on it's position. Here for example https://docs.unrealengine.com/latest/images/Engine/Rendering/ParticleSystems/Reference/TypeData/GPUSprites/GPUSprites.jpg
trails are the spaces in vector field with least resistance and empty spaces are formed when vectors push particles out of them to move through a 'better' area.
http://www.euclideanspace.com/maths/geometry/space/fields/gravity.png Here's vector field example for gravity

@eon-s
Copy link
Contributor

eon-s commented Apr 29, 2017

@ArcFutahito I know about the math vector fields (I love gradients even now that I'm rusty on the subject) but not used to that concept of trail, you refer as "trail" as something ahead, not behind?

@Zylann
Copy link
Contributor

Zylann commented Apr 29, 2017

@eon-s the trails you've seen in the news post are in fact brute-force particles, many quads drawn one after another scaling down. Any particles drawn many times at close distance can look like trails, however due to its nature you'll be limited to how stacks of quads look like.

Vector field is doable in a particle shader, it can be a simple formula, some shader params, or a 3D texture (if supported?).

@eon-s
Copy link
Contributor

eon-s commented Apr 29, 2017

@Zylann I see, I hope to be able to test it soon, my system likes to turn minor impacts into huge ones

@ghost
Copy link
Author

ghost commented Apr 29, 2017

There's actually an interesting thing in Unreal, it does trails by drawing SOME particles and then connecting them in order they were emitted, so it shouldn't be as taxing and produces some cool results
https://docs.unrealengine.com/latest/INT/Engine/Rendering/ParticleSystems/Reference/TypeData/Ribbon/index.html

As for doing trails by making particles fading out and spawning a whole lot of them it was possible in 2.x as well. At least I remember playing around with idea

@ghost
Copy link
Author

ghost commented Apr 29, 2017

With this logic to make trailing particle you'd probably want to specify a "cut off" point which will get then get placed behind as something like billboard and stretched to the next particle. It probably gets tessellated for sweet curves and alpha is applied as gradient between alpha of newer and older particle.

At least that's what I think happens.

@eon-s
Copy link
Contributor

eon-s commented Apr 29, 2017

Ah, saw the "trail divisor" property and made crazy things in a "I don't know what I'm doing" fashion, still is not what the OP refers as "trail", I think.

@ArcFutahito but particles don't know where are the others, may be more complex now that is GPU based (or more simple, I know less than zero about this).

@ghost
Copy link
Author

ghost commented Apr 29, 2017

@eon-s If you mean this comment:

trails are the spaces in vector field with least resistance

I just refer to tails that get formed. Think solar prominence https://en.wikipedia.org/wiki/Solar_prominence

As for quick trails I refer pretty much to these ribbons and what I said in the comment above.

@eon-s
Copy link
Contributor

eon-s commented Apr 29, 2017

Weee

parttest

I'm not sure what ribbons are, these seem doable.

I hope the experts make some demos showing the current system capabilities.


Something that I have noticed is that particle system is complicated to manage because particle emitter, process material and draw passes can't be edited on the same screen (lot of forwards and backwards until gets the desired effect), this may be another issue (or one of the related ones).

@ghost
Copy link
Author

ghost commented Apr 29, 2017

I'm not sure what ribbons are, these seem doable.

Here's a link to unreal docs, you can sort of understand how those work just by looking at functions
https://docs.unrealengine.com/latest/INT/Engine/Rendering/ParticleSystems/Reference/TypeData/Ribbon/index.html

@Chaosus Chaosus changed the title Feature request: Quick trails, vector fields and collisions for particles Quick trails, vector fields and collisions for particles Aug 4, 2019
@KoBeWi
Copy link
Member

KoBeWi commented May 28, 2020

We are moving proposals to proposals repo, also there's official proposal for particle ideas: godotengine/godot-proposals#815
Leave a comment in that issue if this feature wasn't already mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants