Open darksylinc opened 1 year ago
Looks awesome, very promising. What do you think of adding a final demo/sample with Soft Particles implemented? Would be useful for all right?
My aim is the following:
The idea is that you should be able to replace most particle FXs with the new system, and those that can't just run it on the older system.
The new system is an extreme take on efficiency, while keeping backwards compatibility with 90-95% of the functionality.
I may improve it further (one of the reasons I didn't want to enhance PFX1 was its massive performance limitations); but for now soft particles are not one of the goals.
Probably the biggest missing feature that PFX1 has will be individual particle sorting. Perhaps this can be countered with OIT techniques like WBOIT.
Okay good to know. I'm glad there will be less batches and more particles possible. But you didn't actually answer my question about Soft particles implementation (like standard thing fixing hard edges since years), which I don't exactly know how to implement and would benefit greatly if it was already done in a sample/demo.
Well no individual particle sorting is sad for me, it means dust and clouds will look bad. But if OIT was already included in sample then great. Otherwise I doubt I could even think of that in future. I would be thrilled if there was even particle sorting across particle systems. This would fix some issues I had on few maps that had a few of different smoke/dust areas overlapping and visibly switching then. I guess I should go into 3d volumetric (clouds etc) but I don't even know how to start with this: do I render a cube with lots of slices, how do I know its front and back distance at once in shader?
But you didn't actually answer my question about Soft particles implementation
I... did? I said "...but for now soft particles are not one of the goals."
Well no individual particle sorting is sad for me, it means dust and clouds will look bad But if OIT was already included in sample then great. Otherwise I doubt I could even think of that in future.
Indeed, we'll cross that bridge when the implementations has the bare fundamentals running :)
guess I should go into 3d volumetric (clouds etc) but I don't even know how to start with this: do I render a cube with lots of slices, how do I know its front and back distance at once in shader?
There are many ways. Currently the most efficient ones are using SDF (Signed Distance Fields) and Compute Shaders. Not basic topics though.
for now soft particles are not one of the goals.
Ah I see, pity, without this my dust will look bad in any system.
SDF (Signed Distance Fields) and Compute Shaders. Not basic topics though. Not basic topics though.
Right. But SDF so far I know is to create the clouds themself, but IDK how to even put that cloud's bounding box in scene with other 3D stuff. Or maybe it would be without geometry (meshes) even? So all shaders having new code for it like fog, and shapes computed with SDF so all shaders just reading e.g. sphere position, radius for cloud areas? Hmm. Well, either way it's probably costly to render.
Right. But SDF so far I know is to create the clouds themself,
No, SDF is how you render them. You use ray marching and SDF just accelerates the ray march. Here's a (very advanced) example.
Here's a more simple shader where a sphere is rendered via SDF (no geometry, no vertices; all raymarching and SDF)
The main difference between that sample and an actual SDF cloud renderer is that in the sphere example the SDF value comes from GetMinSceneDistanceFromPoint(t)
(since the SDF of a sphere can be easily derived mathematically) while the SDF of a cloud system comes from a precalculated 3D texture.
Right. Thanks for info. I think I'll try it someday, I enjoyed those demos since a while, it would be cool to drive through such clouds.
And for soft particles? Do I need to split rendering into 2 workspaces, e.g. first draw all (or only depth?) except particles, then draw particles on top using that distance to fade them close? Is this right, and is it costly?
Hi, just curious: what is the status on this? Is it far from finish and merge? I checked out the demo and it was working fine for me, on Debian with GL3+.
I also saw some very nice new tutorials: Add Hlms tutorial 02 Add Hlms tutorial strangely done on this branch, why not on master?
BTW, wanted to also ask: is it possible to have random size particles at start? There are width and height in
particle_system Cloud1
{
material Cloud1
quota 1000
particle_width 122
particle_height 122
..
What I'm missing here is some range e.g. factors scale_min
, scale_max
that would randomly scale width and height when emitting. I know of affector Scaler
but it works later.
Hi, just curious: what is the status on this? Is it far from finish and merge?
I am waiting on two things:
I also saw some very nice new tutorials: Add Hlms tutorial 02 Add Hlms tutorial strangely done on this branch, why not on master?
Hlms has had some API changes in warm_up to add multithreaded shader generation and PSO generation (which btw I need to document), and I didn't want to have to deal with the changes (basically merge conflicts).
What I'm missing here is some range e.g. factors scale_min, scale_max that would randomly scale width and height when emitting. I know of affector Scaler but it works later.
On PFX2 it should be easy to support. I don't know about PFX1, because it has two modes of operation (all particles have same size vs each particle has its own size). It shouldn't be impossible though.
Hi. Any update, on status of this? I thought it'd take a couple of weeks but it's been already few months :worried: .