Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'2D' Meshes for Softbodies
#3
(15-09-2022, 07:37 PM)josemendez Wrote: Hi!

Make sure the mesh is properly exported. More specifically, make sure it has sane scale values in Unity. If it's scaled x100 or some other large value, you will be able to see it in the scene view, but not when editing the mesh alone since it will be extremely small in absence of its transform (that scales it up x100). Also make sure to set "max anisotropy" to its minimum value in the blueprint, since in 2D particles cannot have anisotropy values > 1.


This does not have anything to do with Obi, it's probably backface culling. This is a very basic concept in 3D graphics: triangles/faces have an associated normal vector, that determines which side is facing "outwards". Once a triangle is facing away from the camera, it's not rendered anymore to save resources.

Unity performs backface culling by default. In 3D modeling software like Blender it's optional (disabled by default), because it is sometimes useful to see the inside of objects while modeling.

If you want two-facing geometry in Unity, you can:
- Use a shader with no culling: https://docs.unity3d.com/2020.1/Document...Depth.html
- Use two materials, one for front-facing geometry and another for backfaces.
- Bruteforce it and duplicate all triangles, flipping their normals (not recommended, duplicates memory usage and hampers performance).

Keep in mind that Obi is a moderately complex engine, aimed at intermediate/advanced users. I'd suggest to familiarize yourself with these basic 3D concepts first, otherwise chances are you'll have a hard time using Obi.

let me know if you need further help,

kind regards

hello!


i've read about backface culling before, just wasn't exactly sure if that was controlled by Unity or within the obi simulation. thanks for the clarification!

I got the flat '2D' mesh working after messing around with the solver and a model for a few hours. The anisotropy setting seems to have helped in preventing the softbody from collapsing on itself. When I am performing a ObiSoftbody.Teleport(), it seems to work as intended but the function complains about an ArgumentOutOfRange exception, with some index inside the BatchCount bounds to blame. Not really sure why this is happening since the moving seems to work fine.

I am supplying a Vector3.zero and softbody.transform.rotation to the function.

thanks :)
Reply


Messages In This Thread
'2D' Meshes for Softbodies - by woffles - 13-09-2022, 12:01 AM
RE: '2D' Meshes for Softbodies - by josemendez - 15-09-2022, 07:37 PM
RE: '2D' Meshes for Softbodies - by woffles - 16-09-2022, 02:49 AM
RE: '2D' Meshes for Softbodies - by josemendez - 17-09-2022, 10:06 AM
RE: '2D' Meshes for Softbodies - by woffles - 18-09-2022, 03:44 AM
RE: '2D' Meshes for Softbodies - by josemendez - 18-09-2022, 08:54 AM
RE: '2D' Meshes for Softbodies - by woffles - 18-09-2022, 10:15 AM
RE: '2D' Meshes for Softbodies - by josemendez - 18-09-2022, 11:19 AM
RE: '2D' Meshes for Softbodies - by woffles - 18-09-2022, 11:46 AM
RE: '2D' Meshes for Softbodies - by josemendez - 18-09-2022, 01:03 PM