Obi Official Forum
Cloth soft body Balls invisible - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Cloth (https://obi.virtualmethodstudio.com/forum/forum-2.html)
+--- Thread: Cloth soft body Balls invisible (/thread-2444.html)



Cloth soft body Balls invisible - rexcheung - 25-08-2020

I just bought the asset and it looks great.
However, the scene "Cloth soft body" seems that it has some problems. 

The ball are invisible and but the parent solver shape changes when scene starts.
I am using unity 2019.4.8f1 LTS. I trial the package at 2020.1.3f1 as well
Please advise how to fix it. 



RE: Cloth soft body Balls invisible - josemendez - 25-08-2020

(25-08-2020, 05:22 AM)rexcheung Wrote: I just bought the asset and it looks great.
However, the scene "Cloth soft body" seems that it has some problems. 

The ball are invisible and but the parent solver shape changes when scene starts.
I am using unity 2019.4.8f1 LTS. I trial the package at 2020.1.3f1 as well
Please advise how to fix it. 
Hi there,

We're unable to reproduce this. The shape-changing bounding box indicates that the simulation is running correctly, but the assets required for rendering are probably missing from the scene/project. Verify that the required assets for this scene are present. Specifically:

- select one of the balls.
- check that the ObiCloth component has a valid reference to a blueprint named "Balloon".
- check that the blueprint has a valid reference to a input mesh.


RE: Cloth soft body Balls invisible - rexcheung - 26-08-2020

Hi,

Please find below video for my process on import your asset from a new project.
I just created a new project and direct import from asset store.
https://drive.google.com/file/d/199YUsrpdhSUPyH1wfQH8l9-TXt6HcKd9/view?usp=sharing 

I guess there are problems on mesh as attached.
Please reply asap on how to tackle it.


RE: Cloth soft body Balls invisible - josemendez - 26-08-2020

(26-08-2020, 11:35 AM)rexcheung Wrote: Hi,

Please find below video for my process on import your asset from a new project.
I just created a new project and direct import from asset store.
https://drive.google.com/file/d/199YUsrpdhSUPyH1wfQH8l9-TXt6HcKd9/view?usp=sharing 

I guess there are problems on mesh as attached.
Please reply asap on how to tackle it.

Hi there,

If you write to support(at)virtualmethodstudio.com, I can send you the whole package. This will likely be faster than trying to diagnose the issue.

kind regards,


RE: Cloth soft body Balls invisible - rexcheung - 26-08-2020

(26-08-2020, 12:30 PM)josemendez Wrote: Hi there,

If you write to support(at)virtualmethodstudio.com, I can send you the whole package. This will likely be faster than trying to diagnose the issue.

kind regards,
Hi Josemendez,

Email request has been sent to 'support@virtualmethodstudio.com'

Rex


RE: Cloth soft body Balls invisible - josemendez - 26-08-2020

(26-08-2020, 02:39 PM)rexcheung Wrote: Hi Josemendez,

Email request has been sent to 'support@virtualmethodstudio.com'

Rex

Hi,

I replied with the source package attached. Make sure to import it correctly, and let me know if there are any issues.

cheers,


RE: Cloth soft body Balls invisible - rexcheung - 27-08-2020

Hi Josemendez,

Thanks for your prompt reply. The balls are visible now by importing your new package.
I am interested in your asset as i read this post.
http://obi.virtualmethodstudio.com/tutorials/volumeconstraints.html 

I am now going to get the pressure and volume of the ball being hit.
After a brief study, i found that we could only apply constraints to bias the ball outlook when t is being hit.
Is it possible to get the realtime data on the pressure & volume of the ball as well.

Much thanks for your support.
Rex


RE: Cloth soft body Balls invisible - josemendez - 27-08-2020

(27-08-2020, 05:54 AM)rexcheung Wrote: Hi Josemendez,

Thanks for your prompt reply. The balls are visible now by importing your new package.
I am interested in your asset as i read this post.
http://obi.virtualmethodstudio.com/tutorials/volumeconstraints.html 

I am now going to get the pressure and volume of the ball being hit.
After a brief study, i found that we could only apply constraints to bias the ball outlook when t is being hit.
Is it possible to get the realtime data on the pressure & volume of the ball as well.

Much thanks for your support.
Rex

Hi there,

The volume is calculated in parallel for multiple constraints for efficiency reasons, this is done on the fly every simulation step and not stored anywhere, so it's not accessible trough any public API. You can however calculate it yourself if in need. This is the pseudocode to calculate the volume of a closed shape defined by an array of vertex positions and an array of triangle indices:

Code:
float volume = 0;
//iterate over all triangles in the shape
for (int j = 0; j < numTriangles; ++j)
{  
      int v1 = triangles[j*3];
      int v2 = triangles[j*3 + 1];
      int v3 = triangles[j*3 + 2];

      //calculate this triangle's volume contribution:
      volume += math.dot(math.cross(positions[v1].xyz, positions[v2].xyz), positions[v3].xyz) / 6.0f;
}

The pressure value used internally is just the difference between the rest volume and the current volume of the shape.


RE: Cloth soft body Balls invisible - rexcheung - 27-08-2020

Ok Thanks.
I will try to implement it.

Rex