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

Level of detail creation (ASM tweak)

Messages
374
Country
italy
I have troubles creating the wrapper file. Would be nice to have a snippet of full working code
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi,

Why do you want to do this manually? This Wiki article was written in the days of FS2002, so unless you are making scenery for FS2002 there should be easier ways to do this.
 
Messages
374
Country
italy
hi arno!
just because I'm exporting 2d objects (sdk2002) such taxiways and I would apply the LOD to save fps.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi,

I haven't tried that before :). I guess you could try to tweak the ASM code in a similar way as you do with multiple layers in one BGL file. By adding a condition around the code that calls the different _0.asm file I think it should work.
 
Messages
374
Country
italy
Hi Arno,
I found this portion of code on avsim forum:

Code:
VAR_BASE_OVERRIDE VAR_BASE_GLOBAL
IFIN1 model_shadow, SHADOW_FLAG,0,0
IFSIZEV LOD_1, 301,1000 ; lod = 150.000000

LOD_0 label BGLCODE
BGL_JUMP_32 LOD_0L
LOD_1 label BGLCODE
BGL_JUMP_32 LOD_1L

model_inside label BGLCODE
BGL_RETURN
model_shadow label BGLCODE
IFSIZEV SHADOW_1, 301,1000 ; lod = 150.000000

SHADOW_0 label BGLCODE
BGL_JUMP_32 LOD_1L
SHADOW_1 label BGLCODE
BGL_JUMP_32 LOD_1L

LOD_0L label BGLCODE
include D:\EFHK-scenery\scenery\portti_0.asm
LOD_1L label BGLCODE
include D:\EFHK-scenery\scenery\portti_1.asm

Looks fine for me, I tryied to implement but strangely my object no more appear. What's wrong here?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi,

That code looks a little weird to me, it seems to be playing tricks with the shadow. I would expect something more simple, like this:

Code:
OBJECT_0_SCALE label    BGLCODE
    SCALE_AGL   OBJECT_0_RETURN, 10000, 252, 131072, 0006E38BEh, 01C72h, 00E38E38Eh, 038E4h, 0, 0
    BGL_CALL        OBJECT_0_BEGIN
OBJECT_0_RETURN label word
    BGL_RETURN

OBJECT_0_BEGIN label word

IFSIZEV LOD_1, 301,1000 ; lod = 150.000000

LOD_0 label BGLCODE
BGL_JUMP_32 LOD_0L
LOD_1 label BGLCODE
BGL_JUMP_32 LOD_1L

LOD_0L label BGLCODE
include D:\EFHK-scenery\scenery\portti_0.asm
LOD_1L label BGLCODE
include D:\EFHK-scenery\scenery\portti_1.asm
 
Messages
374
Country
italy
Thanks for reply Arno, now is more clear also to me, but I would ask you an advice: in my case I have lots of centerline made with loft obj and for save fps, while exporting, I sed 2000m as visibility range; this means that above that distance my loft won't appear.
In this situation would be reasonable to apply also LOD? for example the most detailed version could be visibile under 1000m, from 1000 to 2000m a less detailed version and above 2000m nothing.

thanks!
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi,

Using the v1 distance is also a sort of LOD of course. In the Amsterdam Schiphol scenery I worked on before I used only the v1 distance to determine when something shows. If you just want to show something or not that is fine. I guess you only need LODs when you want to show a simpler version instead of nothing.
 
Top