View Issue Details

IDProjectCategoryView StatusLast Update
0005676The Dark ModGUIpublic16.12.2021 09:15
ReporterMirceaKitsune Assigned Toduzenko  
PrioritynormalSeveritynormalReproducibilityalways
Status resolvedResolutionfixed 
Product VersionSVN 
Target VersionTDM 2.10Fixed in VersionTDM 2.10 
Summary0005676: Screens for security cameras won't work with textures/common/camera/camera# textures
DescriptionI'm trying to use the security camera entity in my FM, didn't test one with player detection only the screen for pretty visuals. I found an annoying problem that hopefully won't be hard to fix. I'm on the latest dev snapshot (9462).

If I use the texture textures/darkmod/camera my camera will work fine. However if I use one of the numbered textures such as textures/common/camera/camera1 I get either a black screen or a white rectangle. I tested several times and can confirm the texture is the issue: Simply retexturing the same func_static will break or fix it.

Due to a design limitation requiring an unique texture per screen / viewpoint, this presently means that only one screen per map is possible by default, unless you make your own custom material for them. This set was designed to work around that problem by providing mappers with 8 different possible screens by default.
Steps To ReproduceInsert the prefab ai/machines/display_security_camera01_wall01.pfbx. dmap then start your map. In-game the screen will be black.

To confirm the fix: Ungroup the prefab, select the screen's func_static, then in the surface inspector apply the working texture. Compiling and running the map again should have the functional screen now.
TagsNo tags attached.

Relationships

child of 0005528 resolvedDragofer Improvements to security cameras 

Activities

Dragofer

Dragofer

19.07.2021 07:40

developer   ~0014173

Can confirm that textures/darkmod/camera/camera# textures no longer work as of dev16225-9284. In the previous build, dev16215-9224, they work as intended.
Dragofer

Dragofer

19.07.2021 08:00

developer   ~0014174

tdm_camera.mtr (4,486 bytes)   
textures/darkmod/camera
{
	qer_editorimage textures/editor/cameragui.tga
	description "Displays what the entity specified in the 'cameraTarget' spawnarg sees. See more in the folder textures/common/camera."
	noshadows
	{
		red Parm0
		green Parm1
		blue Parm2
		remoteRenderMap 232 232 // width / height of render image, ie resolution of screen
  		scale -1, -1
		translate -1, -1
	}
}


textures/common/camera/camera1
{
	qer_editorimage textures/editor/cameragui1_ed
	description "Displays what the entity specified in the 'cameraTarget' spawnarg sees. Multiple display screens require unique materials with unique 'map' names."
	noshadows
	{
		red Parm0
		green Parm1
		blue Parm2
		remoteRenderMap 232 232 // width / height of render image, ie resolution of screen
  		scale -1, -1
		translate -1, -1
		map "camera1"
	}
}

textures/common/camera/camera2
{
	qer_editorimage textures/editor/cameragui2_ed
	description "Displays what the entity specified in the 'cameraTarget' spawnarg sees. Multiple display screens require unique materials with unique 'map' names."
	noshadows
	{
		red Parm0
		green Parm1
		blue Parm2
		remoteRenderMap 232 232 // width / height of render image, ie resolution of screen
  		scale -1, -1
		translate -1, -1
		map "camera2"
	}
}

textures/common/camera/camera3
{
	qer_editorimage textures/editor/cameragui3_ed
	description "Displays what the entity specified in the 'cameraTarget' spawnarg sees. Multiple display screens require unique materials with unique 'map' names."
	noshadows
	{
		red Parm0
		green Parm1
		blue Parm2
		remoteRenderMap 232 232 // width / height of render image, ie resolution of screen
  		scale -1, -1
		translate -1, -1
		map "camera3"
	}
}

textures/common/camera/camera4
{
	qer_editorimage textures/editor/cameragui4_ed
	description "Displays what the entity specified in the 'cameraTarget' spawnarg sees. Multiple display screens require unique materials with unique 'map' names."
	noshadows
	{
		red Parm0
		green Parm1
		blue Parm2
		remoteRenderMap 232 232 // width / height of render image, ie resolution of screen
  		scale -1, -1
		translate -1, -1
		map "camera4"
	}
}

textures/common/camera/camera5
{
	qer_editorimage textures/editor/cameragui5_ed
	description "Displays what the entity specified in the 'cameraTarget' spawnarg sees. Multiple display screens require unique materials with unique 'map' names."
	noshadows
	{
		red Parm0
		green Parm1
		blue Parm2
		remoteRenderMap 232 232 // width / height of render image, ie resolution of screen
  		scale -1, -1
		translate -1, -1
		map "camera5"
	}
}

textures/common/camera/camera6
{
	qer_editorimage textures/editor/cameragui6_ed
	description "Displays what the entity specified in the 'cameraTarget' spawnarg sees. Multiple display screens require unique materials with unique 'map' names."
	noshadows
	{
		red Parm0
		green Parm1
		blue Parm2
		remoteRenderMap 232 232 // width / height of render image, ie resolution of screen
  		scale -1, -1
		translate -1, -1
		map "camera6"
	}
}

textures/common/camera/camera7
{
	qer_editorimage textures/editor/cameragui7_ed
	description "Displays what the entity specified in the 'cameraTarget' spawnarg sees. Multiple display screens require unique materials with unique 'map' names."
	noshadows
	{
		red Parm0
		green Parm1
		blue Parm2
		remoteRenderMap 232 232 // width / height of render image, ie resolution of screen
  		scale -1, -1
		translate -1, -1
		map "camera7"
	}
}

textures/common/camera/camera8
{
	qer_editorimage textures/editor/cameragui8_ed
	description "Displays what the entity specified in the 'cameraTarget' spawnarg sees. Multiple display screens require unique materials with unique 'map' names."
	noshadows
	{
		red Parm0
		green Parm1
		blue Parm2
		remoteRenderMap 232 232 // width / height of render image, ie resolution of screen
  		scale -1, -1
		translate -1, -1
		map "camera8"
	}
}

textures/common/camera/camera9
{
	qer_editorimage textures/editor/cameragui9_ed
	description "Displays what the entity specified in the 'cameraTarget' spawnarg sees. Multiple display screens require unique materials with unique 'map' names."
	noshadows
	{
		red Parm0
		green Parm1
		blue Parm2
		remoteRenderMap 232 232 // width / height of render image, ie resolution of screen
  		scale -1, -1
		translate -1, -1
		map "camera9"
	}
}
tdm_camera.mtr (4,486 bytes)   
Dragofer

Dragofer

19.07.2021 08:28

developer   ~0014175

Further bisection shows that the last working rev is 9231. In rev 9232 and later, the additional camera materials are broken.

Rev 9232 is by cabalistic:
"Improve image load times by parallelizing the load from disk and using glTexStorage in place of glTexImage"


Keyword is "parallel": the additional, numbered camera screen materials are designed to allow a mapper to show multiple camera screens from multiple cameras simultaneously, in parallel.
Dragofer

Dragofer

20.07.2021 10:48

developer   ~0014176

Cabalistic from Discord:
"glTexStorage creates immutable textures, in the sense that their contents can still be modified, but not their size. I don't know what textures the "map cameraX" instructions point to, but if they are not an exact match for the 232x232 requested render resolution, then the renderer will try to recreate their texture storage, which is not possible. Alternatively, you'd have to disable the usage of glTexStorage (via image_useTexStorage, I think).
Hm, although it'll probably be broken by r_fboResolution, unfortunately."

@MirceaKitsune A workaround for continuing to map with this feature until it's fixed may be to set:
seta image_useTexStorage 0
MirceaKitsune

MirceaKitsune

20.07.2021 11:10

reporter   ~0014177

Firstly thanks for taking a look at this so quickly! Good to know about the workaround too. I should test it sometime just to confirm, trying to achieve other parts of the FM I'm working on now. Even if it will work for me though I wouldn't want my FM to be broken for anyone else, so I'd rather wait for a fix upstream before making permanent map changes.
Dragofer

Dragofer

22.07.2021 18:48

developer   ~0014178

Adding to the 2.10 roadmap since this affects the security camera rework intended for that update.
Dragofer

Dragofer

07.08.2021 21:24

developer   ~0014251

This issue may also affect one or more released missions by grayman that use multiple camera display screens.
Dragofer

Dragofer

21.11.2021 08:50

developer   ~0014558

Commented out the numbered camera screen materials and removed them from their prefabs so that it at least won't inhibit 2.10's release.
Dragofer

Dragofer

28.11.2021 22:08

developer   ~0014578

Looks like mirrors may also have been knocked out by rev 9232 (appear black ingame). Thread with map and viewPos coordinates here: https://forums.thedarkmod.com/index.php?/topic/21165-shading-issues-on-silverware-with-reflective-mirrors-in-view/&do=findComment&comment=467114
Dragofer

Dragofer

16.12.2021 09:15

developer   ~0014591

Multiple parallel camera screens work again since the fix by duzenko mentioned here: https://forums.thedarkmod.com/index.php?/topic/21165-shading-issues-on-silverware-with-reflective-mirrors-in-view/&do=findComment&comment=467150

I've restored the numbered camera screens material and prefabs again.

Issue History

Date Modified Username Field Change
19.07.2021 01:31 MirceaKitsune New Issue
19.07.2021 07:36 Dragofer Relationship added related to 0005528
19.07.2021 07:40 Dragofer Note Added: 0014173
19.07.2021 07:40 Dragofer Assigned To => Dragofer
19.07.2021 07:40 Dragofer Status new => confirmed
19.07.2021 07:40 Dragofer Assigned To Dragofer =>
19.07.2021 08:00 Dragofer Note Added: 0014174
19.07.2021 08:00 Dragofer File Added: tdm_camera.mtr
19.07.2021 08:28 Dragofer Note Added: 0014175
20.07.2021 10:48 Dragofer Note Added: 0014176
20.07.2021 11:10 MirceaKitsune Note Added: 0014177
22.07.2021 18:47 Dragofer Relationship replaced child of 0005528
22.07.2021 18:48 Dragofer Target Version => TDM 2.10
22.07.2021 18:48 Dragofer Note Added: 0014178
07.08.2021 21:24 Dragofer Note Added: 0014251
21.11.2021 08:50 Dragofer Note Added: 0014558
28.11.2021 22:08 Dragofer Note Added: 0014578
16.12.2021 09:15 Dragofer Note Added: 0014591
16.12.2021 09:15 Dragofer Assigned To => duzenko
16.12.2021 09:15 Dragofer Status confirmed => resolved
16.12.2021 09:15 Dragofer Resolution open => fixed
16.12.2021 09:15 Dragofer Fixed in Version => TDM 2.10