Framed Art: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
Geep (talk | contribs)
Revise 'Implementation'
Geep (talk | contribs)
mNo edit summary
Line 5: Line 5:
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…".
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.
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. (See the skins with the "_torn" suffix? Don't select them... they're implementation devices for the lootables discussed further below.)


[[File:DR Choose Model dialog with Builder Mythology.png|800x800px|frameless|center|DR "Choose Model" dialog, with example skin builder_mythology]]
[[File:DR Choose Model dialog with Builder Mythology.png|800x800px|frameless|center|DR "Choose Model" dialog, with example skin builder_mythology]]


== Available Models ==
== 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.
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" variant models of all sizes except miniature and desktop.)


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.
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.
Line 40: Line 40:
Sizes are the approximate dimensions in DR units when in portrait orientation (except painting_desktop_horizontal is landscape).
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.
For the desktop frames (whose models are under .../decorative/, not .../decorative/wall/), the dimensions given are with frame and canvas rotated into the vertical plane, i.e., untilted. Kickstand ignored.


In the round frames, art is visibly stretched, along the narrower frame direction.
In the round frames, art is visibly stretched, along the narrower frame direction.
Line 48: Line 48:
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.)
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)
When a painting is looted, it is shown rolled in inventory (using guis/assets/hud/inventory_icons/painting_rolled_icon). The frame then shows wood boards where the art was. (Implemented by the frob_loot script replacing the original model with one that has the equivalent _torn skin).


{| class="wikitable"
{| class="wikitable"

Revision as of 03:03, 12 October 2021

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. (See the skins with the "_torn" suffix? Don't select them... they're implementation devices for the lootables discussed further below.)

DR "Choose Model" dialog, with example skin builder_mythology
DR "Choose Model" dialog, with example skin builder_mythology

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" variant models of all sizes except miniature and desktop.)

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.

Frame Models
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 (whose models are under .../decorative/, not .../decorative/wall/), the dimensions given are with frame and canvas rotated into the 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). The frame then shows wood boards where the art was. (Implemented by the frob_loot script replacing the original model with one that has the equivalent _torn skin).

Lootable Paintings
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.

Ornate Frame
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

For the "builder_mythology" skin, the diffuse texture "painting09_m_d" (distributed by TDM as a dds)
For the "builder_mythology" skin, the diffuse texture "painting09_m_d" (distributed by TDM as a dds)

TDM's painting models expect a skin with underlying square factor-of-2 textures (diffuse, normal, and specular). These textures each combine the art area with a 1D-tileable linear painting-frame sample. At right is a diffuse-texture example. The art here is portrait oriented. If it were landscape oriented, the frame sample would still be at the right edge, but the art would be rotated 90 degrees.

Nowadays, the diffuse texture would always 512 x 512, with the art taking up 512 h x 400 w, an aspect ratio of 1.28:1 or equivalently about 1:0.78 . The specular and normal (bump) maps, at lower resolution, deliver the surface topology 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.

See Also

Fidcal's March 3, 2011 forum post

OGDA's March 10, 2021 forum post