share
Simple Planet Texture Generation 03
In this article series we are going to discuss the creation of a simple planet texture generator that will allow us to texture a three dimensional sphere.
In the first short article we started by looking at building a sphere out of a textured box. In the second one we created a height map generator using simplex noise. In this, the last article, we will be taking the height map and colouring it according to some simple rules to give the visual effect of a planet seen from space. I'm going to use C# and keep it as straight forward as possible so that it can be easily ported to other languages.
The Colours
Ok so now we have a height map from article two that is lying in a buffer, we can use this buffer to texture the sphere from the first article but we want to give it some colour so it would look something like this:
Continued below....
share
Simple Planet Texture Generation 02
In this article series we are going to discuss the creation of a simple planet texture generator that will allow us to texture a three dimensional sphere.
In the first short article we started by looking at building a sphere out of a textured box. In this, the second article, we are going to create a height map generator using simplex noise. In the last we will be taking the height map and colouring it according to some simple rules to give the visual effect of a planet seen from space. I'm going to use C# and keep it as straight forward as possible so that it can be easily ported to other languages.
In the first short article we started by looking at building a sphere out of a textured box. In this, the second article, we are going to create a height map generator using simplex noise. In the last we will be taking the height map and colouring it according to some simple rules to give the visual effect of a planet seen from space. I'm going to use C# and keep it as straight forward as possible so that it can be easily ported to other languages.
The Heights
What is a height map? There are a lot of resources online that can explain it, wiki, but put into context of how we are going to use it: a height map is a two dimensional image with each pixel's alpha or RGB value representing a height of the terrain at a corresponding position.
What we are aiming for is this:
Continued below....
What we are aiming for is this:
Continued below....
share
Simple Planet Texture Generation 01
In this article series we are going to discuss the creation of a simple planet texture generator that will allow us to texture a three dimensional sphere.
In the first short article we going to start by looking at building a sphere out of a textured box. In the second we are going to create a height map generator using simplex noise. In the last we will be taking the height map and colouring it according to some simple rules to give the visual effect of a planet seen from space. I'm going to use C# and keep it as straight forward as possible so that it can be easily ported to other languages.
The Globe
After some research on the web I've come across quite few people that are using sub-divided textured boxes that they then transform into a sphere in code. This gives you an easy why to texture a sphere and minimizes the distortions you get at the poles using more traditional texturing methods especially at lower texture resolutions.
I've decided to use Blender to create the base mesh because of the ease of use of the new Blender interface, its free, it can export to the 3DS format and I can easily update the base mesh and re-import. There are many articles/tutorials online on how to create a subdivided cube mesh in code.
Starting with the basic box mesh we add Seems to create the classic 'cross' UV Unwrap pattern. This will give us six faces that we can easily texture. Make sure that you move the UV coordanites to the bottom of the texture, if you are unsure check the uvTest.png file linked at the bottom of the article as a guide.
Also; search for 'Blender cube unwrapping' if you are having problems.
Continued below....
In the first short article we going to start by looking at building a sphere out of a textured box. In the second we are going to create a height map generator using simplex noise. In the last we will be taking the height map and colouring it according to some simple rules to give the visual effect of a planet seen from space. I'm going to use C# and keep it as straight forward as possible so that it can be easily ported to other languages.
The Globe
After some research on the web I've come across quite few people that are using sub-divided textured boxes that they then transform into a sphere in code. This gives you an easy why to texture a sphere and minimizes the distortions you get at the poles using more traditional texturing methods especially at lower texture resolutions.
I've decided to use Blender to create the base mesh because of the ease of use of the new Blender interface, its free, it can export to the 3DS format and I can easily update the base mesh and re-import. There are many articles/tutorials online on how to create a subdivided cube mesh in code.
Starting with the basic box mesh we add Seems to create the classic 'cross' UV Unwrap pattern. This will give us six faces that we can easily texture. Make sure that you move the UV coordanites to the bottom of the texture, if you are unsure check the uvTest.png file linked at the bottom of the article as a guide.
Also; search for 'Blender cube unwrapping' if you are having problems.
Continued below....
share
Some Updates, Article Incomming
Thanks to the exposure I got from the great guys at Indie Game Blog and my friend DavianBlack on Reddit I have been getting a lot of traffic, bug reports and tutorial requests.
So I've uploaded an updated version of Playpen and I'm working on a set of simple spherical planet texture generator articles and it will be up probably end of next week.
So I've uploaded an updated version of Playpen and I'm working on a set of simple spherical planet texture generator articles and it will be up probably end of next week.
Subscribe to:
Posts (Atom)