• 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.

Offsets, Opacity, etc.

Messages
194
Country
unitedstates
I am working on a new effect that I have a couple of glitches in. Perhaps someone else has already solved the problem, because the SDK is lacking in detail.

The effect is to simulate boarding passengers. I created bitmaps of people (similar to the chickens in the fx_Barnstrm effect). The controller triggers when the plane is x distance from the ramp. The emitter turns on and generates 1 static particle (person). The lifetime of the particle is set to give you time to taxi to the ramp and open the door, then the person disappears, to simulate having boarded the plane. Kinda cool! That part works pretty well, just a matter of controller time+emitter time+particle time. The two problems I don't be able to solve are:

1. Offset. When I add the x or z offset for the second passenger, they still both remain "stacked" together. I would like them a meter or so apart. Is this because it is a static particle? I have tried the offset in both the emitter and particle, but it doesn't seem to move the second passenger. Am I going to have to add a second scenery object (and controller) for the second person?

2. Opacity. How do I make the bitmaps completely opaque, so that nothing shows behind them? When I rotate the view so that the passengers are between myself and the plane (plane in background), it still appears that the plane is in the foreground, i.e, the wing or whatever of the plane obscures part of the person.

Hope that is clear....anyone have any ideas? Will be glad to post the file, if it helps.
 
1. Yes, static particles have no offset. Quote from FS2004 Effects.doc of SPECIAL_EFFECTS_SDK:
Sprites become static before they get any of their offset values, and as a result, particle offsets do not work on static sprites. Instead, you must use emitter offsets.

2. What texture format and Blend Mode value do you use?
 
Post the file up if u can.....you should be able to do this with one 1 controller and one effect but have to add a second emitter, particle, and particle atribute as they will have different offsets.

Dave
 
Thanks guys for the help!
Here's the Controller:
[Library Effect]
Lifetime=5
Version=1.00
Radius=100
Priority=0

[controller.0]
lifetime=30.0, 30.0
type=3
distance=100.00, 100.00
delay=0.00, 0.00
x offset=0.00, 0.00
y offset=0.00, 0.00
z offset=0.00, 0.00
effect.0=fx_passenger, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00

Here's the effect:

[Library Effect]
Lifetime=5
Version=2.00
Display Name=Female Passenger
Radius=100
Priority=0

[Properties]
Spot=1
Tower=1
Map=0
Cockpit=1
VirtualCockpit=1

[Emitter.0]
Lifetime=1.00, 1.00
Delay=0.00, 0.00
Bounce=0.00
No Interpolate=1
Rate=1.0, 1.0
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=120.00, 120.00
Type=19
X Scale=1.00, 1.00
Y Scale=1.00, 1.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.95, 0.95
Rotation=0.00, 0.00
Shade=1
Static=1
Face=0, 0, 1

[ParticleAttributes.0]
Blend Mode=1
Texture=passenger3.bmp
Bounce=0.00
Color Start=255, 255, 255, 255
Color End=255, 255, 255, 0
Jitter Distance=0.00
Jitter Time=0.00
uv1=0.00, 0.00
uv2=1.00, 1.00
X Scale Goal=0.00
Y Scale Goal=0.00
Z Scale Goal=0.00
Extrude Length=0.00
Extrude Pitch Max=0.00
Extrude Heading Max=0.00

[Emitter.1]
Lifetime=1.00, 1.00
Delay=0.00, 0.00
Bounce=0.00
No Interpolate=1
Rate=1.0, 1.0
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=4.00, 4.00
Y Offset=0.00, 0.00
Z Offset=1.50, 1.50
Pitch=0.00, 0.00
Bank=0.00, 0.00
Heading=0.00, 0.00

[Particle.1]
Lifetime=125.00, 125.00
Type=19
X Scale=1.00, 1.00
Y Scale=1.00, 1.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=2.00, 2.00
Y Offset=0.00, 0.00
Z Offset=0.00, 3.00
Fade In=0.00, 0.00
Fade Out=0.90, 0.90
Rotation=0.00, 0.00
Shade=1
Static=1
Face=0, 0, 1

[ParticleAttributes.1]
Blend Mode=1
Texture=passenger2.bmp
Bounce=0.00
Color Start=255, 255, 255, 255
Color End=255, 255, 255, 0
Jitter Distance=0.00
Jitter Time=0.00
uv1=0.00, 0.00
uv2=1.00, 1.00
X Scale Goal=0.00
Y Scale Goal=0.00
Z Scale Goal=0.00
Extrude Length=0.00
Extrude Pitch Max=0.00
Extrude Heading Max=0.00

Stranger: The texture is a type 444 (4 bit alpha) bitmap. Does that matter? I set it as that because that is what the chickens were in the barnstorm.fx. The blend mode value=1. Not sure I know what that value is for. I will try 2. As to offsetting the emitter....I think I tried both...offsetting the emitter and the particle. Does it have anything to do with having the particle always facing the plane? Thanks again for the help.
 
Try changing this value...

[Particle.1]
Lifetime=125.00, 125.00
Type=19
X Scale=1.00, 1.00
Y Scale=1.00, 1.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=2.00, 2.00 <------change to 0.00, 0.00
Y Offset=0.00, 0.00
Z Offset=0.00, 3.00 <-----change to 0.00, 0.00
Fade In=0.00, 0.00
Fade Out=0.90, 0.90
Rotation=0.00, 0.00
Shade=1
Static=1
Face=0, 0, 1
 
Last edited:
Nope. It appears that when Static=1, it freezes all offsets, whether by the emitter or by the particle. So I tried a different approach...I set Static=0, and got my offset to work. I also , for whatever reason, had to add lifetime to my emitter....so I set it to 100, and changed the rate to 0.01....to still emit only 1 particle during the lifetime. Now I had 2 passengers, 1 offset from the other...but they slowly rose from the ground. So I added tempk=107. Still rose slightly....so I adjusted the temp down until they stayed pretty much stationary. This is delicate, and depends on the lifetime of the particle....as they appear to have a tendency to slowly rise, cool down, and slowly sink into the tarmac. If you get the temp just right, it is almost inperceptable. (I ended up with tempk=106.989855). Now...this is interesting. I gave the first particle some velocity in the x direction. With a positive number, it moves away from you. With a negative number it moves toward you. (This is weird...seems that should be the z direction?) When I gave it velocity in the z direction it moves right and left. Another peculiarity is that adding movement seems to increase the tendency for the particle to sink. Add identical temperatures, the "stationary" passenger does not sink as fast as the "mobile" passenger. Possibly the correct balance of y velocity and temperature could make it stable. Obviously the easiest thing is to get the offset of static "particles" by using two different scenery objects in the bgl, and forget about offset in the effects file for this application. Back to the drawing board!
 
The effect you posted dosen't show up in my sim. I'll try to play with it when I get some time. As an alternative you can try to make your passengers as scenery objects rather than effect and apply "rotation to user" + "distance to user" tweaks.
 
You need his texture in order to have it show up in the sim...unless you changed it to another one

Dave
 
Thanks guys for the continued input.
Stranger, in the past, I have always made my "people" as scenery objects. They actually look better that way. (No problem with the airplane showing thru!). The reason I tried it as an effect was to be able to give them a "lifetime"....so the disappear to simulate having boarded the plane, and appear to simulate having exited the plane. Perhaps there is a way to do this with scenery objects...I have read several posts on "conditional scenery objects" and not found an answer. I have not spent the time yet to look at CAT....perhaps the answer is there. Regarding the textures, you can sub any texture, as suggested by Dave....or will be happy to post or email my textures. I am getting the feeling here that I am asking the effects engine to do something it wasn't designed to do. One improvement I have found, rather than the tricky business of starting the effect with a distance controller is to start the effect using the time of day parameters in the xml file. That way you know exactly at what minute your passengers will board. You might have to sit at the gate a few minutes waiting....but then I guess that's "as real as it gets!" It also solves the offset problem, as I can place each passenger as a seperate scenery object. Another little idea I have is to animate the textures to simulate the passenger actually strolling up to the plane. That ought to be a real frame rate killer! Maybe by FS24 microsoft will solve this for us. I look at all of the action games that my kid plays, and know its possible...but then I guess that's getting pretty far afield from the intent of flight simulation.
 
Hmmmmmmm FS24...could only imagine what that would be like if it ever got that far. If you think about, Fs has come along way since days like fs95. I'm surprised that nobody ever thought of this idea yet with the passengers, and if it ever gets to work, sure would be pretty popular. If you want, i got some time over the weekend, send the textures and i'll try to fool around with it.

Dave

Email at jen_n_dave1123@yahoo.com
 
Thanks Dave...they're in the mail! A couple of my favorite passengers.
Am sending the bgl file also for my test location...Tamarindo, El Salvador.
 
Just having a problem seeing the effects from the coords in the xml file. Are you sure thats right. I tried it somewhere else and had no problem seeing it but not where its specified.

Dave
 
Oops! My apologies Dave. I modified that airport in AFCAD to include a ramp, plus have a pretty short lifetime for the passengers during the testing phase. So what is probably happening is they are disappearing before you ever spot them. I have e-mailed you the correct AFCAD, and a flight startup so they will appear in front of you when you start the flight. One passenger is static, the other in motion. Appreciate you looking at it, and any imput you might have.
 
Just to close out this topic, for anyone who might be following. Dave figured out that to achieve the offset between the two (or more) passengers, it is done thru a controller and specifying the offset there....rather than in the emitter or the particle.
As to opacity, this seems to be a problem without solution. I noticed that some of the people I created as objects using EOD had the same problem...oddly some didn't. All used the same type of bitmap. All effects are drawn behind the plane, regarless of location. Something in the FS engine I guess looks at autogen, scenery objects and effects all differently in regard to drawing order. As far as my particular interest of having passengers (as effects) appear to board the plane, it works just fine when viewed from the correct side of the plane.
Thanks again to all for the help.
 
Back
Top