BBMOD Rendering
Register the cloth once; BBMOD handles render passes and materials.
Register the cloth once; BBMOD handles render passes and materials.
cloth.set_renderer(o_control_bbmod_renderer.renderer);
cloth.set_visible(true);The mesh uses world-space particles and an identity world matrix. Normals, tangents and bounds follow deformation. Updates are cached by physics revision so multiple BBMOD passes reuse the upload. For manual native stepping use update_mesh(true) when needed.
cloth_material = source_material.clone();
cloth_material.Culling = cull_noculling;
cloth_material.TwoSided = true;
cloth.set_material(cloth_material);
// Clean Up: cloth.destroy(); cloth_material.destroy();Materials supplied through set_material() are borrowed. Clone a shared material before changing culling or TwoSided. Destroy your own material after destroying the cloth. The default material is managed by the cloth. set_material(undefined) restores the default.
No standalone cloth shader or draw(texture) path remains. Put texture and transparency settings on the BBMOD material. Optional draw() delegates to BBMOD rendering; prefer registration to avoid duplicate submissions.
New related workflows#
Verified operation contracts#
These contracts distinguish units, return values, errors and lifetime according to the current implementation. Check results: false, 0 and undefined can mean different things for different methods.
| Symbol / owner | Signature | Operation contract |
|---|---|---|
| JoltBBMODCloth.draw | JoltBBMODCloth.draw() | Renders current deformed geometry if live and visible; no return value. draw aliases render. Do not additionally call these manually when registered with a renderer. |
| JoltBBMODCloth.set_material | JoltBBMODCloth.set_material(material) | BBMOD_BaseMaterial or undefined for an automatic owned two-sided material. Boolean; user material is borrowed and not destroyed, a previous owned material is released. |
| JoltBBMODCloth.set_renderer | JoltBBMODCloth.set_renderer(renderer) | Live BBMOD_BaseRenderer or undefined to detach. Boolean; registers/unregisters this same object, do not additionally register it by hand. Requires a live soft body. |