Hello Everyone!
I got sort of I problem that I have been trying to find solutions for. Let’s say that a graphical artist creates a level for me (a big terrain-like mesh in Maya) without splitting up this model into segments. Is it possible for me to split the model inside Unity so that the Occlusion Culling system will effectivly work?
What I thought of was to place some sort of planes that “cut” the object apart, so that a script will know about these planes and slice the object. The bad illustrating picture above tries to show this.
All threads I have searched has suggested to split the objects in Maya (http://answers.unity3d.com/questions/158527/Split-a-mesh.html) and that is of course the best way, but we would like something automatic and simple in Unity.
2 Answers
2
Whilst you could write an editor extension that splits the level into pieces in Unity, it’s a lot of work. You’d use the Mesh class to create the new pieces. It’s far far far simpler to pay your artist to split the model into the pieces that you need.
*** I am a programmer, I am going to run into this alot thanks
I find hundreds of questions like this and answers like there is no workaround, or split the mesh, etc. I however do not see many small examples of how to (Best Practices/Best DataTypes) to use to do so. I know GameObjects contain transforms, I know it takes a MeshRenderer and a MeshFilter, and since you have a sizeable mesh now you probably need it to have a transform. However, what I don’t find is a simple discussion of some questions that naturally arise. To make matters worse some conversations head off to discussing vague terms like submeshes which I do believe do not even solve the problem. Just a few more questions then. (Please don’t tell me Post a separate question else the next nerd that comes along will also have to read 5,000 of these useless replies to a super cool common question:
- Can you have more than one MeshFilter/MeshRenderer in and Object/Component/GameObject?
- Are GameObject’s the only or best/preferred place to store a Transform, MeshFilter, MeshRenderer, to display your separated just less than 65K vertices mesh, or are there multiple varied other places/object types/data types, you can pair these together in?
- Say I define a Class in C#, and give it a transform, meshfilter, meshrender, does it have to derive from anything to become a GameObject?
- What are the correct public (I would guess public) name to give meshfilter, meshrender, transform references in a scripted (MeshContainerDohickey) class/definition.
- Why the crap are these ideas mentioned in every freaking posting with the text, “64K Limit”, “64K”, “65K” instead of someone saying, “There is no workaround”, obviously there is a workaround. It’s splitting the mesh somehow, and the common best practices of doing so is what they are going to have to learn how to do. It’s not like it’s that obvious to a newby, you can’t just say well split it. Put it in another Game object. At least discuss a few Data Structure ideas, limits and best practices.
There is a workaround for anything, if your a positive thinker. It’s called not quitting!
i'm working on a mesh splitter for animated meshes, and as part of that i am incidentally able to split static meshes. pay the artist. this stuff is headache-inducing. :) there's also at least one asset that can slice a mesh... oh, at least two. here's one: http://u3d.as/content/marrrk/piecemaker-mesh-destruction/1RP
– LoiusThank you for the creat answer! I will really tell your answer to my artists :) I started to look into the T4M instead but realized that it can't handle terrain lod (or terrain culling). That is, culling a big mesh in an easy way. Not that I am aware of at least. Feel free to give more advice about how to optimize a terrain for phones :)
– OpenCoffee