Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm working on a voxel game, and I have some problems with texturing. I have read the related questions on this stack exchange, but they seem adressing a generic problem (using triplanar texturing), and I think mine is simpler.

Polygonization output

You can see that the resulting geometry contains a limited set of polygons. Last I checked I saw only 44 of them. My idea was to uv map these polygons to a regular texture using a static map table, without having to use any triplanar texturing (currently, every polygon is mapped to the same values, so it's ugly).

My questions :

  • Is it valid ? It seems much simpler than triplanar texturing, but I can't find a single resource on the subject, so I'm wondering if it's a right approach.
  • Where can I find / How can I generate a UV map for this kind of geometrical figure ? I have tried to use blender but it seems like my blender-fu is not strong enough. Is there some simpler software to generate UV map with models like this one ?
share|improve this question
3  
I wont post this as an answer, but this link describes the process of tri-planar texturing in the exact same context you are trying to use it in http.developer.nvidia.com/GPUGems3/gpugems3_ch01.html –  Evan Apr 4 '13 at 5:22
    
This seems to me to be the same kind of problem as constructing a tile-set with transition tiles for a 2D map: for each type of edge, you need to decide what that edge looks like, then make a set of texture tiles + UVs such that no matter what the neighboring polygon is, its edge (of that type) always has the same pattern on it. It sounds like you want to accomplish this using only a single texture and only adjusting the UVs but that may not be possible (except in the trivial case where every edge has the same pattern). –  Kevin Reid Apr 4 '13 at 19:05

2 Answers 2

Another way would be to procedurally generate your textures. This approach comes with its advantages and disadvantages. Most important tradeoff is that you can't draw your textures in an editor but have to code them using noise functions.

The huge gain in your situation is that you can texture your terrain completely orientation independent. This is done by using so called solid noise. It is a three dimensional noise function.

Using that you can code a function to generate the color value of any given position in 3d space. Then you sample just the points lying on the mesh faces. In other words, you carve out from the three dimensional texture.

This is from the libnoise glossary.

The following image shows an object that has a solid noise texture. Note that the texture does not warp anywhere on the object; it is uniform throughout the object. It would be very difficult to produce a non-warping two-dimensional texture map for this object.

enter image description here

I know that it may not be your aim to code instructions for generating every texture you want to use. But it may also be a challenge and comes not only with the orientation independent advantage but also with heavily reduced storage space and unlimited zoom-in detail.

I would be very interested if you would try to implement solid noise textures for your terrain.

share|improve this answer

UV mapping does look like the correct way to go with this. I believe this answers your first question (but I may be wrong). About why Blender won't UV map this for you is because it's trying to unwrap it as one giant lump-thing. You need to add seams to the model so that Blender can split it appropriately - look at Blender's Official Guide to UV Mapping to see how to do this.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.