Unity 3D Cube Vs Plane...

Started by
11 comments, last by DrEvil 11 years, 3 months ago
would texture atlas your tiles and just use the right texture coordinates.

I just looked up a texture atlas, and perhaps I miss understood it, or if there are special features in Unity 3D for it, but I have an issue it doesn't resolve.

The tiles will need to change. for instance, an explosion happens over grass, and there will no longer be grass, just charred dirt and gravel. I'll need to change out what these tiles are, on a regular basis in Real-Time.

Also, I don't actually need to do 3D collision detection here. Because my code contains a 2D array for a height map (managed), I can just apply the units position on the height map to define what Z level they are at. I can reserve collision detection for explosions, moving elements and buildings, but the ground can be fictitious in the physics sense. Rendering will still be quick because I'm using low polygon counts, and the area of visibility will be quite small. (maybe 100x100 tiles typically.)

Moltar - "Do you even know how to use that?"

Space Ghost - “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer."

Dan - "Best Description of AI ever."

Advertisement
Fair enough. 100x100 tiles is not an insignificant number of draw calls. You should be able to dynamically change the texture coordinates in the mesh to account for dynamic changes in tiles all while keeping. I'm not sure what the break even point is with regards to draw calls versus dynamically changing the texture coords. Keep it in mind though if you run into performance issues. If this is a simple game for pc might not make enough of a difference. If you are targeting mobile it might be significant.
*While all keeping a single mesh and draw call, and texture atlas.

This topic is closed to new replies.

Advertisement