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

FSXA simobjects that always face the user?

Messages
97
Country
us-alaska
I want to have some objects that always face the user.
I would like them to be simobjects as I do not know how to turn scenery bgl's on and off on the fly but I do have code to turn simobjects on and off.

I have used MDL tweaker to make a simple test box face the user as scenery but it does not seem to work as a sim object.

Make model has model type scenery and airplane.
MDL tweaker does not like airplane models.

Did FS9 have simobjects?

So do I have to:
1) expand my code to turn the object to the user? (ouch)
2) is there some way to toggle visibility of scenery object bgl's on the fly?
3) make an FS9 simobject that turns to face user?
4)?

Thanks,
Sean
 
Hi Sean,

SimObjects are something new in FSX, so they are not existing for FS2004. What kind of conditions do you want the objects to be toggled on? If these are not too complex, it might be possible to put it directly into the MDL file and you don't need to use SimConnect and SimObjects at all.
 
Since the user will always see one and only one perspective of this object, I would implement this as a static bitmap effect (*.fx) with a setting that always faces the viewer. Beacon lights are done like this. Of course, depending on what exactly you need to display.

Misho
 
Thanks for the quick reply Arno.

My goal is to make points of interest billboards that face the user but can be turned off and on by a user control.

Currently I can turn them on and off from a simconnect menu command. They will be easier to read if they always face the user.

Sean
 
Hi Misho,
U guy's are fast!
Never done a .fx would that be easy to wire visibility to a user control?
 
It should be... you can attach fx in the GMAX. Then, you shoud add control code to the XML file that controls the parts (can't remember the name now).. but that might be only for interior parts... hmmmmm Not really sure on this. I remeber seeing visibility code in AVSIM forum...

Misho

Edit: I just saw your post to Arno... those signs should be dead simple to design in GMAX/3DSMAX, and then have an FX file object attached to it. Finally you can superimpose point of interest text on top of it.
 
Last edited:
Currently I have them as 3d pillars with text as a bmp.

So I would use that pillar and make a user visibility toggle with an effect?

It should be... you can attach fx in the GMAX. Then, you shoud add control code to the XML file that controls the parts (can't remember the name now).. but that might be only for interior parts... hmmmmm Not really sure on this. I remeber seeing visibility code in AVSIM forum...

Misho

Edit: I just saw your post to Arno... those signs should be dead simple to design in GMAX/3DSMAX, and then have an FX file object attached to it. Finally you can superimpose point of interest text on top of it.
 
Sorry - how exactly do you want to use effect? Can you send me a screenshot?

As far as visibility - if you can get your 3d pillar to vanish when you need, then as long as FX is attached as a "child" to it, it should vanish as well.

Misho
 
Hi Misho.

I think I have an image attached...
I need to be able to turn the billboards on and off from a user control.
billboards must face user fro legibility.

U brought up effects. I was trying to understand that.
Can I make the round "billboard" part an effect that will then turn to face the user?

Currently I use them mdl's as sim objects and I can turn them on and off on the fly from a simconect menu control.

I am procrastinating writing code to make them turn to face the user... as that sounds hard and I am inclined to use a native fsx control mechanism if one is available. That is why I started to try and make them as fs9 objects as they can be tweaked to face user but they must be scenery bgl's to do that. I do not know how to turn a scenery (BGL) object on and off on the fly like I can the sim objects.

Thanks any and all help is greatly appreciated!
 

Attachments

  • POIscreen_sm.jpg
    POIscreen_sm.jpg
    62.1 KB · Views: 475
Ok - I don't know anything about SimObjects (but I will educate myself soon!) but what you sent me would be perfect for an FX if you can attach it to simobject. I created lamp posts that had a 3D pole, and an fx light on top of it that always faced the viewer. The "lolipop" you have would work well - the handle would be 3D, while the round part would definitely stay turned toward the user using the FX file. The only thing I don't know is how you render text on the round part, and if that would align with the FX. If the text is not dynamic, then it's a non-issue - just create a bitmap and draw text into it.

Also, the FX code you can use and re-work would be something like fx_beacon.fx, in your "effects" dir.

The lines that determine the facing portion are:
Static=1 // don't move with aircraft
Face=1, 1, 1 // face user in x,y and z axis

The lines you want to change are:

[ParticleAttributes.2]

Texture=fx_2.bmp // obviously, a texture you want to use

uv1=0.00, 0.00
uv2=0.50, 0.50 // these are tex coordinates of the portion you want to use. Right now they use 1/4 of the texture (lower left) If you have your own texture and the billboard is one big circle, then these lines would be changed to:

uv2=1.0, 1.0

Also, you'll only need one Emitter, Particle, Particle attributes element (the beacon file has 3, because they assembled the beacon to have a lamp and 2 lewels of glow around it)

So, if you know how to create your own SimObject and attach an fx to it, you're almost good to go. Let me know how it goes.

Misho
 
Hey thanks Misho,

The way I do the text now is to make a new instance of the lollipop and place a dds texture with the text. So sounds pretty similar with the effect.

I will get back to you with my results once I figure out how to attache an effect!
 
Yeah it works!
After much learning, tweaking, stupid mistakes... I have a texture (w/text) on an object as an effect that always faces the user.

The only problem I now have is some sort of draw order issue. I used a dds 3 alpha.

Darn clouds are in my alpha texture! pic attached.
Anyone have a fix for the draw order (I have looked but not found any solution yet conclusive).

This is the fx file I hacked together:

[Library Effect]
Lifetime=5
Version=2.00
Radius=-1
Priority=0

[Properties]

[Emitter.0]
Lifetime=1.00, 1.00
Delay=0.00, 0.00
Bounce=0.00
No Interpolate=1
Rate=0.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.00, 0.00
Type=19
X Scale=10.00, 10.00
Y Scale=10.00, 10.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=1.00, 1.00
Fade Out=1.00, 1.00
Rotation=0.00, 0.00
Static=1
Face=1, 1, 1

[ParticleAttributes.0]
Blend Mode=1
Texture=test_sphere.dds
Bounce=0.00
Color Start=255, 255, 255, 255
Color End=0, 0, 0, 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
 

Attachments

  • 2009-8-3_16-18-58-796.jpg
    2009-8-3_16-18-58-796.jpg
    96.1 KB · Views: 670
LOL that can be used somewhere, I'm sure! As in...sun goes supernova and we have to evacuate to the north LOL

As for DDS - not sure why you're using it. MS obviously stayed with BMP format (check the effects\texture folder). If you take a look in there, the closest to what you need (as far as type of image display) is a barnstorming effect (fx_barnstorm). Open the associated texture (fx_barnstorm.bmp) in imagetool and note the chicken's :p alpha and format (DXT5) and make your tex the same. That should take care of the silly clouds.

Remember, safest way to learn is to copy what MS did! ;)

Misho
 
dds textures are easier (as I have done them before :) with the nvidia plug-in for Photoshop. This negates the need to use image tool. No need to setup an actual alpha channel as the transparent part of the images is automatically done for you.

Nun the less in this case the bmp works better!

One thing that is quirky:
I added the cargo explosion on ground effect to the bottom of the handle. While that effect is still animated the clouds show through the bump. Once the explosion animation is over the bmp shows properly.

Thanks for the idea and the into to effects. Very useful and fun!
 
Well I spoke to soon. Some clouds still do there nasty tricks even using a dtx5 bmp.
The SDK does say that that will happen with some effects (smoke and steam). So there may be no work around.
 
Then experiment with formats... try DXT3, or other formats availabel in ImageTool... all you need is a flat bitmap, so there's no need for anything fancy...
 
I do "need" transparency though.
DTX1,3 and 5 have the same draw order problem.

I think I may need an actual abject with a material to get rid of that.

Can I attache a mdl to an effect?
 
You should swap in the default as-is "Barnstorm" effect instead of yours, and see if you still get the cloud problem. You can pause the sim and the effect will freeze as well, and you can rotate around and examine it from all angles, sort of like the "Matrix" view.

If it does not have the same problem, then you should dissasemble and copy exactly what they did. If it does, however, then it is an internal FSX bug, or perhaps hardware incompatibility.

Misho
 
Chicken proves bug

So we have confirmation from the chicken being covered by a cloud.

See attached image.
 

Attachments

  • 2009-8-5_10-4-46-359.jpg
    2009-8-5_10-4-46-359.jpg
    93.8 KB · Views: 490
haha cool - BUT - I think you used the bitmap only. I was hoping you could swap the whole effect (fx_barnstorm.fx) and see if you get that. (there should be only one animated chicken :D) Sometimes, it is not just the bitmap, there might be some parameters in the fx file that specify draw order...

Misho
 
Back
Top