Emitter Offset

GaryGB

Hi Larry:

I was wondering if you have seen a correlation of the MSFS Effect (*.Fx) axes with the DirectX coordinate system used in MDLs via .'X'-files ?

https://msdn.microsoft.com/en-us/library/cc526969.aspx#EffectsFileFormat

https://msdn.microsoft.com/en-us/library/cc526973.aspx#CoordinateSystems

https://msdn.microsoft.com/en-us/library/windows/desktop/bb324490(v=vs.85).aspx

http://en.wikipedia.org/wiki/Cartesian_coordinate_system

< Speaking of "Hand Rules", now for a brief "comedy relief": >

Arno would likely be much more 'handy' with "3D handed-ness", of course; but generally speaking, 3D modeling applications are "right-handed".

By contrast, 3D world rendering systems (ex: Sim / Game engines ...including MSFS via Direct3D) are "left-handed"

Sketchup is a "right-handed" 3D Modeling application.

See Page 3 in: http://web.engr.oregonstate.edu/~mjb/sketchup/sketchup.6pp.pdf

NOTE: Some default and 3rd party Sketchup import / export Ruby plugin scripts have "options" to swap certain X,Y,Z 3D object coordinate axes.

[EDITED]

The MSFS 3D world rendering coordinate system explained:

https://msdn.microsoft.com/en-us/library/cc707102.aspx#AppendixI

"
The Coordinate System, Basic Principles
The coordinate systems used in ESP <...and FSX ?> are left-hand, 3-D, and rectilinear. Objects are located in X,Y,Z 3-D space and are moved in the X,Y, and Z directions using translation. The following table describes how this directional translation of an object occurs in the world as well as on the screen."

[END_EDIT]

BTW
: I am curious if you have done any interactive tests in a live ex: FSX session with using the SDK "Special Effects Tool" to set "The distance that the emitter is offset from its point of origin in the X, Y, and Z directions" ...as documented here:

https://msdn.microsoft.com/en-us/library/cc526969.aspx#TheFXToolDialog

An example of working with the SDK "Special Effects Tool":

GaryGB

Last edited:

L_Rob

Hi Gary,
Thanks for the link regarding coordinate systems; I've never played with .x files or anything more complicated than what I mentioned. I've tried the special effects tool but it's of little use for designing wakes in part because you can't really see the effect from a distance. Another significant deficiency is that you can't adjust the x and y scale rates independently. From memory, I think the tool works as follows. It nominally places the datum of the effect at the datum of whatever viewing platform you are using, say Orbx Bob. Plus z would be going straight away from the camera. You can temporarily offset the emitter x, y and z up to 50 meters from this spot. This is not the same as offsetting the emitter using the x y or z offset = in the emitter section of the fx file.

I recently updated my annotated version of the effects SDK to reflect my current understanding. A few of my previous thoughts were wrong, and there are still probably errors left. http://1drv.ms/1pHWpmG
Arno's FXE is much more convenient for me. However with FXE emitter offsets don't show; particle offsets do and this can get confusing as they can have different representations. I've confirmed that P3D v2.5 recognizes both emitter and particle offsets, something that at one time I was not sure of.
For me, the most reliable way of editing wake effects is to attach them to a pilotable boat. Then you can view them from any angle you want in slew mode.
And then you can edit the effect, save it and reload the 'aircraft' using hotkeys that you assign.

GaryGB

Thanks for sharing your insights via the "Annotated" Special Effects SDK document.

I agree that testing in a live FS flight session is the best way to determine exactly what the rendering engine is going to do with Effects, whether displayed via an AttachPoint, or indirectly via Aircraft.Cfg or Sim.Cfg files (regardless of uncertainly as to what one might get from use of SDK parameters versus actual display anomalies ...due to run time rendering "bugs" currently suspected to be in the MSFS code base).

IIRC, when testing with the Special Effects Tool, there are ways to set one's custom viewpoints at a distance from the Datum for a "pilotable" SimObject (such as the FinneyGround CH+, OrbX "Bob" etc.) via "camera" edits to the SimObject's Aircraft or Sim Cfg file:

Alternatively, one may set the Virtual Cockpit mode "EyePoint" at a distance from the SimObject's default with manual keyboard shortcuts, or via a special camera utility such as EZ-Dok and/or ex: Gunnar Daehling's "FSX WheelCam Utility v2.4".

One might also consider comparing Effect (Fx) display "offset" behavior via parameters with that of the same Effect displayed via AttachPoints and Aircraft / Sim Cfg files ...when placed at a static 'position' by means of a BGLComp XML placement BGL file:

https://msdn.microsoft.com/en-us/library/cc526969.aspx#Step1CreateanXMLFile

BTW
: I was compelled to refresh my memory of parameter options via settings and [Tabs] in the Special Effect Tool GUI; Fx SDK doc says:

https://msdn.microsoft.com/en-us/library/cc526969.aspx#MainDialog
Main Dialog > Offset x,y,z
This allows the special effect to be moved from its actual position to a better position simply for viewing while being edited. The range of each of the options is -50m to +50m.

https://msdn.microsoft.com/en-us/library/cc526969.aspx#ParticleTab
[Particle n tab] > Offset x,y,z
The distance that the emitted particles are offset from the emitter in the X, Y, and Z directions. These parameters can be combined with the Emitter Rotation parameters to create swirling particle effects. They can also be used to spread particles out over an area.

https://msdn.microsoft.com/en-us/library/cc526969.aspx#EmitterTab
[Emitter n tab] > Offset x, y, z
The distance that the emitter is offset from its point of origin, in meters

FYI: I stumbled across these apparently related threads today, in case you have not yet seen them:

Hope this info might prove helpful in the future for you and other readers.

GaryGB

Last edited:

L_Rob

In making a rise and fall bow wave I finally decided that because of the complex interrelationship between emitter offsets, particle offsets, emitter pitch, bank and heading, emitter velocity and particle velocity the only way to figure out what's actually going to happen is to create a spreadsheet. It's just trig, but it's so easy to get a sign wrong, that sort of thing when doing it by hand. And once I got the spreadsheet set up properly based on the definitions I posted, it does predict just what I see in the sim. Incidentally, there is one other key aspect in figuring out what will happen; once emitted, particles or tiles are dropped like a string of bread crumbs. They have no inertia so to speak, and what happens to them is independent of how fast the object to which the emitter was attached is moving.

Incidentally, one of the links you have above mentioned something about acceleration constants in the sim.cfg. I've got some ideas about what those really do in a quantitative sense but that should be in a separate post. While I think of it, do you know of a way to record the speed of an AI object like a boat second by second? With that I could check my guess of how the accel /decel constants work.

Last edited:

GaryGB

Incidentally, there is one other key aspect in figuring out what will happen; once emitted, particles or tiles are dropped like a string of bread crumbs. They have no inertia so to speak, and what happens to them is independent of how fast the object to which the emitter was attached is moving.
I haven't test the "Bow Wave" types of Effect yet in the Special Effect Tool, but I'm wondering if they might be assigned some additional "splashing" physics by analyzing the code for trajectory, 'drag', 'bounce', and 'jitter' behavior of:

* particles in some of the MSFS default "Fireworks" Fx files

...and:

* default "dirt clods" Effect specified in the ex: Aircraft.Cfg /Sim.Cfg which displays behind wheels when the SimObject is on ground and rolling

Also, perhaps the rate at which "Bow Wave" Effect particles "drop" might be slowed and/or cycled via variable Particle "Temperature" attributes ?

* Increased Temp = Particle Altitude progressively increases (-with increased rate of "rise" / decreased rate of "drop" also ?)

* Decreased Temp = Particle Altitude progressively decreases (-with increased rate of "drop" / decreased rate of "rise" also ?)

Note
: Finding an exact 'mid-point' (ex: "107") for the Temperature parameter may allow an effect to "float" rather than drop over time (with the allocated time for ongoing display of that 'floating' Effect being controlled by other Fx parameters, of course)

https://msdn.microsoft.com/en-us/library/cc526969.aspx#ParticleTab
[Particle n tab] > Temp

The temperature of the particles, which defines how fast they rise or sink. To approximate room temperature, where particles neither rise nor sink, set Temp to 107 degrees. To make the particles rise, specify a temperature greater than 107; to make the particles sink, specify a temperature less than 107.

[Particle n tab] > Temp Rate

The rate at which the particles cool or heat up. A negative value represents temperatures that are cooling. The faster particles cool, the sooner they fall back to the ground. A positive value represents temperatures that are rising. The faster particles heat up, the sooner they accelerate into the sky.

Incidentally, one of the links you have above mentioned something about acceleration constants in the sim.cfg. I've got some ideas about what those really do in a quantitative sense but that should be in a separate post. While I think of it, do you know of a way to record the speed of an AI object like a boat second by second? With that I could check my guess of how the accel /decel constants work.

Not yet having tested the "Bow Wave" types of Effect in the Special Effect Tool, I'm uncertain as to whether they will "extrude" from a RefPoint when placed at a static 'position' (on a water body) by means of a BGLComp XML placement BGL file ...when a Wind at a specified constant speed is applied in assigned Weather for a flight session and at a specified "Simulation Rate" ...via edited "Saved" Flight (*.FLT) and Weather (*.Wx) files:

I'd otherwise consider how one might log the effective speed of a SimObject per unit of elapsed time via ex: FSUIPC offsets or SimConnect.

I'm not certain, but one may be able to "fly" a AI aircraft (watercraft) at a specified speed, record its internal FS track & speed data with FSRecorder, and play it back while testing various Effects attached to the SimObject itself via its Cfg file ...in a live FS 'flight' session:

http://www.fs-recorder.net/

It is possible one could also use Game Cam to record a video of the FSRecorder "playback" in a live FS 'flight' session, and then play back the video while analyzing the frames using a MPEG or DivX-compatible media player capable of variable speed, freeze-frame, with FPS statistics and a elapsed time counter displayed on-screen.

http://v2.planetgamecam.com/

Alternatively, possibly Sim Object Display Engine (aka "SODE") might be used to set up a controlled test scenario ?

http://www.fsdeveloper.com/forum/forums/simobject-display-engine.143/

Hope this might help a bit more !

GaryGB

Last edited:

L_Rob

Thanks Gary,
The bow wave is one I have concocted from scratch using a custom bmp transparency based on a photo of a real Washington State Ferry bow wave. It uses a lot of the variables you mention; temp, temp rate, and drag and independent x and y scale rates. At some point I will try to work in bounce for a wave parallel to the long axis of the boat, but it's not something that works for the bow wave that uses a substantial scale rate. The bouncing wave would get too far away from the boat.
Once I got the effect to look OK in FXE, the problem was to position one on each side of the bow just a little distance from the waterline and parallel to the hull at that point, and because the boat is moving, having the tile move so it does not get run over while it expands and yet have the leading edge of the expanding tile stay roughly the same distance from the bow and close to the hull. That's why I needed the spreadsheet!

Thanks for the different ideas on recording AI speeds. What I want to do is measure the acceleration of an AI boat as it starts, stops and slows at waypoints. A little off topic, but the idea is that the behavior of the boat is governed by the lesser of what is dictated by the time constant or the max acceleration /deceleration. The latter should be straightforward. I should never find the AI boat exceeding these values. The effect of the time constant not as clear at this point. My guess is that the time constant would have the same meaning as it's used in exponential decay problems--- but there might be a scaling factor. If there is no scaling, a likely possibility for deceleration from a constant speed is that the velocity at time t is the initial velocity times e^(-t/time constant). If this is true then I can predict how the boat will react based on those values in the sim.cfg.

[edited to add] a brief look at the SDK for the P3D recorder looks like it will do exactly what I need, on a per sim object basis even up to a per frame basis. Thanks for pointing me in the right direction Gary.

Last edited:

GaryGB

Glad that might assist with your further exploration and documentation of MSFS Effects.

Thanks for sharing your inquiries and findings, as implementation of Effects have historically been rather under-utilized in add-ons; perhaps we might see more developers innovate enhanced and/or new Fx files ...to help make FS become even more realistic and sensational.

PS: I updated one of my posts above: