Model Scaling: Difference between revisions

From The DarkMod Wiki
Jump to navigationJump to search
m (→‎Matrix Editing: Fixed link syntax)
Line 60: Line 60:




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].
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:
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).
• 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).
• When you can’t use Modify Scaler because, say, you don’t have a model available, only an Entity (e.g., turnip stub).

Revision as of 15:20, 9 July 2019

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

If you want to scale in one dimension only, do the following:

1. Select the model.

2. Delete any "rotation" spawnarg on the model.

3. Click the model scaler button.

4. Click and hold on the box corner that you're going to move.

5. Hold down the shift key.

6. Drag the cursor in the desired direction. If you drag in the x direction, for example, both the y and z model dimensions will remain the same.

7. Leave the model scaler.

8. Save the map. This sets the new scaled model as the one to be used.

9. Rotate the new scaled model back to where it originally was before you deleted the "rotation" spawnarg.

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).