I am new to Unity, but very familiar with coding and 3D modeling software. A project that I am working on is implementing multivariate data into 3D objects for use in a VR setting. The Unity primitive shapes are not ideal for this project, so I will need to use mesh that has parameters tied to C# variables. What is the best way to go about this? For instance, I may want to create a hollow cylinder whose wall thickness can be adjusted. I have seen that you can code mesh entirely in a script, but also import it from software like Blender. If you just point me in the right direction, I would be grateful.
easier if you can build those meshes in Blender, Houdini or other external tools.
where parametric modeling tools are ready to use, but this wont work at runtime. (unless you have runtime .fbx importer)
in unity you can create procedural meshes too,
but might have to code those features yourself (unless can find suitable plugins)…
some basic mesh generation example
there’s also tools like
Do you need to adjust those meshes at runtime or generate once in Editor?
You could try using Blend Shapes in Unity (In Blender they’re called “shape keys”). In your example with the cylinder thickness, you’d essentially model a cylinder with minimum thickness, set that as one shape key, then modify your model so it’s maximum thickness and set that as a shape key. Then, in Unity you can set a value 0 to 1 to lerp between the two:
https://docs.blender.org/manual/en/latest/animation/shape_keys/introduction.html
I’ve not yet actually learned how to use these yet so I can’t really provide more details. You might have to experiment to establish a good Blender->Unity workflow.