View Issue Details

IDProjectCategoryView StatusLast Update
0004731The Dark ModModelspublic21.02.2021 08:48
Reportergrayman Assigned ToDragofer  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product VersionSVN 
Target VersionTDM 2.10Fixed in VersionTDM 2.10 
Summary0004731: Add Epifire's security camera model
DescriptionEpifire has contributed a nice security camera model. Pictures are here:
http://forums.thedarkmod.com/topic/7366-master-models-needed-list-post-requests-here/page-8#entry417035

A new entity needs to be derived from the existing security camera entity that uses this model. Work has been done on this by grayman and Obsttorte, but the version in core TDM is not yet useable (missing scriptobject for the gears). A working set of assets can be extracted from William Steele 6, which is in beta at time of writing.

The entity with all associated definitions (skins, scriptobjects etc.) should be finalised in SVN so that the new camera entity becomes ready for use.
TagsNo tags attached.

Relationships

related to 0005528 resolvedDragofer Improvements to security cameras 
related to 0005531 resolvedDragofer Compare security cameras between 2.09 and 2.10beta 

Activities

grayman

grayman

15.01.2018 14:37

viewer  

grayman

grayman

15.01.2018 14:37

viewer  

security_camera_001.zip (2,481,755 bytes)
grayman

grayman

15.01.2018 14:41

viewer   ~0010016

As delivered, the camera pieces are NOT in the folders where they belong.

The dds files go into dds/models/darkmod/props/textures.

The mtr file goes into materials.

The lwo files go into models/darkmod/mechanical.

The tga file goes into textures/models/darkmod/props/textures.
grayman

grayman

15.01.2018 14:44

viewer   ~0010017

Since it's difficult to put the camera parts in the right place, 2 prefabs would be necessary, one for a wall-mounted camera, and one for a ceiling-mounted camera.
grayman

grayman

15.01.2018 14:45

viewer   ~0010018

Scripting is needed to make the gears turn in the right direction.

Probably binding them to the head will take care of the fact that the gears are pitched.

user81

19.03.2018 16:21

  ~0010097

Pm'ing Obs to see if he can have a look at this as Gman is upto his eyes in getting 2.06 out the door atm.
Obsttorte

Obsttorte

11.07.2018 10:11

developer   ~0010667

Modified the camera visibility check with rev #7562:

game/SecurityCamera.cpp

- Traces for head and origin (shoulders could be added, but are probably not needed?)
- Trace starts a bit in front of camera, as it seems that the model blocked the trace sometimes
grayman

grayman

11.07.2018 13:54

viewer   ~0010671

This is ready for testing?
Obsttorte

Obsttorte

11.07.2018 14:39

developer   ~0010672

It is.
VanishedOne

VanishedOne

21.02.2019 18:38

reporter   ~0011644

I see this is marked as fixed in 2.07, and http://wiki.thedarkmod.com/index.php?title=What%27s_new_in_TDM_2.07#Assets says it was added in 2.07, but the only camera models I can actually find in my 2.07 installation are the models/darkmod/mechanical/security_camera.ase family. Am I missing something?
Obsttorte

Obsttorte

23.02.2019 08:23

developer   ~0011647

I have uploaded the camera stuff as per above but haven't committed them to svn as I thought they would be tested before doing so. It seems they haven't been added afterwards either. The code is there, though (see above comment), so if you download the files you should be able to use the camera. Note that the camera is an entity.

Seems like there was a misunderstanding here, sorry. :(
Obsttorte

Obsttorte

23.02.2019 08:34

developer   ~0011648

Added with rev. #15644
grayman

grayman

26.04.2019 21:04

viewer   ~0011769

There are no script files in that rev.

Were there code changes as well?
Obsttorte

Obsttorte

27.04.2019 08:58

developer   ~0011770

I'll take a look. I somehow messed up the camera related stuff, but I will try to fix it as soon as I find the time. Sorry. :(
grayman

grayman

27.04.2019 09:14

viewer   ~0011771

Ok, thanks.

No rush.
kingsal

kingsal

09.06.2019 16:35

reporter   ~0011809

It would be great if this camera has the ability to follow the player for a short while after it detects you and before it fires the alarm. Similar to the t2 style cameras.

Other wise its really easy to just side step out of its view cone when detected.

Also the default alarm drops my FPS to like 15, probably because its alerting the entire map.
VanishedOne

VanishedOne

10.06.2019 14:37

reporter   ~0011810

If we're adding enhancement suggestions here, may I add one about letting the default skin and particle names be overridden by mappers via spawnargs? Recently someone wanted an invisible security camera for something and couldn't get the skin working; I checked the code and saw it seemed to be using hardcoded on/off skins (so I ended up suggesting overriding those built-in skins with same-named ones as a workaround). The spark particles are hardcoded too, I think, so anyone trying to create the 'gruesome sentries' from http://wiki.thedarkmod.com/index.php?title=Magic#Necromancy would get sparking animal heads.
VanishedOne

VanishedOne

29.03.2020 19:48

reporter   ~0012322

I found Epifire's camera models in the 2.08 beta. Is everything there to close this? Should it be left open for my and Kingsal's comments just above, or should those get their own tracker entries?
grayman

grayman

29.03.2020 20:14

viewer   ~0012323

I have a working Epi camera in one of my 2.08-dependent WIPs, so the camera works.

I have not implemented any of the suggestions after the Apr 27 2019 note. I don't plan to, and Obs is no longer around, so these suggestions would need to be implemented by someone else, perhaps in 2.09.

grayman

grayman

29.03.2020 20:16

viewer   ~0012324

See attached picture.
camera.jpg (403,035 bytes)
Dragofer

Dragofer

04.02.2021 12:59

developer   ~0013628

Last edited: 04.02.2021 16:27

I've got a working setup of the security camera in an FM, but the version in core TDM is in shambles and impossible to use in a mission. I've decided to look into getting it into a useable, core-grade state.

Edit: this has been solved and can be disregarded.
(The problem that I can't solve is that the camera uses a hardcoded spotlight with the texture lights/biground1. This texture has no falloff image, so there's a hard cutoff to black at the end of the spotlight's range. Since I don't want to modify biground1, which is heavily used in all FMs, I'd like to give the spotlight a custom texture. However, I see no way of modifying this without going into the source code.

It'd be appreciated if a coder could modify Epifire's security camera's spotlight to use a light texture called "lights/spotlight_security_camera" (which I will create) instead of "lights/biground1".
Better yet would be if the mapper were able to modify this texture by changing a spawnarg on the camera, i.e. "texture_spotlight".)
grayman

grayman

04.02.2021 14:46

viewer   ~0013630

I have the camera working nicely in WS6. A camera pk4 with missing bits is included.

I can’t work on it, but can provide the camera pk4 to whoever has the time.
VanishedOne

VanishedOne

04.02.2021 14:54

reporter   ~0013631

Ah, more hardcoded stuff; cf. my comment above. I assume the cameras seen in some released missions are using the built-in spotlight, so it would certainly be best to make the light texture settable via spawnargs (if you add a substantial falloff to the default camera light you might need to check whether those missions have changed enough to need repacking with biground1 set manually).
Dragofer

Dragofer

04.02.2021 16:15

developer   ~0013632

Last edited: 04.02.2021 16:30

Thanks grayman, I already got all the necessary assets from you. For me it's a matter of polishing its implementation to follow existing conventions and be as user-friendly & versatile as possible.

I've meanwhile found a suitable script event to let the scriptobject override properties of the inherent spotlight, using values from spawnargs. I've done the same for the broken skin, and made the lamp toggle upon simple trigger (rather than 3 callobjectfunction entities) and am adding status tracking so that each camera's status can easily be checked by scripts.
Dragofer

Dragofer

04.02.2021 16:21

developer   ~0013633

@VanishedOne it's impossible to use the security camera as it exists in core TDM due to a missing script, so only FM's that have their own copy of the assets from grayman will have this security camera. The question is whether they contain a complete copy, or still partially rely on core assets.
grayman

grayman

04.02.2021 16:32

viewer   ~0013634

Last edited: 04.02.2021 16:33

My pk4 layers on what’s in the core assets. I don’t recall if there are 2.09 sdk changes as well.

Will look tonight
VanishedOne

VanishedOne

04.02.2021 16:39

reporter   ~0013635

There are FMs using func_securitycamera (with the older model I think Biker made), but I don't know whether any uses the "spotLight" spawnarg (which seems to be handled in idSecurityCamera's code) to set up its light. I just checked Hidden Hands: The Lost Citadel and it seems to use a bound light entity instead.
kingsal

kingsal

04.02.2021 17:44

reporter   ~0013636

Ive been using security cameras with the spotLight function. Otherwise they wont change color when they spot the player or alert nor will they turn off when the camera is broken. However, you can't use a custom light texture atm. This should be exposed in the script as a spawnarg for mappers.

OR we should set the script up so it just does everything through the bound light entity set by the mappers. This might actually be better as you you can preview the light in DR and tweak it more easily.
Dragofer

Dragofer

04.02.2021 20:40

developer   ~0013638

@VanishedOne Everything I've done with the scriptobject so far should be compatible with the older security camera in existing FMs. Anyway, I could see no evidence of the old camera spawning a visible light, even though there is a lightOffset spawnarg. The spotLight spawnarg only appears in the newer camera.

@kingsal I've already made the scriptobject override the light texture if one is defined in a new spawnarg. But it seems I'm not able to do much more with scripting, since many light script events don't seem to work on projected lights. Making the light entity accessible to mappers by def_attaching it or making the camera inherit from an electric lamp would be best, but probably require quite some code adjustment.

What's needed most is that the code reads new spawnargs from the camera entity. So far, this could be:
- making the spotlight use "spotlight_dist" instead of "scan_dist"
- making the "broken" particle use "broken_particle" instead of a fixed particle name (sparks).
Dragofer

Dragofer

04.02.2021 20:46

developer   ~0013639

Last edited: 04.02.2021 20:50

A more serious problem is that the camera can be destroyed by broadhead arrows. I believe I could stop broadheads by encasing the camera with a "clip_plusmoveables" mesh so that only splash damage from fire arrows gets through, but for a core-grade AI-like entity this is not particularly elegant.

Edit: a simpler solution might be to def_attach the collisionmesh so that a direct hit of the collisionmesh doesn't count as hitting the camera. Splash damage still works.
VanishedOne

VanishedOne

04.02.2021 21:02

reporter   ~0013640

"spotLight" has existed since Doom 3 (maybe not exposed in the func_securitycamera entityDef): see line 139 at https://github.com/TTimo/doom3.gpl/blob/master/neo/game/SecurityCamera.cpp

What doesn't seem to have existed in id's code is an explicit light shader, so I'm not sure what it would have defaulted to.

Re. damage, yes, I've muttered before about how the Doom 3 approach to damage doesn't lend itself to anything like Thief's SlashStim/BashStim/PokeStim, so anything physically damageable reacts in much the same way to any weapon.
kingsal

kingsal

04.02.2021 22:17

reporter   ~0013641

I actually like that they can be hit by broadheads. Theres so little use for broadheads in the game already. It makes sense that a well placed shot would break the lens.

@dragofer - I say leave it as is for now. I am not able to get the script to adopt my custom light for some reason.
grayman

grayman

04.02.2021 23:38

viewer   ~0013642

Due to ill health I won’t be back on the computer until tomorrow morning, at which point I will send what I found missing from the 2.08 camera support. You can compare my solution with yours and we’ll resolve the missing bits.
Dragofer

Dragofer

05.02.2021 22:08

developer   ~0013655

Last edited: 05.02.2021 22:09

Thanks grayman, it's very much appreciated. I can confirm that the custom version I was working with matches what I extracted from WS:6, so it seems likely no further action is needed from your side.

I've recently realised that I've learned enough about scripting to somewhat comfortably advance to working directly in the C++ source code with this security camera entity. So I believe I can help myself for most of the things that I think still need doing to finalise this asset. The first thing I've done was to add a new script event, getSecurityCameraState(), with rev 9109.

I'll start compiling all potential changes to the security camera in the description of this ticket.
grayman

grayman

05.02.2021 23:11

viewer   ~0013656

Ok, good luck.
Dragofer

Dragofer

08.02.2021 18:23

developer   ~0013668

This ticket can be set to resolved since Epifire's camera has now been fully functional in SVN for a few days, thanks to a .pk4 from grayman and some final touches by myself, i.e. making clipmodels and reorganising how the entityDefs are setup and inherit from each other.

Further changes to security cameras apply to all new cameras equally and will be tracked in 0005528.

Issue History

Date Modified Username Field Change
15.01.2018 14:37 grayman New Issue
15.01.2018 14:37 grayman File Added: security_cam_001_wallpivot.zip
15.01.2018 14:37 grayman File Added: security_camera_001.zip
15.01.2018 14:41 grayman Note Added: 0010016
15.01.2018 14:44 grayman Note Added: 0010017
15.01.2018 14:45 grayman Note Added: 0010018
19.03.2018 16:21 user81 Note Added: 0010097
19.03.2018 19:51 Obsttorte Assigned To => Obsttorte
19.03.2018 19:51 Obsttorte Status new => assigned
26.03.2018 17:39 grayman Target Version TDM 2.07 => TDM 2.06
26.03.2018 17:39 grayman Description Updated
23.04.2018 02:45 grayman Target Version TDM 2.06 => TDM 2.07
23.04.2018 02:45 grayman Description Updated
11.07.2018 10:11 Obsttorte Note Added: 0010667
11.07.2018 11:16 Obsttorte Status assigned => feedback
11.07.2018 11:16 Obsttorte Resolution open => fixed
11.07.2018 13:54 grayman Note Added: 0010671
11.07.2018 13:54 grayman Status feedback => assigned
11.07.2018 14:39 Obsttorte Note Added: 0010672
29.07.2018 10:05 Obsttorte Fixed in Version => TDM 2.07
19.12.2018 20:34 nbohr1more Status assigned => resolved
21.02.2019 18:38 VanishedOne Note Added: 0011644
23.02.2019 08:23 Obsttorte Note Added: 0011647
23.02.2019 08:24 Obsttorte Status resolved => assigned
23.02.2019 08:24 Obsttorte Status assigned => resolved
23.02.2019 08:24 Obsttorte Status resolved => feedback
23.02.2019 08:24 Obsttorte Resolution fixed => reopened
23.02.2019 08:25 Obsttorte Fixed in Version TDM 2.07 => TDM 2.08
23.02.2019 08:34 Obsttorte Note Added: 0011648
26.04.2019 21:04 grayman Note Added: 0011769
26.04.2019 21:04 grayman Status feedback => assigned
27.04.2019 08:58 Obsttorte Note Added: 0011770
27.04.2019 09:14 grayman Note Added: 0011771
09.06.2019 16:35 kingsal Note Added: 0011809
10.06.2019 14:37 VanishedOne Note Added: 0011810
29.03.2020 19:48 VanishedOne Note Added: 0012322
29.03.2020 20:14 grayman Note Added: 0012323
29.03.2020 20:16 grayman Note Added: 0012324
29.03.2020 20:16 grayman File Added: camera.jpg
04.02.2021 12:59 Dragofer Note Added: 0013628
04.02.2021 13:00 Dragofer Note Edited: 0013628
04.02.2021 13:02 Dragofer Note Edited: 0013628
04.02.2021 14:35 Dragofer Assigned To Obsttorte => Dragofer
04.02.2021 14:46 grayman Note Added: 0013630
04.02.2021 14:54 VanishedOne Note Added: 0013631
04.02.2021 16:15 Dragofer Note Added: 0013632
04.02.2021 16:21 Dragofer Note Added: 0013633
04.02.2021 16:27 Dragofer Note Edited: 0013628
04.02.2021 16:30 Dragofer Note Edited: 0013632
04.02.2021 16:32 grayman Note Added: 0013634
04.02.2021 16:33 grayman Note Edited: 0013634
04.02.2021 16:39 VanishedOne Note Added: 0013635
04.02.2021 17:44 kingsal Note Added: 0013636
04.02.2021 20:40 Dragofer Note Added: 0013638
04.02.2021 20:46 Dragofer Note Added: 0013639
04.02.2021 20:50 Dragofer Note Edited: 0013639
04.02.2021 21:02 VanishedOne Note Added: 0013640
04.02.2021 22:17 kingsal Note Added: 0013641
04.02.2021 23:38 grayman Note Added: 0013642
05.02.2021 22:08 Dragofer Note Added: 0013655
05.02.2021 22:09 Dragofer Note Edited: 0013655
05.02.2021 22:17 Dragofer Resolution reopened => open
05.02.2021 22:17 Dragofer Fixed in Version TDM 2.08 =>
05.02.2021 22:17 Dragofer Target Version TDM 2.07 => TDM 2.10
05.02.2021 22:17 Dragofer Description Updated
05.02.2021 22:17 Dragofer Additional Information Updated
05.02.2021 22:19 Dragofer Description Updated
05.02.2021 22:19 Dragofer Additional Information Updated
05.02.2021 23:11 grayman Note Added: 0013656
06.02.2021 18:39 Dragofer Additional Information Updated
06.02.2021 18:39 Dragofer Relationship added related to 0005528
08.02.2021 18:23 Dragofer Status assigned => resolved
08.02.2021 18:23 Dragofer Resolution open => fixed
08.02.2021 18:23 Dragofer Fixed in Version => TDM 2.10
08.02.2021 18:23 Dragofer Note Added: 0013668
09.02.2021 22:07 Dragofer Relationship added related to 0005531