Framed Art
An Introduction to TDM's Framed Painting System
By Geep, October, 2021
The Basics
To add a framed "oil" painting to your FM using DR, right-click and select "Create Model..." to bring up the "Choose Model" dialog. Then either search for “painting” or navigate to models/darkmod/decorative/wall/ and look for "painting…".
From the tree listing, select a particular size model (discussed in the next section), then expand the alphabetized list of available art image "skins". Selecting a skin allows you to inspect it in the dialog’s view pane as shown. If you just see wood boards, you’re looking at the backside; fly around to the front.
Available Models
Under decorative/wall/painting… are the models listed in the table below, here from largest to smallest. Frames can accommodate portrait or landscape art by simple rotation on the wall. An exception are the two "desktop" models, which are tilted and have a stand, and have a specified orientation. The "round" frames are actually oval. There are also "…_tearable" models of the 3 larger rectangular sizes.
This convenient system of multiple sizes predates the ability of DR to easily rescale a model. You can now use the latter to create additional sizes if required.
Informal Size Name | Model Name | External Size, h x w | Art Size, h x w |
---|---|---|---|
Large | painting01_l | 104.2 x 96.8 | 94.9 x 65.4 |
Medium | painting01_m | 84.1 x 58.0 | 63.0 x 39.4 |
Original | painting01 | 56.1 x 38.7 | 42.0 x 26.1 |
Round, Original | painting_round | 56.0 x 40.0 | 46.0 x 30.0 |
Round, Small | painting_round_s | 36.0 x 28.0 | 28.0 x 20.0 |
Small | painting01_s | 32.0 x 23.0 | 24.0 x 15.0 |
Miniature | painting_miniature | 16.0 x 12.0 | 12.0 x 8.0 |
Desktop, Portrait Mode | painting_desktop_vertical | 16.9 x 12.0 | 12.0 x 8.0 |
Desktop, Landscape Mode | painting_desktop_horizontal | 13.1 x 16.0 | 8.0 x 12.0 |
Sizes are the approximate dimensions in DR units when in portrait orientation (except painting_desktop_horizontal is landscape).
For the desktop frames, the dimensions given are with frame and canvas rotated into vertical plane, i.e., untilted. Kickstand ignored.
In the round frames, art is visibly stretched, along the narrower frame direction.
Lootable Paintings
These incorporate essentially the same models and skins as above. Use "Create Entity..." and choose one of the relevant classnames found under Loot/Static (see the table below). With the entity created and selected, open the Entity Viewer, add the spawnarg "skin" with some dummy value, then select that to get the "Choose Skin" viewer. (You will need to filter out the collision texture to see the art in the viewing pane.)
When a painting is looted, it is shown rolled in inventory (using guis/assets/hud/inventory_icons/painting_rolled_icon)
Informal Size Name | Class Name |
---|---|
Large | atdm:loot_painting_large |
Medium | atdm:loot_painting_medium |
Original | atdm:loot_painting |
Round, Original | atdm:loot_painting_round |
Round, Small | atdm:loot_painting_round_small |
Small | atdm:loot_painting_small |
Miniature | atdm:loot_painting_minature_wall |
Desktop, Portrait Mode | atdm:loot_painting_minature_desktop_vertical |
Desktop, Landscape Mode | atdm:loot_painting_painting_desktop_horizontal |
Bonus Model
There’s an additional "ornate" frame, that (as of TDM 2.09) just offers one skin, but can use any TDM painting skin, provided you alter the skin’s definition to include that model. The model's gold frame is indeed ornate and created geometrically, superceding whatever framestyle would otherwise supplied by the skin itself. This model is optimized for portrait orientation, including mounting hardware on the back and a slight tilt. The back also has more intricate texturing and modeling.
Informal Size Name | Model Name | External Size, h x w | Art Size, h x w |
---|---|---|---|
Ornate | ornate_frame01 | 58.4* x 40.5 | 39.9* x 24.5 |
The sizes given for the vertical dimension are with the slight tilt. Without tilt, that dimension would be slightly greater.
Implementation – Models & Skins that Combine Art & Frame
TDM's painting models expect a skin with underlying texture that combines the painting image and a 1D-tileable linear painting-frame sample. Right is an example of a (diffuse) texture used in such a skin.
Nowadays, this is always a 512 x 512 texture, with the art taking up 512 h x 400 w, an aspect ratio of 1.28:1 or equivalently about 1:0.78 . There are also specular and normal (bump) maps, at lower resolution, that reflect the nature of a particular frame, while treating the art as simply flat with a coarse canvas-like grain.
As a model, the frame itself is basically 4 perimeter flats with a depressed central rectangle. As already stated, the front side detailing of the frame (and more subtly the art) is provided by the bumpmap. The backside is simply a flat plane with wood planks and no hanging hardware. Of course, models for the round and desktop frames are more involved.