-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Particles 3D: emission shape "directed points" is unable to emit in negative directions #10233
Comments
Hi. Really it is working and possible. Also I found in sources, that position of points and normals stores in texture RGBF format. That means 4 bytes for channel, so they store full float numbers instead of 1 byte (0..255), And these floats can be negative. You can find this code in particles_editor_plugin.cpp |
@maxim-sheronov so you are suggesting it's working I just need to assign negative floats to those channels? Maybe there is some software for this task in the wild? |
@kubecz3k yes, it is working. This texture can be created from engine, but I don't know how to create it with other software. Google didn't help with it. But I think that you can use some workaround: For example to create effect on your gif. You need to make 3d mesh with blender for example. This can be strip of poligons in form of ring. Polygons should be oriented from center. To get correct normals. This strip can be very thin to avoid randomness by Y axis. Then you export this mesh as dae (collada) file and export it to Godot. Then open or create scene. Add this mesh. Add particle system. With editor button on top of viewport (did you find it?) create emission points. You will see correct particles emission in scene view. Then you can find texture of points and normals in properties of particle system. And there are option to save this texture in a file. And that's it! You will get this texture. |
you will have better luck just running a script that generates the texture
in GDScript i think
…On Thu, Aug 17, 2017 at 3:06 PM, Maxim ***@***.***> wrote:
@kubecz3k <https://github.com/kubecz3k> yes, it is working. This texture
can be created from engine, but I don't know how to create it with other
software. Google didn't help with it.
But I think that you can use some workaround:
For example to create effect on your gif. You need to make 3d mesh with
blender for example. This can be strip of poligons in form of ring.
Polygons should be oriented from center. To get correct normals. This strip
can be very thin to avoid randomness by Y axis.
Then you export this mesh as dae (collada) file and export it to Godot.
Then open or create scene. Add this mesh. Add particle system. With editor
button on top of viewport (did you find it?) create emission points. You
will see correct particles emission in scene view.
Then you can find texture of points and normals in properties of particle
system. And there are option to save this texture in a file.
And that's it! You will get this texture.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#10233 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF-Z21MWfbyvwohK2CYzigIrhEvHrS7Jks5sZIE5gaJpZM4OzvXS>
.
|
@reduz is it possible? I didn't find such thing in api. |
sample.zip |
@maxim-sheronov Awesome! thank you a lot for your involvement, I appreciate it a lot! I will check sample later today! |
@maxim-sheronov thank you for example I checked it. I believe it might be possible to create what I need this way but for sure it will be easier simply with points. Don't want go deeply into my use case but basically I need very fixed emission positions, with perfectly uniform emission distribution. So I would probably need to have couple orphaned vertexes in blender. At the end of the month I will be trying to recreate some custom particles system from 2.x in a proper way for 3.0 :) Quite curious how will it come out :) |
@kubecz3k I think I could give you small module with convertation of floats, maybe later today or tomorrow. And you will be able to create these textures from script |
@kubecz3k Hi again. You can get module here Usage is very simple Then you can create an image from byte array And if you want you can save it as file Or you can create a texture and pass it to your particle system. Just remember, that one float is for one channel, so you need 3 floats for one pixel. And maybe it is required to use powers of two for width and height of image. And one more thing. Image will not be created if an array will have incorrect size. So you need to have widthheight3 float elements in your float_array to have correct result. |
@maxim-sheronov thank you a lot! Sorry for such delay, I was off from computer for last two weeks :) I can at least see clearly that there is no issue in this subject in particle system itself, so the issue can be closed. |
bugsquad edit: it seems it's working, we just need assign negative float numbers to the texture (as a channel values). So it seems this issue will be more about documenting work-flow for this.
Operating system or device - Godot version:
e93ce33
Issue description:
![center_particles](https://user-images.githubusercontent.com/6129594/29183142-e08735fe-7e01-11e7-9696-5b7b641c0cc5.gif)
This issue is about EmissionShape
directed points
modeI haven't found any way to emit particles in negative axis direction. We can define with r/g/b channel direction vector in which given particle should be emitted (x/y/z), but there is no way to tell particle emitter to reverse axis (maybe some info in A channel? or 0 = reverse, 256 = positive).
Don't know, maybe it's possible somehow, but unfortunatelly without those I'm considering this functionallity not really usable for many scenarios. For example its impossible to create such effect like this one with this mode:
Steps to reproduce:
Link to minimal example project:
The text was updated successfully, but these errors were encountered: