You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use billboard sprite particle for fluid.
This would cause fluid look flat and weird when rotate, especially liquid is not really look good with billboard sprite particles.
Use tiny particles for fluid.
This requires a huge amount of particles.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Volume Option
Add "New Volume" option for draw passes in GPUParticles3D
It come with Density property to adjust a scale of signed distance field.
This is just an mockup image.
VolumeMaterial
This material use Spatial shaders or equivalent with additional changes.
sdf(vec3 pos) - This function use to define shape of each particle.
fragment() - This function is the same as fragment in spatial shaders except this fragment function allow sample signed distance field values so user could write their own ray-marching code here.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Generate signed distance field grid of particles inside area of visibility AABB.
Take Density property into account when generate signed distance field.
This can be done in compute shader and use sdf(vec3 pos) function to generate signed distance field for each particle.
Do ray-marching inside fragment function by sample signed distance field grid that already generated in compute shader. This could allow more customize than fog() function in Fog Shader.
Note that it might not yet possible to get full light information inside fragment shader.
Another approach is to provide raymarch() function that done in compute shader instead of using fragment shader. This function might expose more values than fragment function.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Describe the project you are working on
A real-time cinematic scene with fluid that interact and collide with characters and movable objects.
Describe the problem or limitation you are having in your project
Currently, there are some approach to do fluid but it come with several limitations.
Do ray-marching for fluid in fragment shader on cube object.
There is no easy and high performance way to get collision information.
Use FogVolume.
This is the same as first choice plus difficult to customize shape.
Use billboard sprite particle for fluid.
This would cause fluid look flat and weird when rotate, especially liquid is not really look good with billboard sprite particles.
Use tiny particles for fluid.
This requires a huge amount of particles.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Volume Option
Add "New Volume" option for draw passes in GPUParticles3D
It come with Density property to adjust a scale of signed distance field.
This is just an mockup image.
VolumeMaterial
This material use Spatial shaders or equivalent with additional changes.
sdf(vec3 pos) - This function use to define shape of each particle.
fragment() - This function is the same as fragment in spatial shaders except this fragment function allow sample signed distance field values so user could write their own ray-marching code here.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Process of Particle Volume
Calculate particles properties using Particle shaders as usual.
Generate signed distance field grid of particles inside area of visibility AABB.
Take Density property into account when generate signed distance field.
This can be done in compute shader and use sdf(vec3 pos) function to generate signed distance field for each particle.
Do ray-marching inside fragment function by sample signed distance field grid that already generated in compute shader. This could allow more customize than fog() function in Fog Shader.
Note that it might not yet possible to get full light information inside fragment shader.
Another approach is to provide raymarch() function that done in compute shader instead of using fragment shader. This function might expose more values than fragment function.
Possibly Result
The result can be opaque object similar to this.
Image from https://wallisc.github.io/rendering/2020/05/02/Volumetric-Rendering-Part-1.html
If someone want to make volumetric cloud, they would calculate absorption.
Image from https://wallisc.github.io/rendering/2020/05/02/Volumetric-Rendering-Part-2.html
If this enhancement will not be used often, can it be worked around with a few lines of script?
Few lines of script couldn't be possible. Many lines of script? Maybe, but it would face the limitations as mentioned earlier.
Is there a reason why this should be core and not an add-on in the asset library?
This require modify GPUParticles3D which cannot done as addtional module or GDExtension.
Beta Was this translation helpful? Give feedback.
All reactions