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

FSX papaPhi objectPlacer 2

Messages
759
Country
netherlands
I have been trying to figure out a way to change the appearance of an FSX model based on visibility for a better part of the year 2012. In the end, I turned to SimConnect, and in early 2013, I began to have some success. Eventually, I realized the potential of this approach to do much more than just show models depending on one single variable in the simulator.


Later in spring, Sándor Tar from LH Simulations expressed some interest to use this approach in their upcoming product – the now released, wonderful, LHBP Liszt Ferenc scenery. And thus, objectPlacer was born.


In the course of the year I have worked on making the approach work, incorporate various functions according to needs of LHSimulations, and making it work for all end customers, and in Prepar3D.

I am very glad to call the current iteration of the product a success. Successful undertaking, as it may be, it has its own problems. Its dll format makes it sometimes problematic to load, it is not quite extensible, cumbersome to work with from a scenerymakers perspective.


With this in mind, I will be working on a new version – leaner, better, nicer, easier. Available to all to license.

This will still take a while, though. Still – I would like to present the capabilities of the current iteration – and projections for the new one – and see your feedback.

So – first – to the current objectPlacer.
As I have already mentioned, this piece of software is currently deployed in the LH Simulations LHBP scenery for FSX (and soon, P3D 1.4 and P3D 2). I can personally very much recommend trying this scenery – should you be inclined to, you can get it at lhsimulations.hu or at SimMarket.

Many structures in this scenery are placed dynamically according to various situations that can happen in the simulation. One of the most visible to a regular user, that is quite difficult, if not outright impossible to do in pure FSX scenery – is the situation in winter. You may notice, that when you fly in winter, not only the photo ground is changed to include snow, but also other places such as roofs of the buildings. After all – do you get rid of the light snow layer on the roof of your house?
I have mentioned in the beginning that my original aim was to allow me to control the lights according to weather. This – too – has been achieved. By polling the FSX weather system, and parsing the METAR received, I am able to control the appearance of any object, in this case, lights, so that they appear when the correct visibility is achieved.

Some other variables available are time of day, both in hours and in the familiar day/dawn/dusk/night structure FS assigns automatically, radio frequencies (for pilot operated lights) or squawk code – say if you wished to send a pilot with an emergency code some trucks to await him on threshold.
With availability of functions supplied by WinAPI, it is also possible to access certain files, such as scenery.cfg, or access registry etc. which also lends to some possibilities – one of which being that the DLL will check whether the scenery is active in the simulator the DLL is loaded by, and will not work its magic when the user actually wants the scenery turned off.


Now, there are many good things about the software, allowing the developer very wide and precise control about object placement… but, as it was mentioned, there are drawbacks. I hope to eliminate most drawbacks and continue to work on the good parts for the new version of objectPlacer.
So – what does it mean in practice? Let me present the preliminary ideas. I will try to build upon these and your feedback, and hopefully I will be able to provide.
The first problem – that of extensibility – was the one I knew from the beginning I would have to address. I have been thinking about it, and I hope that there is one solution that would help with several problems at once, including this one. As mentioned previously, having the software in dll form brings about several problems. I have decided to go the way of an executable application for the second generation of objectPlacer software. Making the software an executable should, among other things, enable me to load several scenery definitions and work from there. Of course, this would be possible with a DLL at least to some extent – maybe even fully – so forgive me if those more experienced of you find errors in my reasoning.

Anyway – one approach is being presented a couple of threads over by Jeffrey Stähli. Loading an xml or another similar structured plaintext file does, however, present several difficulties in my opinion. Not least of which is the actual fact that the file can be read by anybody. That does not mean a problem for everybody, but I imagine there are people developing payware products that will prefer not having all this information open to public eye. This problem, I believe, would be alleviated by using an actual compiled DLL for each scenery, which would be linked to the objectPlacer executable. Such approach would, I believe, also bring several more advantages. Some of these would include near unlimited variability to work with logical requirements for any object or group of – any combination of requisites, nested, combined with if statements, and statements, or statements or similar can be combined into one big logical switch that will, in the end, produce a simple yes or no to a group of objects placement. Another advantage would be ability to run more complex custom code for your scenery inside the DLL, which can range from reading a configuration file to a complex copy protection code that can be tailor-made to your specific requirements.

Of course, writing such code can be problematic for those of you who have no experience with programming, and/or no desire to learn and write your own code. For the more complex requests I imagine I will be able to help you with this, but for the basic ones, I plan to provide a GUI based developer tool, that should allow simplifying the writing and compiling process greatly.

I do have yet to design the GUI itself, but I imagine that the software will allow you to comfortably define each object with placement information similar to what you use currently for placement xmls, assign it to one or more object groups, and specify when any of these object groups should be shown based on available variables; and finally to generate full set of source code files and compile them using some of the available compilers.

Another possibility I would like to mention is object animation. As far as I know, there is currently no way to animate scenery objects depending on variables. The objectPlacer module does, however, enable this, and it is possible to animate objects both using FSX environmental variables as well as custom variables. In effect, this allows triggers such as weather or menu options to drive animations. A very simple example would be opening and closing hangar doors. You can see one of my early tests in this video (sorry about the audio quality) http://youtu.be/tYA4OD3obD8?t=38s


So, I would like to hear from you guys – what do you think of this then? Do you have any specific features in mind that you would like to ask about? Would you be willing to use this module? If you are developing payware sceneries, would you be willing to pay for it? Please let me know.
 
Hi,

Very nice!

I like the triggering of the animations. I have been looking at that before, to make a CAT for FSX, but couldn't yet get it working to trigger animations. But I am sure that is interesting for many developers.

I think for such a system to work well, the users should stay away from programming. For many developers that is a step too far. So if things are stored in a compile DLL or so, there should be an easy to use tool to make those I think.
 
Hi,

Very nice!

Thanks!

I like the triggering of the animations. I have been looking at that before, to make a CAT for FSX, but couldn't yet get it working to trigger animations. But I am sure that is interesting for many developers.

As far as I can tell, this is not possible to do for sceneryobjects (I might be wrong though - further testing would be required).
objectPlacer works with simobjects though and with those it is possible.

I think for such a system to work well, the users should stay away from programming. For many developers that is a step too far. So if things are stored in a compile DLL or so, there should be an easy to use tool to make those I think.

That is my belief too. My aim is to create a GUI tool for developers that will generate all the files needed for a dll (.cpp files, .h files, .rc files etc.) and call a free compiler to create a dll.
 
Yes, you need to use sim objects to trigger animations or so other special stuff. It is ignored when you place it just as scenery (although the mdl is the same).
 
Great stuff :)

I do not know if this has a place with ADE. I assume your dll is in FS rather than working with an external program. However we are to integrate dlls created by others into ADE. The custom ground poly tool developed by Don (Gadgets) is an example. There is API between ADE and the dll. I am always interested in ways to make ADE more useful to users so if there is any synergy let me know.
 
Great stuff :)

I do not know if this has a place with ADE. I assume your dll is in FS rather than working with an external program. However we are to integrate dlls created by others into ADE. The custom ground poly tool developed by Don (Gadgets) is an example. There is API between ADE and the dll. I am always interested in ways to make ADE more useful to users so if there is any synergy let me know.

Thanks for the offer Jon, I'll think about that.
 
Hello gentlemen,

work is going on, albeit a bit slower than originally planned. Nevertheless, it is going on and can be sped up if needed.


I want to ask you scenery builder types: What simulator variables would you like to have access to?

Currently I am looking at
"Time Of Day",
"Plane Latitude",
"Plane Longitude",
"Local day of year",
"Local Time",
"Transponder Code:1",

plus some more (radio freqs, plus visibility and wind from METAR).

Is there any specific variable you would like to be able to use?
 
On my project I considered having hangar doors animated depending on comm1 frequency, and that frequency would correspond to each hangars owner operations frequency.
Precipitation would be very useful, you could then make water puddles and such. Also temperature and dew point. At my local aerodrome, which is very near the sea, when relative humidity rises and the wind turns southerly, there's always flocks of seagulls nearby the runway...

I think having access to the users aircraft lights could be useful. I'm not sure it's the same in other places, but at Lisbon airport, when an aircraft turns on it's beacon light, all vehicles in a service roads that is behind said aircraft must stop and keep a safe distance of 70 meters from it.

If this goes through, sceneries could very well become much more lively and interactive, i'm very much looking forward for this!
 
I definitely will show as soon as there is something worth showing - for now the development is slowed down a bit and still more inside than something worth showing.
 
Back
Top