camtag_model(3)
π camtag_model β Define a camera for the 3D processing of a rendertarget β¨
ok so this is from the Arcan Lua API, section 3d, and it's the function that hands a rendertarget its very own camera so the 3D part of the pipeline can actually do its thing. stay with me bestie, it's giving main-character energy for sure π
β¨ SYNOPSIS β¨
camtag_model( vid:dst )
camtag_model( .B )
camtag_model( vid:dst, numbtl:projection )
camtag_model( .B )
camtag_model( vid:dst, float:near )
camtag_model( .B )
camtag_model( vid:dst, float:near, float:far )
camtag_model( .B )
camtag_model( vid:dst, float:near, float:far, float:fov )
camtag_model( .B )
camtag_model( vid:dst, float:near, float:far, float:fov, float:aspect )
camtag_model( .B )
camtag_model( vid:dst, float:near, float:far, float:fov, float:aspect,
bool:front )
camtag_model( .B )
camtag_model( vid:dst, float:near, float:far, float:fov, float:aspect,
bool:front, bool:back )
camtag_model( .B )
camtag_model( vid:dst, float:near, float:far, float:fov, float:aspect,
bool:front, bool:back, float:linew )
camtag_model( .B )
camtag_model( vid:dst, float:near, float:far, float:fov, float:aspect,
bool:front, bool:back, float:linew, vid:tgt )
π«Ά real talk: those camtag_model( .B ) lines in between? that's just the raw page's bold markup poking through β troff being troff π. i kept them so nothing goes missing, but you can lowkey ignore them, they're not arguments.
so yeah β you can call it with just vid:dst and let the defaults vibe, or you can keep stacking arguments on vid:dst right up to the full ten-argument glow-up. every single one is below π
π¦ DESCRIPTION π¦
okay so the whole point of this function is to give a rendertarget a camera, which is literally what turns on the 3D processing part of the pipeline. no cap, that's the entire gig β¨
the object you pass as dst gets converted into a camera-type, and from then on it's from that object's perspective that the 3D scene gets processed. you're basically handing the scene a pair of eyes and saying "go bestie, look" ππ
which rendertarget does it land on? two options, iykyk:
- by default, it's the primary attachment of the object you passed as
dst - but if you use the long-form argument, you can point at a specific rendertarget with
tgtinstead π―
the camera parameters get tuned with near, far and aspect β those three are the ones used to compute the projection matrix that will be activated. math girlies stay winning π₯
then the boolean toggles front and back decide which sides of the model primitives get drawn. that's it, that's the whole toggle situation π
and ooh, this one's cute: setting the linew argument to something larger than 0 enables wireframe drawing mode for the camera β which also disables normal processing. so like, wireframe mode is a whole vibe swap, not a garnish. be aware π
last thing, and it's lowkey important: the argument form that provides projection replaces the current projection matrix of the camera with the one from that table. so it's not adding on top, it's an overwrite β the table's matrix is the matrix now π
πΈ SEE ALSO πΈ
π gentle reminder from your local unix bestie: legal caveats stay legal caveats.linew>0means wireframe mode and normal processing is off β that's not me being dramatic, that's the actual behaviour. same withprojection: it replaces the camera's current projection matrix. periodt. π
β that's the whole page, bestie β you ate π
this little legend lives in the 3d section of the Arcan Lua API, dated October 2026, and files itself under camtag_model(3) ππ¦ see you in the next one, mwah π«Άπ
π¦ 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