View Issue Details

IDProjectCategoryView StatusLast Update
0004970The Dark ModDesign/Codingpublic08.12.2019 17:03
Reporterstgatilov Assigned To 
Status newResolutionopen 
Product VersionTDM 2.07 
Target VersionTDM 2.08Fixed in Version 
Summary0004970: Avoid problems with rotation-resized models
DescriptionIt is possible to set non-orthogonal "rotation" matrix to an entity. Then it would be resized/distorted according to the matrix. However, many subsystems (physics, shadows) don't work properly with such entities.
Mappers don't know that, because the problem are rather subtle and show up during beta testing or never at all.

It would be great to do something so that this problem doesn't appear again in future. It is one of:
1) Support bad rotation matrices properly (maybe by duplicating and physically resizing assets --- watch out for dynamical rotations).
2) Warn about such entities loud enough so that mappers know immediately that this is wrong (keep in mind that existing missions have many entities with bad rotations).

Additional InformationExtracted from issue found during 2.07 beta:
Please read the discussion in that issue: it contains a lot of valuable information.
TagsNo tags attached.


related to 0004941 closedstgatilov Odd Ragdoll behaviour 
related to 0004981 new Urn in Chalice of Kings gets wrongly pruned 
related to 0004779 resolvednbohr1more Resized models have overblown specular in GLSL enhanced ambient 




20.01.2019 08:14

developer   ~0011441

A big fat warning should be displayed to mappers in any case.

Another quick workaround would be to dynamically add "inline = 1" when a non-orthogonal rotation matrix has been detected. According to NBohr, this might decrease performance, though, since the entity is converted to brushes.


20.01.2019 15:34

developer   ~0011446

Inlining affects physical properties no less than rotation hacking: Also it happens during dmap (you end up with a bloated .proc if you inline a lot), so if you wanted to apply it to existing maps you'd have to recompile them and then test for unwanted behaviour. That's not a quick workaround any more.

SteveL reported shadow errors from inlining, as well as a huge slowdown to dmap if it's used heavily within a visleaf:


26.01.2019 09:52

developer   ~0011510

IIRC the wiki already tell the mapper about the fact, that only the visual model is affected by the non-orthogonal part of the rotation matrix.

However, if the visual model can be modified like that, the more important question is why shadows and collision are not affected. Using non-orthogonal transformations to adjust a models size to the geometry in your mission is extremely useful opposed to creating a new model for each usecase, and I have used it in the past, too, although I restricted on minimal size deformations to avoid the issues with that approach becoming too noticeable to the player.

It might therefore be desireable to identify the code pieces responsible for that specific aspects and changing it so they accept such transformations.


08.12.2019 17:03

developer   ~0011899

Started a lengthy discussion about the problem on forums:

Also, added one more issue due to this: 0004779.
It is reproduced be running Penny Dreadful 2, and teleporting: setviewpos 5300 1100 -700 (the big golden keys underground are culled away sometimes).

Issue History

Date Modified Username Field Change
20.01.2019 07:12 stgatilov New Issue
20.01.2019 07:12 stgatilov Additional Information Updated View Revisions
20.01.2019 07:13 stgatilov Relationship added related to 0004941
20.01.2019 07:13 stgatilov Additional Information Updated View Revisions
20.01.2019 08:14 STiFU Note Added: 0011441
20.01.2019 15:34 VanishedOne Note Added: 0011446
26.01.2019 05:04 stgatilov Relationship added related to 0004981
26.01.2019 09:52 Obstler Note Added: 0011510
08.12.2019 05:11 nbohr1more Relationship added related to 0004779
08.12.2019 17:03 stgatilov Note Added: 0011899