new_3dmodel - Allocate a VID and 3D Model container.
Just like regular VID s, 3D models start out in a hidden
(opacity < EPSILON ) state. Even if set to visible, no draw calls
will be issues until the model has been populated with meshes. These will be
drawed in insertion order. Note that vertices may be rescaled to 0..1 *
factor using scale_3dvertices and that call takes the entire chain of meshes
into consideration.
- 1
- If a model isn't at all visible, try setting a single color shader for
troubleshooting, then check video_3dorder to make sure that 2D elements
aren't occluding it. A camera must also have been activated through the
camtag_ class of functions.
- 2
- By default, individual meshes doesn't have a full state akin to a complete
VID and the only attribute that can really be assigned (at quite
some cost) to individual meshes are the active shader.
- 3
- Order of traversed 3D objects depend on the active camera and may not
necessarily follow the regular order_image class of functions.
function new_3dmodel0()
vid = new_3dmodel();
show_image(vid);
add_3dmesh(vid, "testmesh1.ctm");
end