![]() |
| jit.gl.model | Read and draw Wavefront .obj models |
| GL Group |
| Attributes: |
| Name | Type | Description |
| drawgroup | int | If nonzero, 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. |
| 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. |
| Messages: |
| 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 read 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 texgroup 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 texture 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). |
| Example: |
