HTML5+CSS on Canvas 3D WebGL (TM) Library
 

OBJ File Creation

taccgl™ currently supports OBJ files containing 3D Models of multiple 3D objects. You can create a scene with your 3D design program, such as blender, and then export the scene to the OBJ format. There, however, may be some limitations w.r.t. to what features and items of your scene can be exported to OBJ. So for example you cannnot represent animations in OBJ. See MTL File Creation for details on what Materials are supported by taccgl™. In addition taccGL supports a special material named "HTML". An HTML element is mapped on surfaces having this material.

Below we discuss, what export options to choose to produce an OBJ file for taccGL.

Recommended Blender
Export Options

check Include Normals
check Include UVs
check Write Materials
do not check Triangulate Faces
never check Write Nurbs
check Objects as OBJ Objects
select Up: Y Up
select Forward: -Z forward

In taccgl™ the y-axis extends (as in HTML) from the top of the document down. The x-axis extends from left to right. The z axis extends from the the screen towards the users eye. The user and objects in front of the screen are at positive z coordinates, the screen is on the z=0 plane and objects behind the screen are at negative z coordinates. Many drawing programs, e.g. Blender, use a different convention. So in order to convert, in Blender export you need the select Up: Y Up and Forward: -Z forward. If you do not set these correctly, taccgl™ will not show the front view but possibly the bottom view of the model.

taccgl™ can calculate normals but only in a simple way. So if possible, include normals (check Include Normals in Blender). Without normals, surfaces might not appear smooth.

taccgl™ can process UVs in a special way, as discussed in UV Mapping (check Include UVs in Blender).

taccgl™ can process Material (MTL) files. If the MTL file is not present, taccgl™ takes the color and material properties defined with taccgl™, however, the complete model then uses just a single material/color. (check the "Write Materials" checkbox in Blender).

taccgl™ can process faces that are triangles, convex quadrilaterals, or arbitrary convex polygones. It can not process free form curved surfaces or NURBS. If you want to simply (without UVs) map HTML elements on surfaces then these surfaces must be quadrilaterals. Therefore you should normally not triangulate faces while otherwise triangulate faces should work as well. (So normally do not check the triangulate faces checkbox and never check Write Nurbs in Blender).

For various functions taccgl™ allows to select individual 3D objects of the model. So 3d object information needs to be included (check Objects as OBJ Objects in Blender).

WebGL™ is a trademark of the Khronos Group Inc.

Next Page:UV Map Creation
Previous Page: taccglOBJFile.objs - Select objects to create transition