Hello,
i'm trying to create a LOD model for my tower. I read the tutorial in the wiki.
here is my main code:
Whats the problem with it? In FS only visible the tower_1_0.asm model and the other one never.
i'm trying to create a LOD model for my tower. I read the tutorial in the wiki.
here is my main code:
Code:
header label word
dw 0001 ; 00 World set number
dd 000507448H ; 02 North bound
dd 000507440H ; 06 South bound
dd 00DB1C815H ; 10 East bound
dd 00DB1C813H ; 14 West bound
dw 20 dup(0)
dd (offset OBJECT_DATA) - (offset header)
dw 33 dup(0)
OBJECT_DATA label word
db 21 ;;LATBAND_REL
dw 0283Ah ;;lat min (inclusive) 512M units
dw 0283Bh ;;lat max (exclusive)
dd (offset OBJECT_0) - (offset OBJECT_DATA)
db 0 ;;EOL
OBJECT_0 label BGLCODE
db 12 ; NEAR_FAR_HUGE_OBJECT_HEADER
dd 000507444h,00DB1C814h ; latitude,longitude
db 100 ; image power
dd (offset OBJECT_0_END) - (offset OBJECT_0)
OBJECT_0_START label word
IFIN1 OBJECT_0_FAIL, image_complex, 2, 32767
ADDOBJ OBJECT_0_SCALE
SHADOW_CALL OBJECT_0_SCALE
OBJECT_0_FAIL label BGLCODE
BGL_JUMP_32 OBJECT_0_END
OBJECT_0_SCALE label BGLCODE
SCALE_AGL OBJECT_0_RETURN, 10000, 35, 131072, 000507444h, 0C60Bh, 00DB1C814h, 0FEECh, 0, 0
BGL_CALL OBJECT_0_BEGIN
OBJECT_0_RETURN label word
BGL_RETURN
OBJECT_0_BEGIN label word
model_outside label BGLCODE
BGL_CALL model_crash
IFSIZEV object_LOD_0000_1L, 10000, 1000
BGL_JUMP_32 LOD_0000_0L
object_LOD_0000_1L label word
BGL_JUMP_32 LOD_0000_1L
model_shadow label BGLCODE
model_inside label BGLCODE
BGL_RETURN
model_crash label BGLCODE
BGL_CRASH_START model_crash_end, 8
BGL_CRASH_OCTTREE crash_end_1
dw CRASH_FLAG_OBJECT ; crash type
dw 16 ; nodes used
real4 -7.758383,0.000000,-4.647968 ; Box x,y,z
real4 22.965607,68.896820,22.965607 ; Box w,h,d
dw 1, 8, 8, 16, 16, 16, 16, 16 ; base offset into node table, one for each top-level branch
; So if you take branch 2 (count from 0), you add 8 to indices you encounter on that branch
; Nodes (254=empty 255=full, else an index into branch)
OCTTREE_NODE 0, 254, 0, 254, 254, 254, 254, 254 ; node 0
OCTTREE_NODE 1, 2, 3, 4, 5, 254, 6, 254 ; node 1
OCTTREE_NODE 254, 254, 254, 255, 254, 255, 255, 255 ; node 2
OCTTREE_NODE 254, 254, 254, 254, 255, 254, 255, 254 ; node 3
OCTTREE_NODE 254, 254, 254, 254, 254, 255, 254, 255 ; node 4
OCTTREE_NODE 254, 254, 254, 254, 255, 254, 255, 254 ; node 5
OCTTREE_NODE 254, 255, 254, 255, 254, 254, 254, 254 ; node 6
OCTTREE_NODE 254, 255, 254, 255, 254, 254, 254, 254 ; node 7
OCTTREE_NODE 1, 2, 3, 4, 5, 254, 6, 7 ; node 8
OCTTREE_NODE 254, 254, 254, 254, 254, 255, 254, 255 ; node 9
OCTTREE_NODE 254, 254, 254, 254, 255, 254, 254, 254 ; node 10
OCTTREE_NODE 254, 254, 255, 255, 254, 255, 255, 255 ; node 11
OCTTREE_NODE 254, 254, 255, 255, 254, 254, 255, 255 ; node 12
OCTTREE_NODE 254, 255, 254, 254, 254, 254, 254, 254 ; node 13
OCTTREE_NODE 254, 254, 255, 255, 254, 254, 254, 255 ; node 14
OCTTREE_NODE 254, 254, 255, 254, 254, 254, 255, 254 ; node 15
crash_end_1 label word
model_crash_end label word
BGL_RETURN
LOD_0000_0L label word
include tower_1_0.asm
LOD_0000_1L label word
include tower_0_0.asm
OBJECT_0_END label word
EOF
Whats the problem with it? In FS only visible the tower_1_0.asm model and the other one never.

