Model Scaling

From The DarkMod Wiki
Revision as of 13:44, 2 July 2019 by Springheel (talk | contribs)
Jump to navigationJump to search

Page Title: Rescaling Models with Dark Radiant's “Model Scaler”

[This page is a draft. Please help make it better. Geep]

Basic Operation

The "Model Scaler" button, on the left side of the DR screen, is the best way to resize a model symmetrically. As its name implies, it works with models, NOT entities, brushes, patches, or AI.

After creating or selecting a model instance in the grid, pressing “Model Scaler” encloses it in a rectangular box. Drag any of the box vertices (blue dots) with a mouse to enlarge or shrink it. The vertex movement may not stay aligned perfectly with the mouse cursor movement, so you may need to interrupt the drag and reposition.

Scaling by a Fixed Amount

Usually the scaling is simply done by eye. But if it is important to scale up or down by an (approximately) fixed factor: • Select a relatively fine grid size, so Model Scaler handles move more fluidly. • Before scaling, note the size of some dimension (e.g., x width) in a DR orthogonal view • Calculate what that “target dimension” should be once the factor is applied. • As you resize with Model Scaler, keep an eye on the target dimension.

How the Model Scaler Works

Using the Model Scaler clones the original distributed model, resizes it by changing all the edge lengths, and saves the result as a new file in the models/map_specific folder/scaled/ folder of your FM. So if you create a grammaphone instance by picking… darkmod/musical/grammo3.ase …and use Model Scaler, the result in the Entity Viewer for “model” might be: models/map_specific/scaled/grammo3_scaled1.ase If you create multiple objects with different scale factors, multiple files are created, with trailing number bumped.

Alternative Techniques

Outside Dark Radiant

The most obvious alternative is to do model scaling outside of DR, e.g., in Blender. The appeal of this roundtripping may vary.

Matrix Editing

As for DR-only methods, generally, with a model, if you try the DR’s top menu “Modify/Rotate and scale…”, the Scale controls are grayed out. This is to discourage you from making scaling changes to the transformation matrix. The TDM/Doom 3 engine has significant runtime shortcomings in using the transformation (aka “rotation”) matrix for scaling. This includes problems with lighting, rendering, and collisions. If you REALLY need to use this older technique by hand-editing the matrix, see [Rescaling,_Resizing,_Models_in_Dark_Radiant] and [Resizing_Models].

Remaining use cases for this older problematic technique might be: • For non-symmetric scaling (in which case you use different factors for X, Y, and Z matrix entries). • When you can’t use Modify Scaler because, say, you don’t have a model available, only an Entity (e.g., turnip stub).