Fluids
Added new module to DildoLanguage - Fluids.
The first version of the fluids system includes:
- Configurable dual particle system with custom emitter, used to simulate orgasm
- Procedural cumstain generator
- Custom fluids renderer, using by the spray/stream particles and the generated cumstains
The demo scene includes a short demonstration of the feature, but does not yet contain more in-depth explanation. For now a short introduction/documentation is included in this update.
The fluids module uses the standard DildoLanguage preset system and comes with several demo presets. Just Load them as usual to and check how they are set up. There is a lot of parameters to tweak (and way more internal but not published in the UI). But most of them should be quite easy to understand.
Documentation
Orgasm Tab
Configure the overall behavior of dildo's orgasm here. To test it, press the Test Orgasm button.
Each orgasm consists of one or more Bursts. Each burst consumes certain amount of Load. The effect ends when the dildo runs out of Load to Burst.
Some of the parameters are:
- Load: the overall amount of cum that will be emitted from the dildo.
- Randomness: how much the actual values will be randomized. Set to 0 to use them exactly as is.
- Burst Length: duration in seconds, this is also how much of Load the burst will consume.
- Pause Length: duration between bursts.
- Burst Velocity: velocity of emitted particles.
- Particle Rate: amount of emitted particles.
- Decay sliders: ratio to which the value will decay over the burst. Set to 0 for full decay to zero, set to 1 for now decay over time.
Spray and Stream Particle Systems
Each burst emits particles in two particle systems:
- Stream: the main system of elongated drop-shaped particles, usually with lower Spread Angle. When particles from this system collider with anything, they disappear and the collision point is used to generate the procedural cumstains.
- Spray: supporting particle system, usually containing more particles, less elongated, with higher Spread Angle. These bounce and slide off collisions and disappear after a while.
The Spray-Stream Ratio controls how many particles will be generated in each particle system. At 0, only Spray particles will be generated (and therefore no cumstains). At 1, only Stream particles will be generated.
Shape
Both kinds of particles are not simple billboards but elongated shapes. Later processed by the fluid renderer, so the exact shape will be apparent only if the particle ends up all alone with nothing else to form the final fluid shape.
- Particle Stretch (constant): how much stretched the particle is, in the direction of its movement. Constant stretch value. At 1, the particle will be spherical (if the value below is zero). If lower than 1, it will be actually shorter in the direction of movement.
- Particle Stretch (scaled by velocity): Additional stretch, scaled by the movement speed. Not applied if 0.
- Particle Slimming: Makes the particles more narrow as they speed up. Not applied if 0.
- Capsule shape: while the Spray particles are oval, the Stream particles are shaped more like a capsule. The Roundness makes it a bit more "fat" on the sides (at 0 the shape will be a standard capsule). Drop shape makes it more narrow at its end.
Material
The rest of the parameters control the material. Some of them are automatically interpolated over the particle's life, with the left values representing the material when the particle is born, and the right values the material just before the particle disappears.
Some of the more non-obvious material parameters are:
- Specular reflections are controlled by Specular Strength, Shininess and Reflectivness. The first two values control specular highlights from a fixed directional light, with Strength adjusting the overall value of the white specular highlights, and higher Shininess making them more localized. On the other hand, Reflectivness controls the amount of reflected gobal illum sky cubemap, configured in VAM's Scene Lighting.
- Transparency is configured by Thickness and Transmission. Thickness controls is basically the usual alpha transparency, it defines how much of the particle's material parameters is accumulated for the fluid rendering pass. Transmission sets how see-through the particle's material is ; the Transmission refracts the image behind it, controlled by the Refraction Strength. Transmission is also tinted by the Color.
- Fresnel controls how reflections and transmission are mixed. Higher values will make the parts facing the camera only Transmissive, with only the edges of the particles being Reflective. The usual stuff.
Cumstains
When Stream particles collide with anything, these contact points are recorded and then later processed to generate procedural cumstains. Collisions with person atoms are adjusted to place the cumstains directly onto the skin (since person colliders are not very precise), all other kinds of atoms place cumstains on the colliders directly.
This processing happens usually once per burst, but will be done more often if a burst has longer duration. Since especially the person-skin-processing if quite CPU intensive, it's performed on a background thread and the cumstains appear only once it's done.
To simplify the algorithm a bit, the contact points are processed in a specific direction, and consecutive series of contacts within certain angle are connected by a curve. This is repeated until all contact points are processed, or Generator Loops times maximum. The generated curves consist of small capsule particles, not longer than Segment Length. With the beginning of each curve using the standard over-lifetime Size, randomized by Size Randomness. While the end is scaled down according to Cumstain End Narrow ; set it to 1 for no narrowing over the curve's length.
The rest of the parameters is pretty much the same as for the spray/stream particles, with more of them being configurable over the cumstains life-time. The additional Height parameter controls how much the cumstain sticks outside of the surface it's attached to.
Triggers
The Fluids module exposes several Storables which can be used from triggers. Their name start with "fluids:".
- fluids:startOrgasm: action to start the configured orgasm, same as the Test Orgasm button.
- fluids:startEndless: similar action, but does not consume any of the Load. Therefore it goes on forever.
- fluids:burst: starts one burst and then stops
- fluids:burstNoPhysics: same as above, but behaves as if Force Applied to the Tip was set to zero
- fluids:stop: stops any of the above
- fluids:cleanCumstains: removes all cumstains generated by this dildo
Gotchas
- The whole fluids effect is a screenspace postprocessing effect loosely based on the NVIDIA's "Screen Space Fluid Rendering for Games" paper. Overall, it's way more efficient than trying to construct fluid geometry from particles in each frame. However, it does not play very nice with transparency in the scenes. It will generally appear in front of any CUA transparent objects. There is really nothing that can be done about this.
- Extra care was taken to make the fluids effect work in mirrors, the shading is not exactly correct because of the way the projection matrix is set up. It's usually not noticable.
- While the cumstains are placed on a person atom's skin exactly, they still attach to nearest collider for movement purposes. Overall the effect will look great on stationery or not-much moving subjects. But large movements or big pose changes can make it look quite bad in some cases. There are some plans to improve this in the future, stay tuned.
- The Unity's particle emitter is shite for tiny emitters. This problem is mostly fixed in modern versions of Unity, but in 2018 it's bad. Therefore the particles are all emitted manually from the plugin's custom code. This can unfortunately be quite slow, so I'd not recommend incrementing the Particle Rate too much.
Other Changes
Not much to write here, I've been fully focused on implementing the fluids (and other experimental stuff that's not yet ready for release).
- Added Help tab with a short overview of most important features
- Integrated Fluids presets into Master Presets
- A handful of smaller fixes