Source Code Project Mantis - FSSCP
View Issue Details
0002023FSSCPcamera codepublic2009-11-09 23:402019-05-03 11:09
Reporterchief1983 
Assigned ToAdmiral MS 
PriorityhighSeverityminorReproducibilityN/A
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version3.6.11 
Target Version3.8Fixed in Version 
Summary0002023: Additional tools and/or help needed for camera coordinate systems
DescriptionBug retitled/redescribed due to Admiral MS's information (see "additional information" section and his ticket comment).

More specifically, not all of the coordinate systems in FRED align with the camera and orientation code. More documentation and user interface enhancement needs to be done to allow users to operate with the two different coordinate systems without getting confused. They might assume that lessons in one system can be applied to the other, where this is not necessarily the case.

It would be nice to provide a FRED widget to calculate/convert between one coordinate system and another.
Additional InformationAdmiral MS said the following:

I took a look at this and there seems to be no difference between camera and ingame coordinate systems:
- I found no transformation anywhere in camera code that would change something from the ingame coordinates
- Using a script to display Position and Orientation of a ship and its camera revealed them to be identical (scripting includes no tranformations)
- FRED uses the same axes that are used ingame

What I found:
- The background editor in FRED uses a completely different definition of pitch bank and heading that doesn't align with ingame coordinates
- The input of set-object-orientation is defined as going from 0 to 360° for pitch, bank and heading while ingame these have different ranges (heading and bank: -90° to 270°, pitch: -90° to 90° to -90°)
- Guessing an orientation for a random direction and bank angle is nearly impossible in the system used, it has to be calculated
- Before the camera code and scripting were added set-object-orientation was the only sexp that allowed to modify the actual object orientation, so people may have a wrong idea of how the orientation works


Obiously there is a chance I missed something - I didn't check every single line of code that is somehow related to cameras.
TagsNo tags attached.
Attached Files

Notes
(0011249)
chief1983   
2009-11-12 02:04   
Changing to a new category I made.
(0012338)
Goober5000   
2010-08-29 01:08   
To elaborate, the X, Y, and Z axes don't correspond with the X, Y, and Z axes defined by the game or FRED.

Chief, you'll need to go ahead and assign this to somebody because it'll have to be fixed before use of the camera code becomes more widespread.

And before you assign it to me, please note that I haven't had time to look at it in the past eight months. :p
(0013350)
Echelon9   
2012-02-23 23:41   
Is this still a present issue?

I've seen plenty of uses of the camera system since 2010, is there an employed system of getting around this issue if it still exists by FREDers?
(0013360)
Goober5000   
2012-02-24 22:18   
It's still an issue, because the coordinate axes haven't changed.

What this needs is documentation to explain exactly what the axes correspond to. And maybe a mod.tbl setting to control whether or not the axes line up with the FRED axes.
(0014941)
Admiral MS   
2013-04-21 07:04   
(Last edited: 2013-04-21 07:06)
I took a look at this and there seems to be no difference between camera and ingame coordinate systems:
- I found no transformation anywhere in camera code that would change something from the ingame coordinates
- Using a script to display Position and Orientation of a ship and its camera revealed them to be identical (scripting includes no tranformations)
- FRED uses the same axes that are used ingame

What I found:
- The background editor in FRED uses a completely different definition of pitch bank and heading that doesn't align with ingame coordinates
- The input of set-object-orientation is defined as going from 0 to 360° for pitch, bank and heading while ingame these have different ranges (heading and bank: -90° to 270°, pitch: -90° to 90° to -90°)
- Guessing an orientation for a random direction and bank angle is nearly impossible in the system used, it has to be calculated
- Before the camera code and scripting were added set-object-orientation was the only sexp that allowed to modify the actual object orientation, so people may have a wrong idea of how the orientation works


Obiously there is a chance I missed something - I didn't check every single line of code that is somehow related to cameras.

(0014943)
chief1983   
2013-04-21 10:49   
That is interesting to note, thanks for looking into that.
(0015145)
Goober5000   
2013-06-23 18:19   
Ticket rewritten based on Admiral MS's discovery. Many thanks to him for transforming the problem from something vague and poorly specified to something concrete.

(And yeah, I should have done this updating back in April. :p)
(0015935)
Goober5000   
2014-06-29 18:53   
Since Admiral MS is now a developer, I'm assigning this to him to see if he'd be willing to take a stab at squashing it.
(0016819)
MageKing17   
2016-03-23 06:03   
Bumping target.
(0016927)
kevlevrone   
2019-05-03 11:09   
So I've uploaded a simple patch that adds the missing line from the above link, plus a couple of minor tweaks on the parsing side. https://goo.gl/KyvnZF
This (plus fixing the provided POF to use submodel names instead of numbers) makes the example work, but still has the worrisome potential performance issues brought up in the previously linked thread.

Issue History
2009-11-09 23:40chief1983New Issue
2009-11-12 02:04chief1983Note Added: 0011249
2009-11-12 02:04chief1983Categorycutscenes => camera code
2010-08-05 16:07chief1983Target Version3.6.12 RC1 => 3.7.2
2010-08-29 01:08Goober5000Note Added: 0012338
2012-02-23 23:41Echelon9Note Added: 0013350
2012-02-23 23:41Echelon9Statusnew => feedback
2012-02-24 22:18Goober5000Note Added: 0013360
2013-04-21 07:04Admiral MSNote Added: 0014941
2013-04-21 07:04Admiral MSNote Edited: 0014941bug_revision_view_page.php?bugnote_id=14941#r493
2013-04-21 07:06Admiral MSNote Edited: 0014941bug_revision_view_page.php?bugnote_id=14941#r494
2013-04-21 10:49chief1983Note Added: 0014943
2013-04-21 10:49chief1983Statusfeedback => new
2013-06-23 18:17Goober5000SummaryCamera coordinate system for WMC's camera code doesn't align with anything => Additional tools and/or help needed for camera coordinate systems
2013-06-23 18:17Goober5000Description Updatedbug_revision_view_page.php?rev_id=565#r565
2013-06-23 18:17Goober5000Additional Information Updatedbug_revision_view_page.php?rev_id=567#r567
2013-06-23 18:19Goober5000Note Added: 0015145
2014-06-29 18:53Goober5000Note Added: 0015935
2014-06-29 18:53Goober5000Assigned To => Admiral MS
2014-06-29 18:53Goober5000Statusnew => assigned
2015-04-16 00:24Goober5000Target Version3.7.2 => 3.7.4
2016-03-23 06:03MageKing17Note Added: 0016819
2016-03-23 06:03MageKing17Target Version3.7.4 => 3.8
2019-05-03 11:09kevlevroneNote Added: 0016927