Marshaller with SEPARATION_PLANE

Hi everybody,

I am trying to create a Marshaller with SEPARATION_PLANE command as it is described in VGDS wiki about Safedock... I have used a texture 1024x512 divited into 5 equal section, one for the waiting, one for the turn left, one for the straight ahead, one for the turn right and one for stoping position... the problem is that according of my tweaking I can always see the stoping position of the Marshaller... the Marshaller_0.asm is:
;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------
;
; This file was automatically generated from D:\gmax\gamepacks\fs2004\plugins\Marshaller
; using the MakeMDL tool. Do not edit by hand, re-run the
; tool instead.
;
; generated on 02/03/09 00:25:34
;
;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------
; BGL model for D:\gmax\gamepacks\fs2004\plugins\Marshaller
;
; $Header:$
;
;----------------------------------------------------------------------------
;
; Final Status: 2 polys
; Alpha Status: 0 polys
; Light Status: 0 polys
; Library Status: 0 polys
;
; Start Time: 02/03/09 00:25:34
; Stop Time : 02/03/09 00:25:34
;
; Modeling units = 1.0000
; Radius = 2.2361
; Radius in meters = 2.2361
; Radius in modeling units = 3
;
Marshaller_top label BGLCODE
texture_riff_start_Marshaller label word
db 'T','E','X','T'
dd texture_riff_end_Marshaller - $ - 4
TEXTURE_LIST_BEGIN
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 1.414214, "MARSHALLER.BMP" ; 0
TEXTURE_DEF TEXTURE2_NIGHT , <255,255,255,255>, 1.414214, "MARSHALLER.BMP" ; 1
TEXTURE_LIST_END
BGL_RETURN
texture_riff_end_Marshaller label word


material_riff_start_Marshaller label word
db 'M','A','T','E'
dd material_riff_end_Marshaller - $ - 4
MATERIAL_LIST_BEGIN
MATERIAL_DEF 1.000000,1.000000,1.000000,1.000000, 0.392157,0.392157,0.392157, 0.000000,0.000000,0.000000, 0.000000,0.000000,0.000000, 0.000000 ; 0
MATERIAL_LIST_END
BGL_RETURN
material_riff_end_Marshaller label word


vertex_riff_start_Marshaller label word
db 'V','E','R','T'
dd vertex_riff_end_Marshaller - $ - 4
VERTEX_LIST_BEGIN
;
;WAIT
;
VERTEX_DEF -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000,0.000000 ; 0 part
VERTEX_DEF -1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000,1.000000 ; 1 part
VERTEX_DEF 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.200000,0.000000 ; 2 part
VERTEX_DEF 1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.200000,1.000000 ; 3 part
;
;TURN_LEFT
;
VERTEX_DEF -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.200000,0.000000 ; 4 part
VERTEX_DEF -1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.200000,1.000000 ; 5 part
VERTEX_DEF 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.400000,0.000000 ; 6 part
VERTEX_DEF 1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.400000,1.000000 ; 7 part
;
;STRAIGHT_AHEAD
;
VERTEX_DEF -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.400000,0.000000 ; 8 part
VERTEX_DEF -1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.400000,1.000000 ; 9 part
VERTEX_DEF 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.600000,0.000000 ; 10 part
VERTEX_DEF 1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.600000,1.000000 ; 11 part
;
;TURN_RIGHT
;
VERTEX_DEF -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.600000,0.000000 ; 12 part
VERTEX_DEF -1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.600000,1.000000 ; 13 part
VERTEX_DEF 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.800000,0.000000 ; 14 part
VERTEX_DEF 1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.800000,1.000000 ; 15 part
;
;STOP
;
VERTEX_DEF -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.800000,0.000000 ; 16 part
VERTEX_DEF -1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.800000,1.000000 ; 17 part
VERTEX_DEF 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000,0.000000 ; 18 part
VERTEX_DEF 1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000,1.000000 ; 19 part
;
;
;
VERTEX_LIST_END
BGL_RETURN
vertex_riff_end_Marshaller label word


bgl_riff_start_Marshaller label BGLCODE
db 'B','G','L',' '
dd bgl_riff_end_Marshaller - $ - 4
LOD_0_Marshaller label BGLCODE

; NonAlpha
Marshaller_NonAlpha label BGLCODE
include safegate_variable.asm
if VISIBILITY_DISTANCE ge 1
IFIN1 notvisible, 033Bh, 0, VISIBILITY_DISTANCE
endif
BGL_CALL_32 Marshaller_MasterScale_1 ; Node 1 - MasterScale
if VISIBILITY_DISTANCE ge 1
notvisible label word
endif
BGL_END
BGL_RETURN


Marshaller_MasterScale_1 label BGLCODE
;
;DIRECTIONS
;
MATERIAL 0,0 ; <255,255,255,255> MARSHALLER.BMP;;;
BGL_ZBIAS 1
; before stop distance
SEPARATION_PLANE dr10, 0, 0, -32768, 1310680
; 5 meter left
SEPARATION_PLANE dr00, 32768, 0, 0, 147452
DRAW_TRI_BEGIN 4, 4
DRAW_TRI 0, 1, 2 ; poly=2 part=1
DRAW_TRI 3, 2, 1 ; poly=1 part=1
DRAW_TRI_END
BGL_JUMP_32 drend
dr00 label word
; 4 meter left
SEPARATION_PLANE dr01, 32768, 0, 0, 114685
DRAW_TRI_BEGIN 4, 4
DRAW_TRI 0, 1, 2 ; poly=2 part=1
DRAW_TRI 3, 2, 1 ; poly=1 part=1
DRAW_TRI_END
BGL_JUMP_32 drend
dr01 label word
; 3 meter left
SEPARATION_PLANE dr02, 32768, 0, 0, 81918
DRAW_TRI_BEGIN 4, 4
DRAW_TRI 0, 1, 2 ; poly=2 part=1
DRAW_TRI 3, 2, 1 ; poly=1 part=1
DRAW_TRI_END
BGL_JUMP_32 drend
dr02 label word
; 2 meter left
SEPARATION_PLANE dr03, 32768, 0, 0, 49151
DRAW_TRI_BEGIN 4, 4
DRAW_TRI 0, 1, 2 ; poly=2 part=1
DRAW_TRI 3, 2, 1 ; poly=1 part=1
DRAW_TRI_END
BGL_JUMP_32 drend
dr03 label word
; 1 meter left
SEPARATION_PLANE dr04, 32768, 0, 0, 32767
DRAW_TRI_BEGIN 4, 4
DRAW_TRI 0, 1, 2 ; poly=2 part=1
DRAW_TRI 3, 2, 1 ; poly=1 part=1
DRAW_TRI_END
BGL_JUMP_32 drend
dr04 label word
; center
SEPARATION_PLANE dr05, 32768, 0, 0, -32767
DRAW_TRI_BEGIN 8, 4
DRAW_TRI 0, 1, 2 ; poly=2 part=1
DRAW_TRI 3, 2, 1 ; poly=1 part=1
DRAW_TRI_END
BGL_JUMP_32 drend
dr05 label word
; 1 meter right
SEPARATION_PLANE dr06, 32768, 0, 0, -49151
DRAW_TRI_BEGIN 12, 4
DRAW_TRI 0, 1, 2 ; poly=2 part=1
DRAW_TRI 3, 2, 1 ; poly=1 part=1
DRAW_TRI_END
BGL_JUMP_32 drend
dr06 label word
; 2 meter right
SEPARATION_PLANE dr07, 32768, 0, 0, -81918
DRAW_TRI_BEGIN 12, 4
DRAW_TRI 0, 1, 2 ; poly=2 part=1
DRAW_TRI 3, 2, 1 ; poly=1 part=1
DRAW_TRI_END
BGL_JUMP_32 drend
dr07 label word
; 3 meter right
SEPARATION_PLANE dr08, 32768, 0, 0, -114685
DRAW_TRI_BEGIN 12, 4
DRAW_TRI 0, 1, 2 ; poly=2 part=1
DRAW_TRI 3, 2, 1 ; poly=1 part=1
DRAW_TRI_END
BGL_JUMP_32 drend
dr08 label word
; 4 meter right
SEPARATION_PLANE dr09, 32768, 0, 0, -147452
DRAW_TRI_BEGIN 12, 4
DRAW_TRI 0, 1, 2 ; poly=2 part=1
DRAW_TRI 3, 2, 1 ; poly=1 part=1
DRAW_TRI_END
BGL_JUMP_32 drend
dr09 label word
; 5 meter right
DRAW_TRI_BEGIN 12, 4
DRAW_TRI 0, 1, 2 ; poly=2 part=1
DRAW_TRI 3, 2, 1 ; poly=1 part=1
DRAW_TRI_END
BGL_JUMP_32 drend
dr10 label word
; stop
DRAW_TRI_BEGIN 16, 4
DRAW_TRI 0, 1, 2 ; poly=2 part=1
DRAW_TRI 3, 2, 1 ; poly=1 part=1
DRAW_TRI_END
drend label word
BGL_ZBIAS 0
;
BGL_RETURN


bgl_riff_end_Marshaller label BGLCODE

;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------
;
; This file was automatically generated from D:\gmax\gamepacks\fs2004\plugins\Marshaller
; using the MakeMDL tool. Do not edit by hand, re-run the
; tool instead.
;
; generated on 02/03/09 00:25:34
;
;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------
...any idea?..
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

If I see it correct your first check:

Code:
SEPARATION_PLANE dr10, 0, 0, -32768, 1310680
Ensures that the following checks are only performance when you are further than 40 meters from the stopping point. when you are closer it will always display the stop situation. Is that what you intended?

Later you can also optimize the code more, because now you are repeating the same assignment for left 2, 3, 4 meters, etc. That means you can also drop those extra checks.
 
Hi again...

so, the info you gave me, Arno, was very helpfull and realy thank you... after some trying and fail I managed to get my Marshaller to react. Now, he appears when NAV2 is tuned at 111.00 and remains at the "WAIT" position untill I reach 80 m from him, where he starts showing directions... but, I would like him to fall at "STOP" position when I am, let's say, 40 m before him... any suggestion?

;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------
;
; This file was automatically generated from D:\gmax\gamepacks\fs2004\plugins\Marshaller
; using the MakeMDL tool. Do not edit by hand, re-run the
; tool instead.
;
; generated on 02/03/09 00:25:34
;
;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------
; BGL model for D:\gmax\gamepacks\fs2004\plugins\Marshaller
;
; $Header:$
;
;----------------------------------------------------------------------------
;
; Final Status: 2 polys
; Alpha Status: 0 polys
; Light Status: 0 polys
; Library Status: 0 polys
;
; Start Time: 02/03/09 00:25:34
; Stop Time : 02/03/09 00:25:34
;
; Modeling units = 1.0000
; Radius = 2.2361
; Radius in meters = 2.2361
; Radius in modeling units = 3
;
Marshaller_top label BGLCODE
texture_riff_start_Marshaller label word
db 'T','E','X','T'
dd texture_riff_end_Marshaller - $ - 4
TEXTURE_LIST_BEGIN
TEXTURE_DEF TEXTURE_BUILDING , <255,255,255,255>, 1.414214, "MARSHALLER.BMP" ; 0
TEXTURE_DEF TEXTURE2_NIGHT , <255,255,255,255>, 1.414214, "MARSHALLER.BMP" ; 1
TEXTURE_LIST_END
BGL_RETURN
texture_riff_end_Marshaller label word


material_riff_start_Marshaller label word
db 'M','A','T','E'
dd material_riff_end_Marshaller - $ - 4
MATERIAL_LIST_BEGIN
MATERIAL_DEF 1.000000,1.000000,1.000000,1.000000, 0.392157,0.392157,0.392157, 0.000000,0.000000,0.000000, 0.000000,0.000000,0.000000, 0.000000 ; 0
MATERIAL_LIST_END
BGL_RETURN
material_riff_end_Marshaller label word


vertex_riff_start_Marshaller label word
db 'V','E','R','T'
dd vertex_riff_end_Marshaller - $ - 4
VERTEX_LIST_BEGIN
;
;WAIT
;
VERTEX_DEF -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000,0.000000 ; 0 part
VERTEX_DEF -1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000,1.000000 ; 1 part
VERTEX_DEF 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.200000,0.000000 ; 2 part
VERTEX_DEF 1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.200000,1.000000 ; 3 part
;
;TURN_LEFT
;
VERTEX_DEF -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.200000,0.000000 ; 4 part
VERTEX_DEF -1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.200000,1.000000 ; 5 part
VERTEX_DEF 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.400000,0.000000 ; 6 part
VERTEX_DEF 1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.400000,1.000000 ; 7 part
;
;STRAIGHT_AHEAD
;
VERTEX_DEF -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.400000,0.000000 ; 8 part
VERTEX_DEF -1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.400000,1.000000 ; 9 part
VERTEX_DEF 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.600000,0.000000 ; 10 part
VERTEX_DEF 1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.600000,1.000000 ; 11 part
;
;TURN_RIGHT
;
VERTEX_DEF -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.600000,0.000000 ; 12 part
VERTEX_DEF -1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.600000,1.000000 ; 13 part
VERTEX_DEF 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.800000,0.000000 ; 14 part
VERTEX_DEF 1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.800000,1.000000 ; 15 part
;
;STOP
;
VERTEX_DEF -1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.800000,0.000000 ; 16 part
VERTEX_DEF -1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.800000,1.000000 ; 17 part
VERTEX_DEF 1.000000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000,0.000000 ; 18 part
VERTEX_DEF 1.000000, 2.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.000000,1.000000 ; 19 part
;
;
;
VERTEX_LIST_END
BGL_RETURN
vertex_riff_end_Marshaller label word


bgl_riff_start_Marshaller label BGLCODE
db 'B','G','L',' '
dd bgl_riff_end_Marshaller - $ - 4
LOD_0_Marshaller label BGLCODE

; NonAlpha
Marshaller_NonAlpha label BGLCODE
IFIN1 lbl_end, 07C2h, 1100h, 1100h
BGL_CALL_32 Marshaller_MasterScale_1 ; Node 1 - MasterScale
lbl_end label word
BGL_END
BGL_RETURN


Marshaller_MasterScale_1 label BGLCODE
;
;DIRECTIONS
;
MATERIAL 0,0 ; <255,255,255,255> MARSHALLER.BMP;;;
BGL_ZBIAS 1
; Before stop distance
SEPARATION_PLANE dr03, 6511, 0, -32155, -2621360;;; -80 m
; Left
SEPARATION_PLANE dr00, 32115, 0, 6511, 32767
DRAW_TRI_BEGIN 4, 4
DRAW_TRI 0, 1, 2 ; poly=2 part=1
DRAW_TRI 3, 2, 1 ; poly=1 part=1
DRAW_TRI_END
BGL_JUMP_32 drend
dr00 label word
; Center
SEPARATION_PLANE dr01, 32115, 0, 6511, -32767
DRAW_TRI_BEGIN 8, 4
DRAW_TRI 0, 1, 2 ; poly=2 part=1
DRAW_TRI 3, 2, 1 ; poly=1 part=1
DRAW_TRI_END
BGL_JUMP_32 drend
dr01 label word
; Right
DRAW_TRI_BEGIN 12, 4
DRAW_TRI 0, 1, 2 ; poly=2 part=1
DRAW_TRI 3, 2, 1 ; poly=1 part=1
DRAW_TRI_END
BGL_JUMP_32 drend
dr03 label word
; Wait
DRAW_TRI_BEGIN 0, 4
DRAW_TRI 0, 1, 2 ; poly=2 part=1
DRAW_TRI 3, 2, 1 ; poly=1 part=1
DRAW_TRI_END
drend label word
BGL_ZBIAS 0
;
BGL_RETURN


bgl_riff_end_Marshaller label BGLCODE

;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------
;
; This file was automatically generated from D:\gmax\gamepacks\fs2004\plugins\Marshaller
; using the MakeMDL tool. Do not edit by hand, re-run the
; tool instead.
;
; generated on 02/03/09 00:25:34
;
;--------- WARNING - WARNING - WARNING - WARNING - WARNING - WARNING ---------
 
Thanks Arno,

it 's working :)... after that I thought to go one more step deeper into tweaking by adding some animation... so, based on your "blinking lights" on safedocks, I tried to get it, but the result was quite strange and meshed up, as it concerns to the part of texture every time appears... those are my files, could you please have a look Arno or enybody else?
 

Attachments

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Hi,

Looking at your texture I am a little confused. What kind of animation do you expect? Would you not need some more pictures with the arms in intermediate positions to be able to make a nice animation?

For the blinking lights it was just turn something on or off based on the timer. You could do the same to switch between two (or more textures).

But when looking at your texture mapping it seems that you are using the same piece of texture now for different movement. That will give a weird result, did you intend to make the mapping like that?
 
Hi,

you are correct Arno, I modified my texture and .ASM code a bit this morning... now it works as it should be, not intermediate animations yet... but, works ;)
Once again a great THANKS!!!..
 

Attachments

Top