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

Placing a custom 3D light object along the street

Hello,

I've been working on this all day, and I can't get it to work. For some reason, whatever I do, I can't see the results on the sim. The BGL compiles normally, but then nothing is visible on the sim.

Here's my code:

Code:
ImportOGR|agn_roads.shp|*|*|NOREPROJ
#
PlacePointsAlongLine|FTYPE=LINE|CONTINUOUS|100;100|5;5|0|OBJECT||HDG
#
CreateXMLLibObj|*|{87a3b894-f387-4bec-bbd5-bb3eccf3f3c5}|hdg|0|0|NOAUTOGENSUPPRESSION
#
ExportBGL|P3D v2|YVR3dLights|D:\FILES\Desktop\Vancouver\AGN
ExportOGR|FTYPE="POINT"|ESRI Shapefile|YVR3dLights.shp|
1590385282462.png


The light object I made is just a bgl with 2 perpendicular planes, with a texture. I just copied the GUID out of MCX - I think that might be the issue, I could be missing something there.
 

Attachments

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

Your script and log look fine. Did you place the generated bgl and the library bgl with the light on the scenery folder?
 
I did. Again, same issue.

Do I have to do anything to my model? The GUID just belongs to an object compiled as a .bgl, I did nothing else with it.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
For placing library objects with BGLComp it is sufficient to just take the GUID from the model and use that in the placement code.

Did you make a library BGL out of the light? If you mix it with placement in that BGL file it might become geo-locked and that might result in it not working everywhere.
 
Update: Fixed the problem - I was missing something on my code.
1590425352069.png


Thanks for your help and for developing this amazing tool, Arno.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
That's the scale probably, let me check why that went wrong.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

I had a look at the code and I understand what happened. Since you missed the scale a,gument in the step, NOAUTOGENSUPPRESSION was used as scale attribute. But since your features have no attribute with that name a scale value of zero was used. That was a bug actually, because the intend of the code was to use a default value of 1 for the scale in that case. I have fixed the bug now.

But the latest script you posted where you specify the scale explicitly is better of course :)
 
Top