View Issue Details

IDProjectCategoryView StatusLast Update
0005691The Dark ModCodingpublic06.01.2024 20:21
ReporterMirceaKitsune Assigned Toduzenko  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product VersionSVN 
Fixed in VersionTDM 2.10 
Summary0005691: noshadows_lod_# won't work without hide_distance
Descriptionlod_1_distance and noshadows_lod_1 will not work unless a hide_distance is also provided, despite the two being unrelated hiding conditions.
Steps To ReproduceCreate a func_static with any model and give it only the following additional spawnargs:

dist_check_period 0.5
lod_1_distance 500
noshadows_lod_1 1

The model will not switch shadows off at a distance, until you also give it this spawnarg which is optional:

hide_distance 1000
Tagslod, model

Relationships

related to 0006359 resolvedstgatilov LOD system - min_lod_bias broken 

Activities

stgatilov

stgatilov

02.08.2021 05:01

administrator   ~0014234

Last edited: 02.08.2021 05:05

According to the wiki and the code:
  https://wiki.thedarkmod.com/index.php?title=LOD#How_to_use_LOD_in_your_TDM_map

This is intended behavior:
  "Note: The dist_check_period spawnarg needs to be combined with one of "hide_distance" or "lod_X_distance" and "model_lod_X", "skin_lod_X" or "noshadows_lod_X" to have any effect! "

UPDATE: Hmm, you usage case does not contradict this overcomplicated sentence.
MirceaKitsune

MirceaKitsune

02.08.2021 13:23

reporter   ~0014235

I imagined this might be a situation that hasn't been caught by the code yet; dist_check_period is typically used in combination with one of the parameters you mentioned. However you can have cases where you want to use it only with lod_1_distance + noshadows_lod_1, in order to disable shadows for that entity past the given distance without hiding it or changing its model. This too can be a valid use case... already doing that in my FM which is how I noticed it wouldn't work.
duzenko

duzenko

07.08.2021 08:42

developer   ~0014247

Completed: At revision: 9539

1. Forcing last LOD distance to -1 and any prior is set. The original logic is not very clear to me so I tried to minimize changes to it. It seemed to require the last LOD distance to work, and explicit hide_distance is just that.
2. Do not require dist_check_period any more as long as any "lod_..." are specified
duzenko

duzenko

07.08.2021 08:44

developer   ~0014248

Attaching the test map
Note that just two LOD spawn arg's are used to control the shadows here
qwe.map (1,347 bytes)   
Version 2
// entity 0
{
"classname" "worldspawn"
// primitive 0
{
brushDef3
{
( 0 0 1 -2 ) ( ( 0.0078125 0 5.7265625 ) ( 0 0.0078125 1.0703125 ) ) "textures/darkmod/stone/brick/redbrick_dull_small" 0 0 0
( 0 1 0 -58 ) ( ( 0.0078125 0 126.9296875 ) ( 0 0.0078125 255.1640625 ) ) "textures/darkmod/stone/brick/redbrick_dull_small" 0 0 0
( 1 0 0 367 ) ( ( 0.0078125 0 5.8828125 ) ( 0 0.0078125 255.8671875 ) ) "textures/darkmod/stone/brick/redbrick_dull_small" 0 0 0
( 0 0 -1 -4 ) ( ( 0.0078125 0 5.7265625 ) ( 0 0.0078125 254.9296875 ) ) "textures/darkmod/stone/brick/redbrick_dull_small" 0 0 0
( 0 -1 0 -978 ) ( ( 0.0078125 0 1.0703125 ) ( 0 0.0078125 255.8671875 ) ) "textures/darkmod/stone/brick/redbrick_dull_small" 0 0 0
( -1 0 0 -688 ) ( ( 0.0078125 0 122.2734375 ) ( 0 0.0078125 255.8671875 ) ) "textures/darkmod/stone/brick/redbrick_dull_small" 0 0 0
}
}
}
// entity 1
{
"classname" "atdm:empty_painting_large"
"name" "atdm_empty_painting_large_1"
"origin" "-522 -210 85"
"rotation" "1 0 0 0 1 0 0 0 1"
"noshadows_lod_1" "1"
"lod_1_distance" "222"
}
// entity 2
{
"classname" "info_player_start"
"name" "info_player_start_1"
"origin" "-518 -363 -1"
"angle" "90.000000"
}
// entity 3
{
"classname" "light"
"name" "light_1"
"origin" "-525 -259 31"
"light_center" "0 0 0"
"light_radius" "320 320 320"
}
qwe.map (1,347 bytes)   
image.png (5,642 bytes)   
image.png (5,642 bytes)   

Issue History

Date Modified Username Field Change
30.07.2021 16:37 MirceaKitsune New Issue
30.07.2021 16:37 MirceaKitsune Tag Attached: lod
30.07.2021 16:37 MirceaKitsune Tag Attached: model
01.08.2021 21:06 duzenko Assigned To => duzenko
01.08.2021 21:06 duzenko Status new => assigned
02.08.2021 05:01 stgatilov Note Added: 0014234
02.08.2021 05:03 stgatilov Note Edited: 0014234
02.08.2021 05:05 stgatilov Note Edited: 0014234
02.08.2021 13:23 MirceaKitsune Note Added: 0014235
07.08.2021 08:42 duzenko Status assigned => resolved
07.08.2021 08:42 duzenko Resolution open => fixed
07.08.2021 08:42 duzenko Fixed in Version => TDM 2.10
07.08.2021 08:42 duzenko Note Added: 0014247
07.08.2021 08:44 duzenko Note Added: 0014248
07.08.2021 08:44 duzenko File Added: qwe.map
07.08.2021 08:44 duzenko File Added: image.png
06.01.2024 20:21 stgatilov Relationship added related to 0006359