R3D_OBJECTS(1)
๐ฆ R3D_OBJECTS(1) โ General Commands Manual ๐ฆ
okay so bestie, this is the R3D_OBJECTS page from the General Commands Manual, and it's literally the dictionary of every object descriptor type the Raster3D crew understands. no cap, every one of these has a required parameter list and you gotta get them exactly right or the renderer will simply not know what you're on about. let's go ๐
โจ NAME โจ
rd3_objects โ object types used by the Raster3D package
(yes, the manpage spells it rd3_objects. we're keeping it. it's iconic, it's canon, don't @ me ๐ซถ)
๐ธ DESCRIPTION ๐ธ
these are the object descriptor types, plus the required parameters, that the render program and the rest of the Raster3D package actually recognize. if it's not on this list, it's not a thing. periodt.
๐บ Object type 1 - triangle
x1, y1, z1, x2, y2, z2, x3, y3, z3, red, green, blue;
three points, three color channels. that's the whole vibe.
๐ฎ Object type 2 - sphere
x, y, z, radius, red, green, blue;
center, radius, color. so clean, so simple, love that for us.
๐ฅซ Object type 3 - cylinder with round ends
x1, y1, z1, R1, x2, y2, z2, R2, red, green, blue.
quick note bestie: R1 is the cylinder radius, and R2 is currently ignored (it's just there. sitting there. being ignored. ๐ญ).
๐ซ Object type 4 - not used
literally nothing. it's giving "left on read". moving on.
๐ Object type 5 - cylinder with flat ends
x1, y1, z1, R1, x2, y2, z2, R2, red, green, blue.
same deal as type 3: R1 is the cylinder radius, R2 is currently ignored.
๐ช Object type 6 - plane
x1, y1, z1, x2, y2, z2, x3, y3, z3, red, green, blue;
any three points define the plane โ that's it, that's the whole rule. and its color fades from full intensity in the foreground to half-intensity at the back. gradient moment โจ
๐ Object type 7 - Vertex normals
explicit vertex normals for the preceding triangle object. it must directly follow the triangle object, and it uses the same format. no spacing out, no other objects in between, they're attached at the hip fr fr.
๐จ Object type 8 - Material properties.
these values override the lighting and specular highlighting specs from the header records, so some objects can flex different surface properties than everyone else. the specified values apply to all subsequent objects until an object of type 9 shows up. the parameters are read as free format floating point numbers from the next line of the input stream:
8
MPHONG MSPEC SR SG SB CLRITY OPT1 OPT2 OPT3 OPT4
MPHONGโ a value>=0overrides the global Phong power for specular highlightingMSPECโ a value>=0overrides the global specular scattering contributionSR,SG,SBโ RGB triple specifying the color of reflected light (by default all specular highlights are white). a negative value for any component will default to the base colour component of the object being rendered.CLRITYโ the degree of transparency for this material, with0.0indicating an opaque surface and1.0a purely transparent oneOPT1โ affects processing of transparent objects which belong to the same material, but occlude each other (for instance the front and back surfaces of a transparent molecular surface).OPT1 = 0will render all outward-facing transparent surfacesOPT1 = 1will render only the topmost outward-facing surfaceOPT1 = 2will render both the outward- and inward- facing surfaces of transparent spheres and cylinders
OPT2โ selects from several variant treatments of transparency as a function of alpha and the Z componentZNof the surface normal.OPT2 = 0T(ZN) = 0.25(1+cos(pi*alpha*ZN)^2OPT2 = 1T(ZN) = (1-abs(alpha*ZN))^2OPT2 = 2T(ZN) = 1 - alpha ^ (cos(pi/4) / abs(ZN))OPT2 = 3T(ZN) = 1 - alpha
Option 0 is an empirical function that the author thinks looks good. (trust the process ๐)
OPT3โ not usedOPT4โ non-zero to indicate that additional modifier records follow immediately. each modifier must constitute a single line, andOPT4tells how many of these lines there will be. here's a complete list of modifiers currently available, and their parameters:SOLID RED GREEN BLUEBACKFACE RED GREEN BLUE MPHONG MSPECFRONTCLIP ZFRONTBACKCLIP ZBACKBOUNDING_COLOR RED GREEN BLUEBOUNDING_PLANE BPTYPE X Y Z Xnorm Ynorm ZnormORTEP_LIKE used to create fancy ellipsoids (see rastep documentation)
๐ Object type 9 - End_material
terminates application of all previously defined special material properties (object type 8) or isolation from TMAT transformation (object type 15). it's the "okay we're done here" of descriptors ๐
๐ท๏ธ Object types 10,11,12 - Label descriptors
these object types are used as label descriptors. the current version of render ignores them unless the -labels option is selected on the command line. (the disrespect honestly ๐ญ)
Object type 10 - font_name size alignment
legal values subject to details of font processing implementation.
font_nameis any font name recognized bylibgdsizeis the font size in points, but is modified byrender's-fontscaleoptionalignmentis"Left","Right","Center", or"Offset".
Object type 11 - Label text
X Y Z R G B (On one line) label position and color
Label text (On 2nd line)
two lines, one job. ๐
๐ก Object type 13 - Glow light source.
this is a colored, non-shadowing, light source with finite [x y z] coordinates and a limited range of illumination. control parameters are read in free format from a single line of input following the line specifying the object type.
13
GLOWSRC(3) GLOWRAD GLOW GOPT GPHONG GLOWCOL(3)
GLOWSRC(3)โ[x y z]coordinates of light sourceGLOWRADโ limiting radius of light source (seeGOPT)GLOWโ fractional contribution (0.0-1.0) of glow light to total lighting modelGOPTโ (integer0/1/2/3/...) controls functional form in which limiting radius is applied [under development]GPHONGโ Phong parameter controlling specular highlights from glow lightGLOWCOL(3)โ RGB triple specifying color of glow light source
heads up: GOPT is marked [under development] in the original. so it's giving "work in progress", not "fully baked". ๐
๐ฅ Object type 14 - Quadric surface
x, y, z, limiting_radius, red, green, blue, A, B, C, D, E, F, G, H, I, J
quadric surfaces include spheres, cones, ellipsoids, paraboloids, and hyperboloids. the motivation for this code was to allow rendering thermal ellipsoids for atoms, so the other shapes have not been extensively tested. (tested-enough energy ๐)
a quadric surface is described by 10 parameters (A...J). although these parameters are sufficient to describe a quadric surface located anywhere, for efficiency during rendering it's also useful to know the center and a bounding sphere. so by convention we require that (A...J) describe a surface centered at the origin, and add additional parameters x, y, z to add a translation component. therefore a QUADRIC descriptor to render has the 17 parameters listed above.
the surface is the set of points for which Q(x,y,z) = 0 where
Q(x,y,z) = Ax2 + By2 + Cz2 + 2Dxy + 2Eyz + 2Fzx + 2Gx + 2Hy + 2Iz + J
points further from the origin (prior to translation!) than the limiting radius are not rendered. so like, know your radius bestie.
๐ Object type 15 - TMAT Isolation
objects following this descriptor are interpreted as being in an absolute coordinate system centered at the origin and having unit extent in X, Y, and Z. if the image is rectangular, coordinates run from -0.5 to +0.5 along both X and Y. if the image is rectangular, coordinates run from -0.5 to +0.5 along the shorter dimension. (yes, the page says "if the image is rectangular" twice. we do not editorialize. we copy. ๐ซถ)
the rotation and translation described by the TMAT matrix is not applied. this isolation from TMAT applies to subsequent objects until an object of type 9 is encountered.
๐ Object type 16 - Global property
object type 16 is always followed by a single record that affects the rendering of the entire scene. currently the options are FOG, FRONTCLIP, and BACKCLIP. there are also options ROTATION and TRANSLATION that affect only objects following their appearance in the input stream. so like โ some of these are whole-scene main characters, and some only care about what comes after them. ๐
๐ Object type 17 - Vertex colours
explicit vertex colours for preceding triangle or cylinder object.
R1 G1 B1 R2 G2 B2 R3 G3 B3
๐ซฅ Object type 18 - Vertex transparency
explicit transparency at vertices of preceding object. all three values are required, though only the first two are used for cylinders, and only the first one for spheres.
Trans1 Trans2 Trans3
๐โจ Object type 19 - TMAT Isolation
similar to object type 15, except the the x and y scales are the same only in the case of a square image. both the x and y axes run from -0.5 to +0.5 regardless of the aspect ratio of the rendered image. (and yes โ "the the". we see it. we love it. we keep it. ๐)
๐ SEE ALSO ๐
- PostScript and HTML documentation
render(l)
and that's the whole page bestie, you ate that ๐ the source is Raster3D, dated 8 May 1999 โ yes, 1999, she's a vintage icon and she still slays ๐โจ go render something gorgeous, mwah ๐๐ฆ๐
๐ฆ where this page comes from
- debian bookworm: raster3d 3.0-7-2+b1 ยท Artistic-1.0-Perl
- debian trixie: raster3d 3.0-7-2+b2 ยท Artistic-1.0-Perl
- ubuntu jammy: raster3d 3.0-7-2 ยท Artistic-1.0-Perl
- ubuntu noble: raster3d 3.0-7-2build1 ยท Artistic-1.0-Perl
- ubuntu questing: raster3d 3.0-8-1
- ubuntu resolute: raster3d 3.0-8-3 ยท Artistic-1.0-Perl
- ubuntu stonking: raster3d 3.0-8-3 ยท Artistic-1.0-Perl
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms