Read and draw Wavefront .obj models
make_normals | 0/1 [int] |
Toggles automatically calculating vertex normals for the model, overwriting any existing ones. (default = 0) This is done automatically if the model has no vertex normals. |
read | filename [symbol] |
Loads an .obj model file. The | message will attempt to find the model file in the Max search path and load it. If no model name is specified, a file dialog box is presented.
texgroup |
group-number [int] texture-name [symbol] |
The | message is used to apply a named texture to a numbered group of polygons within the model. The groups for a model are specified in its .obj file. The texture applied to a group will override any textures which have been applied to the object using the message. If 0 is used in place of a texture name, the texture for that group is removed and the texture of the OB3D is restored (or lack of texture).
Name | Type | g/s | Description |
---|---|---|---|
drawgroup | int | If non-zero, draw only one group of polygons. It zero, draw all polygon groups in the model. | |
facet | int | The facet drawing mode (default = 0 (use built-in normals)) 0 = built-in normals or automatically generated normals are used when rendering the model 1 = draw each triangle in the model with its own normal. |
|
material_mode | int | Mode for applying built-in material properties of a model. 0 = material properties are ignored. 1 = the diffuse color component of the material is used to generate a vertex color. 2 = all components of the material are used. |
|
mode | symbol | Determines the method used to draw the model. Possible modes are: displaylist (not the fastest, but will work on any card) var vbo |
|
normalize | int | Normalize model coordinates flag (default = 1) When enabled, the jit.gl.model object will scale the model's coordinates to the range (-1.,1.) for the x, y, and z axes. When disabled, the original model's coordinates are preserved. this is useful for importing several models together in the same world, preserving relative position and size. | |
smoothing_angle | float | Specificies the edge angle above which to smooth vertex normals. | |
verbose | int | Verbose mode flag (default = 0) In verbose mode, the jit.gl.model object will print out messages useful for debugging patches or models. |
Name | Description |
---|---|
jit.gl.graph | Open GL floating-point data visualization |
jit.gl.gridshape | Generate simple geometric shapes as a connected grid |
jit.gl.handle | Use mouse movement to control position/rotation |
jit.gl.isosurf | Generates a GL based surface extraction |
jit.gl.mesh | Generates GL geometry from existing data |
jit.gl.nurbs | Generate NURBS surface |
jit.gl.plato | Generate platonic solids |
jit.gl.render | Render Open GL |
jit.gl.shader | Manages a GL shader |
jit.gl.sketch | GL parallel to lcd |
jit.gl.slab | Performs a GL accelerated grid-based evaluation |
jit.gl.text2d | Write bitmap text |
jit.gl.text3d | Write vector text |
jit.gl.texture | Manages a GL texture |
jit.gl.videoplane | GL accelerated video plane |
jit.gl.volume | Creates a GL accelerated volume vizualization |
Tutorial 36: 3D Models | Tutorial 36: 3D Models |