Latest Threads |
Settings Obi Skinned Clot...
Forum: Obi Cloth
Last Post: cgwill
Yesterday, 09:02 PM
» Replies: 0
» Views: 18
|
Pinholes: new component f...
Forum: Announcements
Last Post: goosejordan
21-03-2025, 08:47 PM
» Replies: 5
» Views: 347
|
Growing a rope attached t...
Forum: Obi Rope
Last Post: josemendez
18-03-2025, 07:39 AM
» Replies: 1
» Views: 122
|
2 Rendering bugs on iOS(M...
Forum: Obi Fluid
Last Post: cliv3dev
17-03-2025, 02:30 PM
» Replies: 2
» Views: 165
|
Twisted Bones
Forum: Obi Rope
Last Post: Jawsarn
15-03-2025, 10:35 PM
» Replies: 0
» Views: 81
|
[Fixed] ProceduralInstanc...
Forum: General
Last Post: marzand
14-03-2025, 06:07 PM
» Replies: 0
» Views: 96
|
How to fix both ends when...
Forum: Obi Rope
Last Post: josemendez
14-03-2025, 11:21 AM
» Replies: 3
» Views: 188
|
Obi Physics Suite (all 4 ...
Forum: Announcements
Last Post: josemendez
13-03-2025, 09:35 AM
» Replies: 0
» Views: 93
|
Scaled SkinnedCloth not m...
Forum: Obi Cloth
Last Post: josemendez
13-03-2025, 08:13 AM
» Replies: 3
» Views: 268
|
Runtime generated SDF
Forum: General
Last Post: goosejordan
11-03-2025, 02:30 PM
» Replies: 2
» Views: 258
|
|
|
Growing a rope attached to an object |
Posted by: sinoth - 18-03-2025, 12:20 AM - Forum: Obi Rope
- Replies (1)
|
 |
I have a rope attached statically via ObiParticleAttachment to an immobile object at the beginning, and a movable object (my hand in VR) at the end.
The initial scripted attach works great and the rope behaves as expected. However I can't figure out how to properly grow or shrink via the cursor.
The cursor is set to Cursor Mu 1, Source Mu 1, Direction checked. The rope does grow and shrink. However it seems that the ObiParticleAttachment becomes invalidated because of this. I attempted to repair the attachment every time the cursor is changed but this also fails -- the rope hangs limp as though unattached.
Code: public class RopeController : MonoBehaviour
{
public float speed = 0.1f;
public GameObject handObject;
private bool _addedAttachment;
private ObiParticleAttachment _attachment;
private ObiRopeCursor _cursor;
private ObiParticleGroup _group;
private ObiRope _rope;
private InputAction _ropeDecrease;
private InputAction _ropeIncrease;
private void Start()
{
_ropeIncrease = InputSystem.actions.FindActionMap("Player").FindAction("Rope Increase");
_ropeDecrease = InputSystem.actions.FindActionMap("Player").FindAction("Rope Decrease");
_cursor = GetComponent<ObiRopeCursor>();
_rope = _cursor.GetComponent<ObiRope>();
}
private void Update()
{
if (!_addedAttachment && _rope.solver.positions.count > 0)
{
var lastParticleInitId = _rope.elements[^1].particle2;
_group = ScriptableObject.CreateInstance<ObiParticleGroup>();
_group.particleIndices.Add(lastParticleInitId);
_rope.solver.positions[lastParticleInitId] =
_rope.solver.transform.InverseTransformPoint(handObject.transform.position);
_attachment = gameObject.AddComponent<ObiParticleAttachment>();
_attachment.attachmentType = ObiParticleAttachment.AttachmentType.Static;
_attachment.particleGroup = _group;
_attachment.target = handObject.transform;
_addedAttachment = true;
}
if (!_addedAttachment || (!_ropeIncrease.IsPressed() && !_ropeDecrease.IsPressed()))
return;
if (_ropeIncrease.IsPressed())
_cursor.ChangeLength(speed * Time.deltaTime);
if (_ropeDecrease.IsPressed())
_cursor.ChangeLength(-speed * Time.deltaTime);
_rope.RebuildConstraintsFromElements();
var lastParticleId = _rope.elements[^1].particle2;
_group.particleIndices.Clear();
_group.particleIndices.Add(lastParticleId);
_rope.solver.positions[lastParticleId] =
_rope.solver.transform.InverseTransformPoint(handObject.transform.position);
_attachment.particleGroup = _group;
_attachment.target = handObject.transform;
}
}
The solver doesn't seem to be initialized in Start which is why I moved the initial attach logic to Update.
If there is a better way to do this please let me know. I just want to grow/shrink the rope from the end but still have it stuck to my hand.
I think I may have figured it out... I changed the attach at the bottom to this:
Code: var lastParticleId = _rope.elements[^1].particle2;
_group.particleIndices.Clear();
_group.particleIndices.Add(lastParticleId);
_rope.solver.positions[lastParticleId] =
_rope.solver.transform.InverseTransformPoint(handObject.transform.position);
_attachment.enabled = false;
_attachment.target = null;
_attachment.target = handObject.transform;
_attachment.enabled = true;
The main changes were to disable, target null, then set target, and re-enable. Is that the intended way to do this?
Also I'm unsure how RebuildConstraintsFromElements() fits into the picture... should this be called every time after cursor.ChangeLength is called?
|
|
|
[Fixed] ProceduralInstanced.shadergraph build error on Unity 6 |
Posted by: marzand - 14-03-2025, 06:07 PM - Forum: General
- No Replies
|
 |
I encountered an error on building my project in Unity 6000.0.0.41f.
in ObiMaterials/Common/Instanced/Compute/ProceduralInstanced.shadergraph:
Code: 'SampleShadow_ComputeSamples_Tent_5x5': cannot convert output parameter from 'min16float[9]' to 'float[9]'
Compiling Subshader: 0, Pass: ShadowCaster, Vertex program with PROCEDURAL_INSTANCING_ON SHADOWS_DEPTH
Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PASS_SHADOWCASTER UNITY_PBS_USE_BRDF1 UNITY_PLATFORM_SUPPORTS_DEPTH_FETCH UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: INSTANCING_ON SHADER_API_GLES30 SHADOWS_CUBE UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_VIRTUAL_TEXTURING _CASTING_PUNCTUAL_LIGHT_SHADOW
The fix was easy enough to find. Turns out in the graph, the position input node has its precision set to single, while the other nodes are set to inherit. Setting it to inherit fixes the mismatched precision issue.
|
|
|
How to fix both ends when using bones for a ObiRope? |
Posted by: kodra - 14-03-2025, 10:57 AM - Forum: Obi Rope
- Replies (3)
|
 |
As this example in document shows, ObiRope can be fixed on both ends, leaving only the middle part free.
But I can't figure out how to integrate with a character with bone hierarchy. For example, in this example the dragon's tail is made of 12 bones. In this case, how to make only the first (root) and last (tip) bones follow a predefined animation, while let the middle part solved by Obi?
I guess I need to use an attachment, but I'm not sure how to set it up with bones...
|
|
|
Obi Physics Suite (all 4 assets in one) |
Posted by: josemendez - 13-03-2025, 09:35 AM - Forum: Announcements
- No Replies
|
 |
Hi!
One question I get asked often is whether there's any way to get all Obi assets as a single, discounted package. So I decided to bundle them all up in a single asset:
Obi Physics Suite.
It contains all 4 assets (Obi Rope, Obi Cloth, Obi Softbody and Obi Fluid) preinstalled together for 179$ instead of the 199$ it costs to buy them separately. It also contains 3 new sample scenes that make combined use of all assets.
I believe a 10% discount is significant enough for it to be an interesting option if you were planning to buy all assets anyway, but not large enough that it heavily penalizes those of you that have already purchased them separately. It's also useful to be able to import all 4 assets at once if you often find yourself using them together, the full bundle is 30 Mb while they separately range between 6 and 17 Mb so it doesn't add much bloat.
If you recently purchased 2, 3 or all Obi assets separately and would like to get the bundle instead, drop me an email to support(at)virtualmethodstudio.com. I may be able to refund your purchases so you can benefit from the 10%.
Let me know if you have any feedback and/or suggestions.
|
|
|
Scaled SkinnedCloth not matching |
Posted by: Jawsarn - 11-03-2025, 10:38 PM - Forum: Obi Cloth
- Replies (3)
|
 |
We have a setup of a animated character with a scarf. The scarf gameObject has a scale to it of 100.
If I leave the scale to default on the Skinned Cloth Blueprint the mesh gets sized down when running.
If I scale it up with same factor, it seems to be offsetted forward a slight bit and partly scaled up.
I can "solve" it by scaling up the model in the import setting by the same factor, but this solution will break once we want physics on another object to with a different scale.
Is this a known issue and is there any solution at hand?
|
|
|
Runtime generated SDF |
Posted by: goosejordan - 10-03-2025, 09:56 PM - Forum: General
- Replies (2)
|
 |
What would be the best approach for acheiving a HD sdf collision map close to the player? I would love to reach a resolution of 1-5 centimeters (in a VR setting).
I'm working on a smooth voxel system with detailing through tesselation and displacement. Next up for me is generating this HD collsion map but I'm stumped at finding a solution here.
So far the implemented process is:
- Have a low resolution SDF field
- Generate mesh from SDF
- Unwrap mesh UV's and apply virtual texturing
- Use tesselation+displacement when rendering. It now looks HD and photorealistic!
I will have to figure out a way to make a custom SDF collider that Obi can use.
It needs to be runtime and on demand as chunks are loaded and LOD changed. I know of the method from the Unity demo team. I could likely do this or something similar, but with some virtual volume method so that i only resolve high definition close to geometry.
At some point I need to stop the flood-fill propagation of distances if nothing else at the seams between high resolution and low resolution. How mathematically accurate does the SDF need to be for Obi to work properly? Is accuracy most important close to zero or does it have to be seamless?
|
|
|
|