Create Texture Dialog
Introduction
Once you have at least one heightmap and one input you are ready to create the output texture. The above dialog opens when you click on the Create toolbar button. There are a lot of values that can be edited to control the texture creation, these are explained on this page.
Output Texture
Width & Height
These determines the size of the output texture in pixels. If this size is smaller than the height maps used to generate the texture T2 will use averaging when creating the output. If the size is greater than the height map T2 will interpolate values. T2 calculates new values by taking the heights around the pixel in question and working out how the height should change.
Very large textures will take longer to create than smaller ones but will give much better results.
Tip: When experimenting you can choose very small output texture sizes as quick previews of the final result.
Lightmap Texture
You can decide to create a lightmap or not depending on your purpose. If you do not wish to create one there will be no lighting encoded into the resultant blended texture, so no ambient light or directional, spots etc. also the material will have no affect. Not creating a lightmap is much quicker as it is the light calculations that take longest. When disabled all the parameter boxes below are disabled as well.
Note: When exporting the mesh if no lighting is included in the texture the mesh will be exported with normals included in the data, otherwise it will not.
Same As Output
If this option is ticked the lightmap will be created the same size as the output texture. You can however use a smaller or bigger lightmap by not ticking this option and filling custom values into the width and height boxes.
Create Shadows
Shadows can add a lot of realism to the world, T2 creates shadows by casting rays to determine what is in shadow and what is not. If you want you can disable them here. If they are disabled then lighting is based purely on the angle it is to the surface and does not take into account geometry that might be in the way.
Soften Shadow Edges
This option allows you to blur the edges of the shadows for more realism. Without any blurring the edges will be sharp lines that would only occur naturally if a very strong light were used. Normally though shadows tend to be more blurred due to surrounding light reflections etc. The higher the level of softening the softer the shadow are but also the smaller they are.
Blended Texture
Same Size As Output
Normally you want the blended texture created to be the same size as the output texture so enabling this disables the custom controls below and prevents you having to type new dimensions in every time you want to change sizes.
Same Size As Lightmap
Allows the blended output size to be linked to the lightmap size.
Post Creation Actions
Slice Textures
If required you can get T2 to slice the output texture into a grid of textures. The output textures will be saved in the output directory named to show the row and column each one is from. This can be useful for importing into games. The slicing occurs after texture creation and is simply saved to disk, it is not used in the mesh view screen. To use multiple mesh and textures in the mesh view and for export purposes see the Create Mesh page.
Other
Minimise while calculating
If a create operation is going to take a long time you can specify that T2 minimises itself while doing the calculations. It will automatically restore its size after the operation is complete. This is useful if you want it out of the way while crunching the data to do other things. If you need to maximise it again before it is finished double click on the T2 icon in the system tray area.
Influence Data
When T2 calculates the colour and lighting for an output pixel it measures how much influence an input has on that pixel. For example if you have a beach fading out to grass then a pixel may have 0.3 sand and 0.7 grass (the total will always add up to 1.0).
The main problem with using the output textures in a game is that they need to be very large in order to not look blocky when close up to them in game. This means your game will need to load very large textures which may slow things down. Another way of generating the terrain is to use shaders in real time. So in a pixel shader you would mix the input textures then and there (in real time). In order to do this you would need to know how much of each texture should make up each pixel colour. You could do this in real time in code but it would be slow with many textures so instead you can get T2 to pre-compute the influences and load those influences into your game as input into your shaders. There are two ways of getting the influence data from T2:
- float file - with this option enabled a binary file per input is created. Its format is simply width (4 bytes) , height (4 bytes) followed by width * height floats representing the influence of each pixel.
- textures - this outputs a grey scale texture per input. Black represents no influence while white represents full influence. This is not as accurate as the above but maybe easier to work with in your code.
Both options write the files to your output directory.
|