- Mar 24, 2021
- 215
- 216
# Coding 'SoftBody' Intermezzo
You can't battle the current Cmp/PhX science regarding "Computural-SoftBody" implementation without getting insights and dirty hands into Vertex Buffers, no matter if Base Mesh or Nanite Tesselated.
Besides that, it doesn't really matter which engine you use; we're talking about fundamental things.
The engines try to give us solutions, but since SoftBody isn't a simple solution, it's currently badly available out of the box.
Okay, Unreal has ChaosFlesh and Unity has... I don't know.
In any case, both solutions are a waste of time at the moment (RuntimePerformance wise).
## If you are very crazy and don't shy away from a coding challenge, then I might have a devilish temptation that could help you.
You'll need a very RockSolid and performant centralized Vertex DataBase+Manager C++ Interface Solution to build on.
Such solid Base would help You a hell for implementing Your own VertexFactory, Solvers, MeshManager, Shaders, Nanite Materials and so on without caring much about buffers. *insert meme that blows Your mind here*
In the past, we've repeatedly been confronted with RHD, buffers and their pain etc.
That really annoyed me too!
We usually tend to create vertex-buffers when we need them through our way of coding, implementing them for each feature when we need it, etc. Yeah, I know, a bit shortsighted no? Because we need this for more than one implementation, and we know it!
Well, what about creating a centralized, capsulated and rock-solid RDG, Buffer and Vertex Hub for your needs?
That's my Nerdy Suggestion.
Not easy to do (I know), but can/will be done shorter than all the time all Devs spend on the battle with Acc-Exceptions and Nights of Debugger Sessions in Sum.
Here (as follows) is a short Guide/Plan/Path for the interested (worth a try I think):
You can't battle the current Cmp/PhX science regarding "Computural-SoftBody" implementation without getting insights and dirty hands into Vertex Buffers, no matter if Base Mesh or Nanite Tesselated.
Besides that, it doesn't really matter which engine you use; we're talking about fundamental things.
The engines try to give us solutions, but since SoftBody isn't a simple solution, it's currently badly available out of the box.
Okay, Unreal has ChaosFlesh and Unity has... I don't know.
In any case, both solutions are a waste of time at the moment (RuntimePerformance wise).
## If you are very crazy and don't shy away from a coding challenge, then I might have a devilish temptation that could help you.
You'll need a very RockSolid and performant centralized Vertex DataBase+Manager C++ Interface Solution to build on.
Such solid Base would help You a hell for implementing Your own VertexFactory, Solvers, MeshManager, Shaders, Nanite Materials and so on without caring much about buffers. *insert meme that blows Your mind here*
In the past, we've repeatedly been confronted with RHD, buffers and their pain etc.
That really annoyed me too!
We usually tend to create vertex-buffers when we need them through our way of coding, implementing them for each feature when we need it, etc. Yeah, I know, a bit shortsighted no? Because we need this for more than one implementation, and we know it!
Well, what about creating a centralized, capsulated and rock-solid RDG, Buffer and Vertex Hub for your needs?
That's my Nerdy Suggestion.
Not easy to do (I know), but can/will be done shorter than all the time all Devs spend on the battle with Acc-Exceptions and Nights of Debugger Sessions in Sum.
Here (as follows) is a short Guide/Plan/Path for the interested (worth a try I think):
Code:
# A Theoretical Hub (Managing RGD/Buffers in one place)
- [ ] 2.0 Establish Hub as the backbone
- [ ] 2.1. Implement initial RDG buffer creation and upload.
- [ ] 2.2. Add double-buffered positions for async compute.
- [ ] 2.3. Optimize hub for simulation and rendering sync
- [ ] 2.3.1. Use RDG `FRHICommandList` with fences for zero-sync dispatch.
- [ ] 2.3.2. Minimize UAV/SRV transition overhead in `TransitionBuffers`.
- [ ] 2.3.3. Test 10 iterations at 60 FPS on `SKM_Quinn.fbx` (43k verts).
- [ ] 2.4. Enable multi-actor scaling
- [ ] 2.4.1. Implement `RegisterActorInstance` for shared buffer offsets.
- [ ] 2.4.2. Use Geometry Collection to precompute clusters, share buffers.
- [ ] 2.4.3. Test 5 actors (225k verts total) at 60 FPS.
- [ ] 2.5. Add Niagara buffer output support
- [ ] 2.5.1. Export positions to `FNiagaraDataBuffer` for VFX.
- [ ] 2.5.2. Use Niagara fence-based async readback.
- [ ] 2.6. Integrate with rendering pipelines
- [ ] 2.6.1. Support `CustomRDG` mode with `VertexFactory` WPO.
- [ ] 2.6.2. Implement `NaniteDisplacement` mode with texture conversion.
- [ ] 2.6.3. Prepare `NaniteSkeletal` mode for 5.6+ buffer handoff.
-----
[END OF TRANSMISSION]
Last edited: