• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Light effect direction

Messages
107
Country
portugal
Hi

I'm doing something wrong for sure.

I have this result:

A1.JPG



The effect is center on the pole, but projections is not and looks like that have an boundary at one of the sides.
Basically, it was placed with MCX like this:

A3.jpg



Looks like that is pointing more to one side than another.
The effect is:

Code:
[Library Effect]
Lifetime=5
Version=2.00
Display Name=MCX light
Radius=-1
Priority=0

[Properties]
Spot=1
Tower=1
Map=1

[Emitter.0]
Lifetime=0.50, 0.50
Delay=0.00, 0.00
Bounce=0.00
Rate=1.00, 1.00
X Emitter Velocity=0.00, 0.00
Y Emitter Velocity=0.00, 0.00
Z Emitter Velocity=0.00, 0.00
Drag=0.00, 0.00
X Particle Velocity=0.00, 0.00
Y Particle Velocity=0.00, 0.00
Z Particle Velocity=0.00, 0.00
X Rotation=0.00, 0.00
Y Rotation=0.00, 0.00
Z Rotation=0.00, 0.00
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
Pitch=0.00, 0.00
Bank=0.00, 0.00
Heading=0.00, 0.00

[Particle.0]
Lifetime=0.000000, 0.000000
Type=28
X Scale=100.00, 100.00
Y Scale=100.00, 100.00
Z Scale=0.00, 0.00
X Scale Rate=0.00, 0.00
Y Scale Rate=0.00, 0.00
Z Scale Rate=0.00, 0.00
Drag=0.00, 0.00
Color Rate=0.00, 0.00
X Offset=0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 0.00
Fade In=0.00, 0.00
Fade Out=0.00, 0.00
Static=1
Face=0, 0, 0

[ParticleAttributes.0]
Color Start=255, 255, 255, 0
Color End=255, 255, 255, 10
Bounce=0.00
X Scale Goal=0.00
Y Scale Goal=0.00
Z Scale Goal=0.00
Falloff Exponent=2.00
Inner Cone Angle=75.00
Outer Cone Angle=85.00



Anyone can joke with my face!!! :) What I'm doing wrong?


Regards
MC
https://www.facebook.com/Sim3dge/
 
Messages
7,418
Country
us-illinois
Hello:

Is the Effect (*.Fx) file attached to a MDL via an AttachPoint ?

...and:

If so, did you also allow MCX to utilize Draw Call Batching ?


If both are true, this can cause display positioning offset at run time for a Effect (*.Fx) attached to a MDL via a AttachPoint :alert:


* The lower the altitude AMSL, the lesser the displayed Effect offset

* The higher the altitude AMSL, the greater the displayed Effect offset


If the above factors apply, try exporting the MDL with attached Effect from MCX without Draw Call Batching ;)

GaryGB
 
Last edited:
Messages
107
Country
portugal
Hi GaryGB

Thank you for helping.

Now, I'm attaching the effect to the exported X file through the ModelConverterX.
I even tried with AttachPoint.

You are correct, the Draw Call Batching was active, but even so did not solve. :( I was not aware of this parameter, thanks you so much.

The look of the projection of the light on the ground and objects like a focus light slightly pointing to one direction, but with attach point I'm using the Y axel perpendicular to the groud and on MCX the same.
Is not my machine that have this behavior because my beta testers also see the same result.

What can be this?

Best regards
Mário
https://www.facebook.com/Sim3dge/
 
Messages
7,418
Country
us-illinois
Are you using a textured face at the bottom of a 3D light 'cone' to create the light splash on the ground ?

...and:

Are you using a texture from an angled light on that face to create the light splash on the ground ?


If both are true, that may be the cause of the apparent offset.


In that case, try a perfectly circular light splash texture so it does not look like it is cast from a 'angled' light.

GaryGB
 
Messages
107
Country
portugal
Hi

No, the ground is a plane with tarmac texture, without night texture. The light splash is from dynamic light effect.
Basically is that effect presented on top and attached with MCX with Y axel (green) faced down as the picture show.

I will share the scenery today even with the lights like that. If you want you can test a check the result?

Beste regards :)
Mário
https://www.facebook.com/Sim3dge/
 
Messages
7,418
Country
us-illinois
Hi again:

Although your OP for this thread does not state the version of FS in which this scenario is being seen, now that you have indicated that you are using a "Dynamic Light Effect", IIUC that is only available to be created / displayed in latter P3D versions.

I do not yet have P3D to test with, so I would be unable to test the new *.Fx in P3D at run time.


However, AFAIK, for purposes of "spotlight" Effects, the same general principles apply in P3D as they do in FSX with regard to the Effect object being susceptible to an apparent "angled" display on the ground ...if the Effect object parameters for Pitch, Bank, and Heading modify the default projection 'axis' for the spotlight within the *.FX file code itself:

https://www.prepar3d.com/SDKv4/sdk/modeling/special_effects/special_effects_overview.html#Emitter Tab

https://www.prepar3d.com/SDKv4/sdk/modeling/special_effects/special_effects_overview.html#Emitter



It is possible that one may find it particularly useful to toggle "ON" Align to Ground (a 'Particle' parameter value) ...in the Effect *.Fx file:

https://www.prepar3d.com/SDKv4/sdk/modeling/special_effects/special_effects_overview.html#Particle Tab

https://www.prepar3d.com/SDKv4/sdk/modeling/special_effects/special_effects_overview.html#Particle

"Item:

Align to Ground

Description:

If this is checked the particle will be rendered parallel to the ground surface.
This is for such effects as wake, rotor wash, burn marks, and similar ground effects.
If this box is checked the Facing options become inactive (Pitch, Bank and Heading)."

Effect File Parameter:

Ground Normal=1 (Default)


NOTE: Use of the above parameter value of "1" turns that attribute "ON" ...in an attempt to forcae a symmetric light splash onto the ground



Also, check ex: MCX *.X file XML Pitch, Bank, and Heading orientation code when attached to an AttachPoint on a MDL.

Additionally, be sure to verify MCX' own XML orientation coding for Effect *.Fx file attachment on the AttachPoint in the MDL's *.X file. :pushpin:

https://www.scenerydesign.org/2017/12/dynamic-lighting/



BTW: If you test display of this P3D "Dynamic Light Effect" *.Fx file via insertion of its Effect XML 'placement' code within source code of a BGLComp-compiled placement BGL, you should be able to more clearly discern what is causing the 'off-axis' issue:

* The Effect *.Fx coding itself

...versus:

* MCX' AttachPoint orientation parameter value settings

If the above MCX' AttachPoint orientation parameter value settings are correct in MCX' Attached Objects Editor, you can configure MCX Options to save *.X files to inspect AttachPoint coding after compiling a MDL with attached Effect *.Fx. ;)


NOTE: In MCX' Attached Objects Editor, MCX' AttachPoint orientation parameter terms used are (...'legacy' ? :scratchch ) syntax:

"Heading, Pitch, Roll" (motion-related) ...rather than the current FSX / P3D SDK syntax of: Heading, Pitch, and Bank (for 'static' objects ?)

MCX_Attached_Objects_Editor_AttachPoint_Effect_Spotlight_Orientation_Parameters.jpg


https://en.wikipedia.org/wiki/Axes_conventions

https://en.wikipedia.org/wiki/Flight_dynamics



If you need info on how to directly place an Effect *.Fx via placement code within a BGLComp-compiled placement BGL, please feel free to inquire further in another reply here. :)



FYI: You can try testing display of the above custom "Dynamic Light Effect" *.Fx file interactively as you try out various parameter values with a live preview at run time within P3D by directly loading the *.Fx file into the P3D SDK Visual FX Tool. :idea:


NOTE: This can only be done after enabling visualfx.dll in your 'active' copy of the DLL.XML file, and re-starting P3D.

http://www.prepar3d.com/SDK/Environment Kit/Special Effects SDK/Creating Special Effects.html#FX Setup

https://www.prepar3d.com/SDKv4/sdk/modeling/special_effects/special_effects_overview.html

https://docs.microsoft.com/en-us/previous-versions/microsoft-esp/cc526969(v=msdn.10)



PS: Some topically-related links: :coffee:

https://www.fsdeveloper.com/forum/threads/ramp-light-effect-dynamic-lighting.440528/

https://www.avsim.com/forums/topic/513007-mytraffic6a-aircraft-model-lighting/


Hope this helps a bit more. :santahat:

GaryGB
 
Last edited:
Top