31-07-2024, 08:08 AM
(This post was last modified: 31-07-2024, 08:12 AM by josemendez.)
(30-07-2024, 11:44 PM)Ben_bionic Wrote: when I use a chain renderer and try to change the length of it with obiCursor.ChangeLength(1);
Hi Ben,
The behavior of ChangeLength has changed in Obi 7, the parameter passed is now a change in length, not an absolute target length. Passing "1" will add one meter to the current length of your rope.
(30-07-2024, 11:44 PM)Ben_bionic Wrote: It works fine in the crane demo scene with the extruded renderer but not with the chain one. I know chains changed a lot so I assume something got missed? I know this worked on the last version of obi since I used it pretty extensively.
I'm unable to reproduce this. Swapping the ObiExtrudedRopeRenderer with a ObiRopeChainRenderer in the sample Crane scene works well for me. The chain can change its length and new links are added/removed as a result, the chain doesn't go away:
Keep in mind that chain rendering now uses GPU instancing, so the material you use to render the chain must support GPU instancing. Otherwise an error will be shown in the console and the chain won't be rendered. See:
http://obi.virtualmethodstudio.com/manua...modes.html
Quote:The material used for rendering the chain must support GPU instancing, and if you're using the Compute backend, it must support indirect drawing. Obi includes an example of a ShaderGraph indirect instancing shader, which you can find at Obi/Resources/ObiMaterials/Common/Instanced/Compute/ProceduralInstanced.shadergraph.
let me know if this is still an issue,
kind regards