CHANGELOG
Changelog
A heavy crash costs far less on the game thread. On the machine we measured, no frame of a heavy crash now spends more than about 1.3 ms on Crushform’s game-thread work, down from several milliseconds in the crash frame.
Damaged cars cost far less to draw, and a project can now limit how many of them draw their damage. On a Mali-G76 GPU under OpenGL ES 3.1, at its top clock, the slot of a damaged body went from about 80 ms a frame to about 4 ms. We did not measure the gain on a desktop GPU.
New:
- Collision work off the game thread. A torn part’s cut, a dented body’s rebuild and a torn part’s hull run on a worker.
UCFSettings::CollisionDeferFrames(1), orCrushform.Collision.DeferFrames, takes 0 or 1. At 1 the body’s rebuild and cut are on the body before the next frame’s physics. 0 builds everything in the frame of the hit, as in 1.0.0. - A project switch for collision that follows dents.
UCFSettings::bDeformCollision(on), orCrushform.Collision.Deform. Off wins over every profile, so a device profile can turn it off for weak devices. - Glass shards are a Niagara system. The default is
UCFSettings::DefaultGlassShardSystem, andUCFGlassDefinition::ShardSystemsets another one for a definition. They no longer use the debris pool or its limit.Crushform.Glass.ShardScalesets the share of shards thrown, andCrushform.Glass.MaxLiveShards(512) caps those alive at once. - Panes that break together start a frame apart.
Crushform.Glass.ShardSystemsPerFrame(1) sets how many shard systems start in one frame. 0 is no limit. - Impact sounds start a few at a time.
UCFImpactFeedbackSettings::MaxSoundsPerFrame(2) sets how many start in one frame. The rest wait up toUCFImpactFeedbackSettings::SoundQueueSeconds(0.15 s), strongest first, and are then dropped. - Named trace scopes along the whole hit path. Performance lists them.
- Draw limits for dents and for dirt, set apart. Dents and scratches:
UCFSettings::DentCullDistanceandUCFSettings::MaxDentedBodies, orCrushform.Dents.CullDistanceandCrushform.Dents.MaxBodies. Dirt on the body and the wheels:UCFSettings::DirtCullDistanceandUCFSettings::MaxDirtyBodies, orCrushform.Dirt.CullDistanceandCrushform.Dirt.MaxBodies. The nearest bodies draw first, those on screen before those off it. All four default to 0, no limit, and a device profile can set them per device. - Generated LODs on the Sedan. Its static meshes have three more LODs, down to about a tenth of the triangles, and the whole car changes LOD at one distance. Nanite draws the meshes that use it as before; a platform without Nanite draws these LODs, and so does the glass everywhere.
- A simple LOD on the aspen.
SM_CF_Tree, 804 triangles, is LOD1 of the tree inBP_CF_Tree. Android and iOS draw it through the mesh’s minimum LOD; other platforms keep the full aspen. - Android and iOS. Every runtime module now allows both as targets, alongside Win64, Linux and Mac. Android was run on a Mali-G76 under OpenGL ES 3.1; iOS has not been built or run yet. On a phone, use the draw limits above and turn off
UCFSettings::bDeformCollision.
Changed:
- Deformation reads less. A vertex is evaluated once in a shader invocation, with about 11 atlas reads instead of 32. A body with no dent and no scratch reads nothing in the vertex stage.
- Dirt reads less. A pixel takes 2 filtered reads instead of 8.
RT_CF_DirtAtlasandRT_CF_DirtFreshAtlasnow read bilinear; a project with its own dirt atlases sets their filter to bilinear too. CF_DirtBlend,CF_DirtAmountandCF_DirtFreshtake the atlas’s sampler. A project’s own Custom node that calls them passes it as the next argument after the atlas.- Scratch lines are the same lines at every distance. The shader now works them out instead of thresholding a texture, so they no longer flicker or break up and none appear only up close. A far line grows fainter, and further away the lines blend into an even lightening.
UCFProfile::MaxScratchnow defaults to 0.033 instead of 0.1, about a third of the lines on a wreck.
Changed behaviour, at the default settings:
- A hinged part starts to swing or comes off the frame after the crash, not in it.
- A part that comes off waits for the body’s collision to be cut around its place: a frame, or two when another collision build was running. Until then it stays in place or keeps swinging on its hinge.
Set Crushform.Collision.DeferFrames to 0 to get the old timing of both back.
Past a dirt limit a body draws clean and its dirt stands still on that machine: it neither gathers nor fades until the body is shown again. A wash, a fill or added dirt still applies. Past a dent limit a body draws whole; its lattice, collision, replication and damage events go on. With the limits at 0, the default, none of this happens.
First public release.