As i mention in earlier post, i will try to explain what sort of things that i called primitives. Firstly, of course the 3d primitive being used are vertices, triangles etc. after the 3d volume slices created which are cube, i did some type of uv coordinate manipulating to render a totally different object. these object which then i called primitives. here they are

Basic Cube

below is a basic cube, with 3d texture coordinate, our starting point. from this Cube i can create 4 type of object. they are : basic volume using 3D texture, single sided cube, double sided cube, and double sided front and back.

basic_cube

Basic Volume

using standard 3d texture sampling to determines each slice values. there are plenty of references on line for doing this, so i’m not going to make any example, well… lets make it next post, baking blender model for 3d texture is so time consuming.

Single Side Cube

below is the single side cube, means the 2d texture, the height map pixel value determine the height value of an axis. in practice, a greater value than the height map pixel are transparent.

single_side_cube

Double Sided Cube

the double sided cube are basically the same with single sided one. the difference is the displacement are reflected from the center point.

double_side_cube

Double Sided Cube Front And Back

this type extending the Double sided Cube. instead of just reflecting the height map values, it uses different textures for front and back side via texture coordinate, half front, half back

front_back_cube

Basic Cylinder 

using simple calculation i can get the cylinder out of the basic cube. and from this cylinder i can map a 2D cylindrically projected texture the same way.

cilynder

image below shows the possibility what a cylinder might look after the shader kicks in.

cilynder_textured

ok next post i will pay my debt on showing  you the spherical object type, and a 3D volumetric texture in action.

below a sneak-peek of what this method can do. a full volumetric scene, an interpretation of a .tmx file. all geometry fit in only 16 objects, actually it fits in one, but i need some frustum culling. i have a plan to mix 2d and 3D textures all in one shader, stuff all that in one geometry one draw call.

terrain-ss

Advertisements