camtag_model(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

πŸ’… 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 tgt instead 🎯

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 > 0 means wireframe mode and normal processing is off β€” that's not me being dramatic, that's the actual behaviour. same with projection: 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