Visual Effects API

Here are a few things we’d love to see from a Visual Effects API

  • Ability to Create an effect
  • Ability to Attach it to a SimObject, Attach Point or fixed in the world with a Lon/Lat/Alt as well as PBH
  • Ability to Update an effect (to change its location, intensity or parameters)
  • Ability to Destroy an effect

+ 1 on this… It will increase the flexibility to work with effects much
further, not only for aircraft but also with many other scenario types of
effects which are needed even for training purposes. For example fire
extinguish services, emergency simulations, etc. In addition by allowing to
create an effect via SimConnect we are able to exploit all the SimVars, L:vars
and many other variables of the simulator. This would save the need to expose
L:VARS to the graphic FX tool since we can access anything and just inject
effects. Regards, Simbol

Hello, Given all the additions that have been made to the Visual Effects
Editor since June 21, does this idea remain relevant? If so, could you please
explain exactly what you’re trying to achieve? It is already possible to
attach FXs to objects that are not aircraft. And we started working on a huge
(and long) revamp of the missions system. It will likely integrate logic
triggers for FXs. But I can’t share an ETA yet. Have a good day,

Hi Alyzee, Thanks for asking, I feel we still need the API. Let me explain:
What we are looking for is to develop packages of effects that we can install
on other 3rd party products, for example we could develop an special effect
for airplanes that could trigger under our own conditions. In order to achieve
that currently we would have modify the original model behavior .XML file,
which is not posible for many reasons… so what we would like to be able to do
is to inject these effects into the simulator via our own modules without the
need to modify other 3rd party developers add-ons. So what we are looking to
do for example is to prepare a set of effects packages, a custom WASM module
or SimConnect app and use this to inject the effects as we need. This is a
video of what we have done via this route for other platforms: There we are injecting our own
effects into the PMDG 777, it is done in P3D via SimConnect using a function
called CreateEffect… so we can put these effects directly in the sim without
having to modify anything of the PMD 777 product. If you have any questions
please let me know. Regards, Raul

It is already possible to attach FXs to objects that are not aircraft. Hi
Alyzée, If I understand correctly, the VFX SDK only allows attaching an
effect to a pre-existing object, whether by node name, or by pre-defined
property index as found in the .cfg files (like the contact points). The
object can be an aircraft or a static mesh. There is also a facility to use
a few pre-defined simvars as value input into an effect but I’m not sure
this can serve to “place” the emitter and it is only offering a short list
of pre-defined simvars only. Answering your question: this is one additional
reason for the need for an API in order to be able to place the emitter from
code, not from pre-existing object nor from pre-existing pre-defined list.

Well, you can always use a dummy Simobject with no geometry ( maybe some tiny
dummy triangles with flipped normals or a an invisible material, so you can
control the main object LOD size ), attach the effect there, and use some
behavior logic over the node to make it appear/disappear based on conditions
and/or Simconnect to place/move the object as required. You can even pass
parameters you might have calculated with some external logic to the effect
itself with the graph parameter feature, so I’d say while not 100% the same of
having an API, it’s functionally equivalent.

It doesn’t work well really, many effects will fails to follow to correct
heading, angle, and velocity of the target (airplanes for example) during many
conditions… We need the emitter’s to inherit correctly the target object
speed, orientation and many other conditions. Trying to do this ourselves by
injecting objects as you suggest (a nice idea btw) would generates a big
overhead to Simconnect for the products that we wish to bring to MSFS.
Specially because we can only Inject dummy objects as AI models, we cannot
even attach things as an attachment to a SimObject… Best, Raul

Yes, you now can have attachments to a SimObject, check the new feature, it’s
new for SU9 and it’s very interesting.

Where I can read about this? is this the new submodeling feature? if so, this
new feature would not help us… we need means to attach an effect without
having to edit the model behavior files. In hence the need for an API to
inject these in a more modern fashion like we used to do with P3D. Best, Raul

No, it’s not the submodel merging, it’s the new attached objects feature, and
it’s documented in the latest SDK, check the release notes. I understand you
want to attach to objects you haven’t made yourself, for that it would be best
having an “Attach” API but from what I can see, Asobo doesn’t seem very keen
to add any new APIs, at least not in the short term, which is unfortunate,
because it makes WASM a 2nd-class citizen that is being seen just as a way to
reuse existing C++ gauge code, when in fact it could do so much more, if it
had access to a more complete API that wasn’t so strictly gauge-oriented. So,
at this time, the only thing you might use to do what you need, is to create
an empty dummy Simobject, eventually attach effects or other stuff to it, and
keep it glued to the target Simobject using Simconnect, by copying its
lat/lon/alt/pitch/bank/heading variables to your object at every frame. Yes,
it’s extra work and yes, it will spam Simconnect with unnecessary traffic,
especially if you have lots of attachments to make, but considering the
suggestion for an “Attach API” has been already marked with “won’t do”, I’m
afraid you’ll have to work with what we have. It’s a pity because, it’s clear
the attach feature is there in the sim, considering we can now use it in a
custom behavior, and the sim has used it since it came out, to attach pilots
to vehicles, it’s just missing to be exposed through Simconnect to make it
even more flexible.

Right thanks, yea copying lat/lon/alt/pitch/bank/heading, etc. will cause
severe lags with many of the effects we create via the immersion packages… in
hence the request for an effect API. I will wait for Asobo to evaluate our
request, hopefully they can see the advantage of being able to attach / inject
effects to the simulator without the need to having to edit the model
behaviour file. All the best, Raul

Hello everyone, We were reviewing this idea and have some questions. It
appears to us that most of the features listed by
@runshotgun are already available. Spawning and
stopping an effect can already be done through FX_CODE and updating it
programmatically can be done using FX_GRAPH_PARAM_X. Do we understand
correctly that these requests apply to the case were the effect wouldn’t be
attached to a SimObject, but as described in your second point, spawned in the
world independently from any SimObject?
@SonantAlpaca FYI Regards, Sylvain

The current system is very flexible to design effects around our own
aircraft. Getting the ability to spawn effects on other SimObjects (part of
sceneries or AI aircraft) without editing the aircraft’s already compiled xml
files would be great. This is something the FX editor is able to do and
something we would love to get access to somehow. Hence my “Ability to Attach
it to a SimObject” request. Since it would be difficult/impossible to
manage such logic in XML, an alternative would be to get the ability to inject
our own behaviors on an existing aircraft from a separate package without
having to override any existing XML file. That would solve all the issues we
face right now and would enable a lot more customization options even outside
of visual effects. Thank you for following up on this!

It’s done in the xml because it depends on node names, active LOD, etc… The
easiest way to do this, if we were to expose a method to spawn effects
independently from any SimObject, would be to use SimConnect methods to
request data about SimObjects and position your effect using a local offset
from reference datum. Would such a design cover your needs?

Most times we would know the node name we want to attach to. If we’re able to
also specify a Node that way, absolutely yes! Attaching an effect to the wing
tip of an aircraft with wing flex for example is impossible if we can only
attach to the datum.