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

Lods in eod models.

Messages
80
Country
unitedkingdom
Hi,
I have been using eod to make a few models. I have made a animated texture fire for cfs2 and it works very good.
I am playing around with the api code to see is I can incorperate lod modes.
Any help and information would be appreciated.
Robert John.
 
Hi,

I think there are two things you can do. One is to use the IfVarRange command together with the variable 33B to select a different representation based on the range to the viewer.

Another is to use the IfSizeV command, as FS2004 does. That probably gives even better results.
 
Hi Arno,
I used the IfVSize like in the old librarys but dont really understand it.
I know how important it is to use LOD's in models.
I had the lods showing in modelconverter x after manual editing but not in the game ( I haven't a clue).

Where the sticky out toung appears it is the letter p the coding is beyond my control.

.IfVSize( :L001209 20 1 )
IfVSize( :L001223 12 1 )
Jump32( :L0014ED )

Model 1

;macrodesc lod (EOD)
;defaultscale 1
;textures br_apt1w.bmp
;designshape -5,-4,-5,3,5,3,5,-4
;--------------------------------------------
; Filename: lod.api
; Directory: \Program Files\EOD\
; Project:
; Designer:
; Date: 2012-07-30
; Update: 2012-07-30
; Credits:
; Macro generated using EOD 2.2.85
; Any commercial distribution or use of this file is prohibited
;--------------------------------------------
; %1 = Latitude
; %2 = Longtitude
; %4 = Scale
; %5 = Rotation
; %6 = Not Used
; %7 = Not Used
; %8 = Not Used
; %9 = Not Used
; %10 = Visibility range
; %11 = Altitude
; %12 = Detail level
; 48 = Radial visibility range (x 1.5)
; %15 = User defined


Area( B %1 %2 22 )
mif( %12 )
IfVarRange( : 0346 %12 5 )
mifend
PerspectiveCall( :pos )
ShadowCall( :pos )
Jump( : )

:pos
mif( %11 )
RefPoint( 2 :End %4 %1 %2 v1= %10 E= %11 )
melse
RefPoint( 7 :End %4 %1 %2 v1= %10 )
mifend
mif( %5 )
RotatedCall( :Begin 0 0 %5 )
melse
Call( :Begin )
mifend
:End
Return
:Begin

VectorJump( :West 32767 0 0 0 )
VectorJump( :SouthEast 0 0 32767 0 )
:NorthEast
Call( :part000 ) ;
Return
:SouthEast
Call( :part000 ) ;
Return
:West
VectorJump( :SouthWest 0 0 32767 0 )
:NorthWest
Call( :part000 ) ;
Return
:SouthWest
Call( :part000 ) ;
Return


;-------
:part000
; cube - Cube 1
Points( 0
-20 0 -14 ; 0
20 0 -14 ; 1
20 0 14 ; 2
-20 0 14 ; 3
-20 20 -14 ; 4
20 20 -14 ; 5
20 20 14 ; 6
-20 20 14 ; 7
)
LoadBitmap( 0 6 EF 0 0 0 "br_apt1w.bmp" )
TexPoly( 0 0 -32767 14 0 0 0 4 0 255 5 254 255 1 254 0 ) ;Front
TexPoly( 0 0 32767 14 2 0 0 6 0 255 7 254 255 3 254 0 ) ;Back
TexPoly( -32767 0 0 20 3 0 0 7 0 255 4 254 255 0 254 0 ) ;Left
TexPoly( 32767 0 0 20 1 0 0 5 0 255 6 254 255 2 254 0 ) ;Right
TexPoly( 0 32767 0 20 4 0 0 7 0 255 6 254 255 5 254 0 ) ;Top
Return

EndA


Model2

;macrodesc lod2 (EOD)
;defaultscale 1
;textures grass.bmp
;designshape -16,-16,-16,16,16,16,16,-16
;--------------------------------------------
; Filename: lod2.api
; Directory: \Program Files\EOD\
; Project:
; Designer:
; Date: 2012-07-30
; Update: 2012-07-30
; Credits:
; Macro generated using EOD 2.2.85
; Any commercial distribution or use of this file is prohibited
;--------------------------------------------
; %1 = Latitude
; %2 = Longtitude
; %4 = Scale
; %5 = Rotation
; %6 = Not Used
; %7 = Not Used
; %8 = Not Used
; %9 = Not Used
; %10 = Visibility range
; %11 = Altitude
; %12 = Detail level
; 164 = Radial visibility range (x 1.5)
; %15 = User defined


Area( B %1 %2 22 )
mif( %12 )
IfVarRange( : 0346 %12 5 )
mifend
PerspectiveCall( :pos )
ShadowCall( :pos )
Jump( : )

:pos
mif( %11 )
RefPoint( 2 :End %4 %1 %2 v1= %10 E= %11 )
melse
RefPoint( 7 :End %4 %1 %2 v1= %10 )
mifend
mif( %5 )
RotatedCall( :Begin 0 0 %5 )
melse
Call( :Begin )
mifend
:End
Return
:Begin

VectorJump( :West 32767 0 0 0 )
VectorJump( :SouthEast 0 0 32767 0 )
:NorthEast
Call( :part000 ) ;
Return
:SouthEast
Call( :part000 ) ;
Return
:West
VectorJump( :SouthWest 0 0 32767 0 )
:NorthWest
Call( :part000 ) ;
Return
:SouthWest
Call( :part000 ) ;
Return


;-------
:part000
; roof2 - Roof2 1
Points( 0
-64 0 -64 ; 0
64 0 -64 ; 1
64 0 64 ; 2
-64 0 64 ; 3
0 60 0 ; 4
)
LoadBitmap( 0 6 EF 0 0 0 "grass.bmp" )
TexPoly( 0 23905 -22411 43.772 0 0 0 4 127 255 1 254 0 ) ;Front
TexPoly( 0 23905 22411 43.772 2 0 0 4 127 255 3 254 0 ) ;Back
TexPoly( -22411 23905 0 43.772 3 0 0 4 127 255 0 254 0 ) ;Left
TexPoly( 22411 23905 0 43.772 1 0 0 4 127 255 2 254 0 ) ;Right
Return

EndA

Model3

;macrodesc lod2 (EOD)
;defaultscale 1
;textures grass.bmp
;designshape -16,-16,-16,16,16,16,16,-16
;--------------------------------------------
; Filename: lod2.api
; Directory: \Program Files\EOD\
; Project:
; Designer:
; Date: 2012-07-30
; Update: 2012-07-30
; Credits:
; Macro generated using EOD 2.2.85
; Any commercial distribution or use of this file is prohibited
;--------------------------------------------
; %1 = Latitude
; %2 = Longtitude
; %4 = Scale
; %5 = Rotation
; %6 = Not Used
; %7 = Not Used
; %8 = Not Used
; %9 = Not Used
; %10 = Visibility range
; %11 = Altitude
; %12 = Detail level
; 164 = Radial visibility range (x 1.5)
; %15 = User defined


Area( B %1 %2 22 )
mif( %12 )
IfVarRange( : 0346 %12 5 )
mifend
PerspectiveCall( :pos )
ShadowCall( :pos )
Jump( : )

:pos
mif( %11 )
RefPoint( 2 :End %4 %1 %2 v1= %10 E= %11 )
melse
RefPoint( 7 :End %4 %1 %2 v1= %10 )
mifend
mif( %5 )
RotatedCall( :Begin 0 0 %5 )
melse
Call( :Begin )
mifend
:End
Return
:Begin

VectorJump( :West 32767 0 0 0 )
VectorJump( :SouthEast 0 0 32767 0 )
:NorthEast
Call( :part000 ) ;
Return
:SouthEast
Call( :part000 ) ;
Return
:West
VectorJump( :SouthWest 0 0 32767 0 )
:NorthWest
Call( :part000 ) ;
Return
:SouthWest
Call( :part000 ) ;
Return


;-------
:part000
; roof2 - Roof2 1
Points( 0
-64 0 -64 ; 0
64 0 -64 ; 1
64 0 64 ; 2
-64 0 64 ; 3
0 60 0 ; 4
)
LoadBitmap( 0 6 EF 0 0 0 "grass.bmp" )
TexPoly( 0 23905 -22411 43.772 0 0 0 4 127 255 1 254 0 ) ;Front
TexPoly( 0 23905 22411 43.772 2 0 0 4 127 255 3 254 0 ) ;Back
TexPoly( -22411 23905 0 43.772 3 0 0 4 127 255 0 254 0 ) ;Left
TexPoly( 22411 23905 0 43.772 1 0 0 4 127 255 2 254 0 ) ;Right
Return

EndA

I would like to put the information on how to do this in the cfs2 magazine I produce found at,http://www.thefreeflightsite.com/CFS2_Magazine.htm
 
Last edited:
Hi,

I think you can strip those vectorjump commands, these are from the fs98 days when the scenery engine did not sort parts by itself based on the direction.

I'll try to post some sample for you, but how do you plan to get the different lod models? Would you make them as separate objects and then merge?
 
Hi Arno,
I have just been playing around with the loded api, I have been striping and adding code, the lods show in modelconverterx even with alot of fs coding needed. The text outlined in red I know nothing about except they are important.When loaded into the game the object is very large and the lods are very close together. it looks like I am inside the model and the textures have fliped. Thanking you for you interest. RJ.
Area( b %1 %2 %3 )





IfVSize( :part000 100 1 )
IfVSize( :part001 64 1 )
Jump32( :part002 )




:part000

Points( 0
-64 0 -64 ; 0
64 0 -64 ; 1
64 0 64 ; 2
-64 0 64 ; 3
0 60 0 ; 4
)
LoadBitmap( 0 6 EF 0 0 0 "grass.bmp" )
TexPoly( 0 23905 -22411 43.772 0 0 0 4 127 255 1 254 0 ) ;Front
TexPoly( 0 23905 22411 43.772 2 0 0 4 127 255 3 254 0 ) ;Back
TexPoly( -22411 23905 0 43.772 3 0 0 4 127 255 0 254 0 ) ;Left
TexPoly( 22411 23905 0 43.772 1 0 0 4 127 255 2 254 0 ) ;Right
Return

:part001

Points( 0
40 -80 0 ; 0
28 -80 28 ; 1
0 -80 40 ; 2
-28 -80 28 ; 3
-40 -80 0 ; 4
-28 -80 -28 ; 5
0 -80 -40 ; 6
28 -80 -28 ; 7
40 80 0 ; 8
28 80 28 ; 9
0 80 40 ; 10
-28 80 28 ; 11
-40 80 0 ; 12
-28 80 -28 ; 13
0 80 -40 ; 14
28 80 -28 ; 15
)
LoadBitmap( 0 6 EF 0 0 0 "000b2su1.bmp" )
TexPoly( 30118 0 -12908 36.765 7 0 0 15 0 255 8 255 255 0 255 0 ) ;Side 8
TexPoly( 12908 0 -30118 36.765 6 0 0 14 0 255 15 255 255 7 255 0 ) ;Side 7
TexPoly( -12908 0 -30118 36.765 5 0 0 13 0 255 14 255 255 6 255 0 ) ;Side 6
TexPoly( -30118 0 -12908 36.765 4 0 0 12 0 255 13 255 255 5 255 0 ) ;Side 5
TexPoly( -30118 0 12908 36.765 3 0 0 11 0 255 12 255 255 4 255 0 ) ;Side 4
TexPoly( -12908 0 30118 36.765 2 0 0 10 0 255 11 255 255 3 255 0 ) ;Side 3
TexPoly( 12908 0 30118 36.765 1 0 0 9 0 255 10 255 255 2 255 0 ) ;Side 2
TexPoly( 30118 0 12908 36.765 0 0 0 8 0 255 9 255 255 1 255 0 ) ;Side 1
TexPoly( 0 32767 0 80 15 217 38 14 128 0 13 38 38 12 0 128 11 38 217 10 128 255 9 217 217 8 255 128 ) ;Top
Return




:part002

Points( 0
-20 0 -14 ; 0
20 0 -14 ; 1
20 0 14 ; 2
-20 0 14 ; 3
-20 20 -14 ; 4
20 20 -14 ; 5
20 20 14 ; 6
-20 20 14 ; 7
)
LoadBitmap( 0 6 EF 0 0 0 "br_apt1w.bmp" )
TexPoly( 0 0 -32767 14 0 0 0 4 0 255 5 254 255 1 254 0 ) ;Front
TexPoly( 0 0 32767 14 2 0 0 6 0 255 7 254 255 3 254 0 ) ;Back
TexPoly( -32767 0 0 20 3 0 0 7 0 255 4 254 255 0 254 0 ) ;Left
TexPoly( 32767 0 0 20 1 0 0 5 0 255 6 254 255 2 254 0 ) ;Right
TexPoly( 0 32767 0 20 4 0 0 7 0 255 6 254 255 5 254 0 ) ;Top
Return

EndA
 
Hi Arno,
Here is the code I made for a animated flame in EOD. It may be possible to do in gmax,I don't know. Can also make animated flags. I use gmax ripple to take screen shots of the blowing flag.



;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
; API Header Lines added by AirportFreeware Version 3.0 Build 192
;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
;MACRODESC FLAMES3M (EOD)
;DEFAULTSCALE 1.00
;DEFAULTPARAMS , , , , , , , , , ,
;PARAMDESCR , , , , , , , , , ,
;DEFAULTRANGE 3000 M
;DEFAULTDENSITY NORMAL
;TEXTURES FIRE_SHEET.BMP, FIRE_SHEET_LM.BMP, ,
;DESIGNSHAPELINES 1, 0, 0, 0, 1, 0, -1, 0, -1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0,
;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
;--------------------------------------------
; Filename: FLAMES6M.api
; Directory: \Program Files\EOD\
; Project:
; Designer:
; Date: 2012-07-10
; Update: 2012-07-12
; Credits:
; Macro generated using EOD 2.2.85
; Any commercial distribution or use of this file is prohibited
;--------------------------------------------
; %1 = Latitude
; %2 = Longtitude
; %4 = Scale
; %5 = Rotation
; %6 = Not Used
; %7 = Not Used
; %8 = Not Used
; %9 = Not Used
; %10 = Visibility range
; %11 = Altitude
; %12 = Detail level
; 9 = Radial visibility range (x 1.5)
; %15 = User defined


Area( B %1 %2 22 )
mif( %12 )
IfVarRange( : 0346 %12 5 )
mifend
PerspectiveCall( :pos )
ShadowCall( :pos )
Jump( : )

:pos
mif( %11 )
RefPoint( 2 :End %4 %1 %2 v1= %10 E= %11 )
melse
RefPoint( 7 :End %4 %1 %2 v1= %10 )
mifend
mif( %5 )
RotatedCall( :Begin 0 0 %5 )
melse
Call( :Begin )
mifend
:End
Return
:Begin

VectorJump( :West 32767 0 0 0 )
VectorJump( :SouthEast 0 0 32767 0 )
:NorthEast
RotateToAircraft( :part000 0 0 0 0 0 1 0 0 0 ) ;
Return
:SouthEast
RotateToAircraft( :part000 0 0 0 0 0 1 0 0 0 ) ;
Return
:West
VectorJump( :SouthWest 0 0 32767 0 )
:NorthWest
RotateToAircraft( :part000 0 0 0 0 0 1 0 0 0 ) ;
Return
:SouthWest
RotateToAircraft( :part000 0 0 0 0 0 1 0 0 0 ) ;
Return


;-------
:part000
; wall - Wall 1
Points( 0
1 0 0 ; 0
1 6 0 ; 1
-1 6 0 ; 2
-1 0 0 ; 3

)
LoadBitmap( 0 L6 EF 0 0 0 "fire_sheet.bmp" )
IfVarAnd( :A2 282 101 )
TexPoly( 0 0 32767 0 0 0 123 1 0 255 2 65 255 3 65 123 ) ;Front
Return
:A2
IfVarAnd( :A3 282 202 )
TexPoly( 0 0 32767 0 0 62 123 1 62 255 2 127 255 3 127 123 ) ;Front
Return
:A3
IfVarAnd( :A4 282 404 )
TexPoly( 0 0 32767 0 0 134 123 1 134 255 2 199 255 3 199 123 ) ;Front
Return
:A4
IfVarAnd( :A5 282 808 )
TexPoly( 0 0 32767 0 0 192 126 1 192 255 2 253 255 3 253 126 ) ;Front
Return
:A5
IfVarAnd( :A6 282 1010 )
TexPoly( 0 0 32767 0 0 0 0 1 0 129 2 61 129 3 61 0 ) ;Front
Return
:A6
( :A7 282 2020 )
TexPoly( 0 0 32767 0 0 67 0 1 67 129 2 128 129 3 128 0 ) ;Front
Return
:A7
IfVarAnd( :A8 282 4040 )
TexPoly( 0 0 32767 0 0 129 0 1 129 129 2 190 129 3 190 0 ) ;Front
Return
:A8
IfVarAnd( :A9 282 8080 )
TexPoly( 0 0 32767 0 0 193 0 1 193 129 2 254 129 3 254 0 ) ;Front
Return
:A9

:END
Return

EndA
 
Back
Top