- Home /
Minecraft kind visibility render
Hello, i was looking for some kind of optimizing while rendering cubes in my voxel prototype. What i found was that it really slows when I use lots of cubes. I want to do it rendering only visible cubes and only visible faces but I'm lost.
I tried doing this with renderer.IsInvisible and OnBecameInvisible but they dont help because they dont render when they are invisible.
Also i couldnt figure how to do the faces thing.
Here is a screenshot about what i'm doing:
Answer by WizzDE · May 02, 2014 at 06:02 PM
You're right. This need to be optimized! Actually you don't want to create a single gameobject for each block. Instead you want to create a chunk objects that hold each like 16*16*16 blocks. These blocks are rendered using a mesh that's being created at runtime. This is actually a quite advanced topic but there are some good (YouTube) tutorials out there on how to do it. But please don't try to create a new cube prefab for each block! You might also want to check out my voxel engine in the Unity assetstore. It is quite a good base to start off with a voxel game: https://www.assetstore.unity3d.com/#/content/17470
Your answer
Follow this Question
Related Questions
Perfomance Issue With Minecraft Clone. 0 Answers
Anyone got a Voxel generator I can use? 0 Answers
How to load stacking chunks on the fly? 1 Answer
Cube style terrain 1 Answer