This thread has a breakdown of a simplified version of the fake fluid effect. Here it is just drawing a fluid profile (need to add a bumpboffset to actually draw the fluid surface cheaply next).
This is here only adding rotational forces. It's not super robust, just a quick way to get started. BP Image 1/2
This is the 2/2 shot of the BP update. The strength value are just faded down. Overall wave strength fades to 0, directional (x,y mask) fades to 0.5 so if no dominant activity, waves are equal
This is the material render target part. This could also just be passed straight to the object shader, but I was writing it to an RT for the step where I made it into a volume texture (simple version does not use). Notice it only computes 3 sine waves, but each wave has X and Y
Ok forgot one BP part (3/3), this function draws the RT of the waves each frame, nothing special, just sets the above params to an MID and draws. Next render mat:
And finally, here is the material on the bottle to display the waves. You could also move the wave function here instead, but having the texture like this will make doing more advanced rendering much easier:
So for a hint on how the additional bubbles were done: A second 'Strength' param was tracked, and its FInterpTo node had a lower Interp Speed. But instead of adding waves, 2nd 'Strength' acted as Bias for bubble height, with a bit of noise texture to break it up.
I really should have normalized the direction vector before the dot product up top. The way this example makes a hard edge it doesnt matter, but failing to normalize would mess up gradient with. oops.
Should have mentioned this too, but adding movement forces is really easy. Basically you just also do "Actor Location" - "Previous Actor Location", multiply that by some small scale value, then also add this to the vector right before the "Vector Length" and "Abs" part.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
Some cloud experiments continued from #UE5#PS5 demo; here showing Flowmaps-3D function from 4.26. The Clouds are made from Curve Assets + hand painted density & flowmaps. Paint thunderstorms! Now as twitter video. Examples will be included in 4.26
Some details: Cloud rendering w/new VolumetricCloud component by @SebHillaire for 4.26.
Clouds painting is a 2d map with RGBA colors. The curves also form an RGBA texture, so depending on which color you paint, that decides which curve profile to use.
Curve DF:
Because the curve profiles get converted into SignedDistanceFields (could get similar result by blurring too), when painting density, the density determines how far along the curve you are for each point. So just adjusting density of the mask gives (cloud compositor here):
The same channel packed free morphing technique used for 4D caustics works for distance field shadows. I touched on this near the end of the @FortniteGame optimization talk at GDC. Tweets with some details to follow.
First a silhouette is captured for each tree from 4 angles. Then each is converted to a signed distance field and each angle becomes one of RGBA channels. Then all the channel packed tree shadows get packed into an atlas.
Then the 'time of day' can be extracted using a simple dot product for almost free morphing, and shadows can change sharpness like any SDF shadows.