CodeBase - AGK T2 heightmap loader
Category: 3D Effects
Uploaded: 16th Mar 2013 11:39
Modified: 1st Jan 1970 01:00
Author: The Zoq2
This code will take a 2d heightmap and generate a .obj file from it. Then it will load the file and apply textures as well as a detail shader to it. The code was originaly created for AGK tier 1 by MikeMax
The function takes 7 arguments, one heightmap which will be what the map is generated from. One texture which will be added as a normal texture. The hdTexture is used by the shader to add more detail to the texture. The detailX and detailY are parameters for the shader which I believe are used to specify how small the details will be. The max height specifys how high the mesh will become. And finaly stepSize determines the detail of the map. A step size of one will create a mesh with just as many vertices as the heightmap, 2 will use every second pixel, 4 every fourth and so on. Use what you feel gives the most detail without compromising the quality to much.<br /> <br /> Thanks to MikeMax for creating the original code for AGK tier1 and letting me post this T2 version of the code.
No comments yet.