Repository navigation
Releases: ismailivanov/TressFX-Godot
Release list
TressFX for Godot 0.3.1
Fixes for an editor crash, errors every frame on some GPUs, and Linux libraries that didn't load on most distros. Thanks to JekSun97 and LiveTrower for the reports.
Fixes
- The editor crashed when you clicked
positionsin the material's shader parameters (#2). The node wrote its simulation texture into your material, and Godot 4.7's texture inspector crashes on that kind of texture. The node now draws with an internal copy of the material, so the texture no longer shows up there. Scenes saved with older versions are safe to open: the node clears the old texture from the material when it loads, and it's gone from the file once the material is saved again. Dispatch amount of X compute groups (...) is larger than device limit (65535)every frame (#2). Collider grids withnum_cells_xof 63 or more, like the ones in the RatBoy and Blender hair demos, needed more compute groups in one go than some GPUs allow, and on those GPUs the collider didn't work at all. The work is split into smaller dispatches now. Hair with more than about 4 million vertices had the same problem and is fixed too.- Linux:
version 'GLIBC_2.43' not found(#3). The Linux libraries were built on a rolling release distro. They're built in CI on glibc 2.28 now, the same as Godot 4.7 itself, so they load on any x86_64 distro that runs Godot 4.7. - Moving a hair node to another parent no longer makes the hair disappear.
Other changes
- Several hair nodes can share one material now.
- The node no longer writes its own parameters (
positions,strand_uvs,verts_per_strand,lod_start,lod_end,lod_width_multiplier) into your material. They still show in its inspector, but values set there are ignored. - Scripts can't get the positions texture from the material anymore.
capture_positions()andget_captured_positions()still read the positions back (slow, meant for debugging).
Downloads
tressfx-0.3.1.zip(4 MB): the addon only.tressfx-0.3.1-with-demos.zip(156 MB): the addon plus the three demo scenes and their assets.
Unzip into your project so that the folder lands at addons/tressfx, then restart the editor once. Binaries: Linux x86_64, Windows x86_64, macOS universal.
TressFX for Godot 0.3.0
Hair from Blender, and colliders you can see in the editor. Thanks to tomcat on the Godot Forum for asking for a Blender workflow.
What's new
- Blender to Godot Hair add-on. Groom with Blender's own hair tools, press Export to Godot, and the strands (
.tfx), the bones they follow (.tfxbone), the collision meshes (.tfxmesh) and the character (.glb) land in your project. It ships inaddons/tressfx/tools/and as its own release: Blender to Godot Hair. The new Hair from Blender guide goes from an empty hair object to a skinned hairstyle in Godot. - Colliders in the editor. Every
TressFXCollisionMeshis drawn in the pose the distance field uses, so you can see where it sits inside the body. Select a hair to see all of its colliders on top of the character. The new Hair Colliders button in the 3D toolbar hides them. - Live reload. Export again from Blender and the hair and the colliders in the open scene update within a second.
- New demo: Blender hair. A scanned head with a spiked mohawk that stands up and sways a little, made in Blender and exported with the add-on together with its head and body colliders. The
.blendis next to the scene, ready to change and export again. - Demo switcher. Every demo has a Next demo button (or press N): ponytail, Blender hair, RatBoy.
Fixes
.tfxbonebone names are read as UTF-8, so names with non-ASCII characters are found in the skeleton..tfxmeshbone names may contain spaces.- Meshes that follow a bone without a
Skin(characters made of bone-parented parts) now line up with their skeleton when the skeleton is not at the scene origin.
Downloads
tressfx-0.3.0.zip: the addon only.tressfx-0.3.0-with-demos.zip: the addon plus the three demo scenes and their assets.
The Blender hair demo's head is "Infinite, 3D Head Scan" by Lee Perry-Smith (Infinite-Realities), CC BY 3.0.
TressFX for Godot 0.2.0
The hair now renders with Godot's depth pre-pass alpha instead of alpha-to-coverage. Thanks to the Reddit user who asked why it didn't.
What changes
- MSAA is no longer needed. The solid core of every strand writes depth in a pre-pass and the soft edges are alpha-blended on top, so the hair has smooth edges with or without multisampling. TAA is still recommended for strands thinner than a pixel.
- Denser, more natural hair. Overlapping strands now build up coverage the way real hair does. With alpha-to-coverage, overlapping strands shared the same sample mask and the hair looked thinner and greyer than it is.
- Hair shadows work. With
cast_hair_shadowson, the hair now shades the skin under it. Before, it was rendered into the shadow maps but no shadow showed on the face. - Cheaper to draw. In the same still RatBoy view with MSAA 4x, the viewport draw went from 2.75 ms to 2.08 ms on an RTX 4060 Ti. Turning MSAA and TAA off saves another 0.75 ms per frame on the animated demo.
- The demos take a new
--no-aaflag that turns MSAA and TAA off. - README, wiki and the in-editor class reference are updated; the Limitations section no longer lists the MSAA requirement.
The one trade-off: the soft edges are blended without sorting (TressFX's ShortCut/PPLL order-independent transparency is still not ported), so where many semi-transparent edges cross, their layering can be slightly off.
Upgrading
Nothing to do if your hair materials use the shipped tressfx_strand.gdshader. If you made a copy of it, change its render_mode line to:
render_mode world_vertex_coords, cull_disabled, depth_prepass_alpha;
To keep the old look, keep your copy with alpha_to_coverage, depth_draw_always and MSAA 4x.
Downloads
tressfx-0.2.0.zip(3 MB): the addon only.tressfx-0.2.0-with-demos.zip(152 MB): the addon plus the two demo scenes and their assets.
Unzip into your project so that the folder lands at addons/tressfx, then restart the editor once. Binaries: Linux x86_64, Windows x86_64, macOS universal.
TressFX for Godot 0.1.0
First release of TressFX for Godot: a native GDExtension port of AMD TressFX 4.1 for Godot 4.7.
What's inside
TressFXHair,TressFXCollisionMeshandTressFXStatsnodes, documented in the editor (F1).- The whole TressFX simulation on the GPU: velocity shock propagation, global and local shape constraints, length constraints, gravity, gusting wind, follow hairs.
- Skinning to a
Skeleton3Dthrough.tfxbonefiles, or rigid attachment without one. - Signed-distance-field collision against
.tfxmeshfiles or any Godot mesh, rebuilt only when the collider moves. - Ribbon rendering with thin tips, body-albedo roots, Kajiya-Kay diffuse and two Marschner highlights, distance LOD, optional shadows.
- Simulation culling: hidden, off-screen or distant hair stops simulating.
- Live simulation in the editor that sleeps when nothing changes.
- Two demo scenes (ponytail, RatBoy) and a Maya ASCII curve converter.
- A user guide on the wiki and a description of how AI was used to make the addon (README, How AI was used).
Downloads
tressfx-0.1.0.zip(3 MB): the addon only.tressfx-0.1.0-with-demos.zip(152 MB): the addon plus the two demo scenes and their assets.
Unzip into your project so that the folder lands at addons/tressfx, then restart the editor once so the compute shaders get imported. There is no plugin to enable.
Binaries included: Linux x86_64, Windows x86_64, macOS universal (x86_64 and arm64), debug and release. Other platforms build from source (see the README).
Requirements
Godot 4.7 or later with the Forward+ or Mobile renderer, MSAA 4x and TAA enabled. The Compatibility renderer is not supported.
Known limitations
Alpha-to-coverage instead of order-independent transparency, no hair self-shadowing, per-frame (not fixed-step) simulation, large triangle counts by nature. The full list is in the README's Limitations section; the user guide is on the wiki.