new_3dmodel(3)
π new_3dmodel β the Arcan Lua API glow-up π
okay bestie, so the manpage name is new_3dmodel from section 3, and it lives in the Arcan Lua API family. let's get into it β¨
πΈ NAME πΈ
new_3dmodel β literally just allocates you a VID and a 3D Model container in one go. two for one, slay π
π¦ SYNOPSIS π¦
modelvid
new_3dmodel()
so you call it, and it hands you back a modelvid. iconic. no args, no drama π«Ά
π DESCRIPTION π
okay so here's the vibe: just like your regular VID s, 3D models start out hidden β like, opacity < EPSILON hidden, fully ghost mode π even if you go and set it visible, no draw calls will be issues until the model has actually been populated with meshes. empty model = no art, periodt.
once you do fill it up, the meshes get drawed in insertion order, so the order you add them is the order it draws, no cap.
also heads up: vertices may be rescaled to 0..1 * factor using scale_3dvertices, and lowkey important β that call takes the entire chain of meshes into consideration. so it's not just doing one mesh, it's looking at the whole squad π
β NOTES β
- if a model isn't at all visible, first try setting a single color shader for troubleshooting, then check
video_3dorderto make sure that 2D elements aren't occluding it. also like β a camera must have been activated through thecamtag_class of functions. no camera, no view, iykyk π - 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. so yeah, it's giving "limited edition" π
- order of traversed 3D objects depend on the active camera and may not necessarily follow the regular
order_imageclass of functions. so don't assume, bestie π
π₯ EXAMPLE π₯
function new_3dmodel0()
vid = new_3dmodel();
show_image(vid);
add_3dmesh(vid, "testmesh1.ctm");
end
look at that. allocate, show, add a mesh. chef's kiss π
π SEE ALSO π
add_3dmesh(3)β your next stop, fr fr
that's the whole page bestie, go build something gorgeous π§π
3d β October 2026 β mwah, that's the version and date sign-off, catch you in the next manpage π
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms