2019-07-17 17:41 EDT


View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002023FSSCPcamera codepublic2019-05-03 11:09
Reporterchief1983 
Assigned ToAdmiral MS 
PriorityhighSeverityminorReproducibilityN/A
StatusassignedResolutionopen 
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

-Relationships
+Relationships

-Notes

~0011249

chief1983 (administrator)

Changing to a new category I made.

~0012338

Goober5000 (administrator)

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 (developer)

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 (administrator)

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 (developer)

Last edited: 2013-04-21 07:06

View 3 revisions

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 (administrator)

That is interesting to note, thanks for looking into that.

~0015145

Goober5000 (administrator)

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 (administrator)

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 (developer)

Bumping target.

~0016927

kevlevrone (reporter)

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.
+Notes

-Issue History
Date Modified Username Field Change
2009-11-09 23:40 chief1983 New Issue
2009-11-12 02:04 chief1983 Note Added: 0011249
2009-11-12 02:04 chief1983 Category cutscenes => camera code
2010-08-05 16:07 chief1983 Target Version 3.6.12 RC1 => 3.7.2
2010-08-29 01:08 Goober5000 Note Added: 0012338
2012-02-23 23:41 Echelon9 Note Added: 0013350
2012-02-23 23:41 Echelon9 Status new => feedback
2012-02-24 22:18 Goober5000 Note Added: 0013360
2013-04-21 07:04 Admiral MS Note Added: 0014941
2013-04-21 07:04 Admiral MS Note Edited: 0014941 View Revisions
2013-04-21 07:06 Admiral MS Note Edited: 0014941 View Revisions
2013-04-21 10:49 chief1983 Note Added: 0014943
2013-04-21 10:49 chief1983 Status feedback => new
2013-06-23 18:17 Goober5000 Summary Camera 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:17 Goober5000 Description Updated View Revisions
2013-06-23 18:17 Goober5000 Additional Information Updated View Revisions
2013-06-23 18:19 Goober5000 Note Added: 0015145
2014-06-29 18:53 Goober5000 Note Added: 0015935
2014-06-29 18:53 Goober5000 Assigned To => Admiral MS
2014-06-29 18:53 Goober5000 Status new => assigned
2015-04-16 00:24 Goober5000 Target Version 3.7.2 => 3.7.4
2016-03-23 06:03 MageKing17 Note Added: 0016819
2016-03-23 06:03 MageKing17 Target Version 3.7.4 => 3.8
2019-05-03 11:09 kevlevrone Note Added: 0016927
+Issue History