Jump to content
  • Advertisement
Sign in to follow this  
Kiel368

Unity Texture atlas for octree-based voxel

This topic is 2105 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi!

I'm creating an octree-based voxel engine in Unity and I'm a bit stuck at how to properly do texturing. The biggest blocks possible are 8m. I want textures to be 64px per 1m, but as repeating textures is impossible in the atlases, it'd mean that i have to manualy (or using a script, doesn't matter) copy the same texture 8 times or make it 8 * 64 = 512px big. Now image I have 256 diffrent textures to be used. The size of the texture atlas constructed would be sqrt(256) * 512 = 8192px. Now image i have 1024 textures, and i'm running on a mobile platform. I don't think it is really possible to use such big textures on the mobile and it is extremely inconvienient for me if, let's say, i want textures to be applied like 1 repeat = 1 meter - i'd have to create a 8x8 texture tile and put it then in the atlas. Is it possible to somehow repeat the textures or is there any better solution for the problem, given that max number of textures = 4096 and i'm using one of TEXCOORDS already.

Share this post


Link to post
Share on other sites
Advertisement

You can do it if it uses pixel shaders by wrapping the UVs yourself via fmod. I don't know if your platform uses pixel shaders though. EDIT: Looks like you need version 2 shaders minimum though. And it's going to affect performance of course.

Edited by Paradigm Shifter

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!