- Home /
Smooth out cylinder?
Is there a way to smooth out a cylinder? I'm just looking at the mesh filter, and it has 88 vertices, is there a way to change the geometry so it has more faces and appears smoother? Thanks
Answer by doukasd · Dec 11, 2012 at 05:33 AM
Or you can use a procedural cylinder.
I have created a module for Unity3D in C# that does exactly this and allows you to tweak the parameters. You should be able to easily convert to C or C++ as the geometry calculation is the same everywhere. Watch the video to see what it's about and download the code from GitHub. Feel free to contribute!
[1]: http://en.wikipedia.org/wiki/Triangle_strip
Upvote for excellent work and resource, many thanks =]
Do you realise that nobody can use this source because you have an "all rights reserved" copyright in the header of your source files?
@mrpmorris no I had not realised, please use that code in any way you want :)
Thanks. I found that in Unity5 the generated meshes wouldn't work for colliders. Try creating a new game object (not via your menu option) and then adding a procedural cylinder script to it. Even with the changes in the pull request I submitted on github (which update the mesh) the object will still fall through a plane when it has a Rigidbody attached.
That's just because mesh colliders don't collide with other mesh colliders, never have. If you want to use a mesh collider for a moving object, it must be marked as a convex collider.
@doukasd: it's not that simple; if you want it to be public domain, you need to remove the copyright notice stating all rights reserved and replace it with a waiver that explicitly puts the code in the public domain.
Answer by ScroodgeM · Aug 04, 2012 at 07:41 PM
no, you can't change primirives in Unity, so you should:
make a cylinder in some 3d modelling software nd import it
or generate cylinder programmaticaly (mesh generating)
Answer by aenas1 · Oct 01, 2016 at 04:24 PM
You can actually make a material from a circular img and select a shader which will make the rough edges transparent.
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
Beginner Help with Unity 1 Answer
Enabling and Disabling Nav Mesh Agent? 0 Answers
Can unity handle this city (it's multiple meshes)? 1 Answer
Problems importing curves from blender into Unity 3d 2 Answers