Sign in to follow this  
Guest

why is there still shadow in my asm ?

Recommended Posts

Trying to make a ground poly with gmax and having the shadow problems like other users (shadow covering the whole surface of the poly) that I ready post I make the required change in the asm file this look like this:;compile with BGLC /BGL C:gmaxgamepacksflightsimtestsol.asmheader label word dw 0001 ; 00 World set number dd 00055E017H ; 02 North bound dd 00055DF3DH ; 06 South bound dd 003E1CF9CH ; 10 East bound dd 003E1CF9AH ; 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 02AEFh ;;lat min (inclusive) 512M units dw 02AF1h ;;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 00055DFAAh,003E1CF9Bh ; 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_SCALEOBJECT_0_FAIL label BGLCODE BGL_JUMP_32 OBJECT_0_END OBJECT_0_SCALE label BGLCODE SCALE_AGL OBJECT_0_RETURN, 10000, 109, 131072, 00055DFAAh, 00777h, 003E1CF9Bh, 044CCh, 0, 0 BGL_CALL OBJECT_0_BEGINOBJECT_0_RETURN label word BGL_RETURNOBJECT_0_BEGIN label wordmodel_outside label BGLCODE BGL_CALL model_crashmodel_shadow label BGLCODELOD_0 label BGLCODE BGL_JUMP_32 LOD_0Lmodel_inside label BGLCODE BGL_RETURNmodel_crash label BGLCODE BGL_CRASH_START model_crash_end, 218 BGL_CRASH_OCTTREE crash_end_1 dw CRASH_FLAG_OBJECT ; crash type dw 1 ; nodes used real4 -170.588593,0.000000,-134.445877 ; Box x,y,z real4 200.000198,66.666733,200.000198 ; Box w,h,d dw 1, 1, 1, 1, 1, 1, 1, 1 ; base offset into node table, one for each top-level branch ; So if you take branch 2 (count from 0), you add 1 to indices you encounter on that branch ; Nodes (254=empty 255=full, else an index into branch) OCTTREE_NODE 254, 254, 254, 254, 254, 254, 254, 254 ; node 0crash_end_1 label wordmodel_crash_end label word BGL_RETURNLOD_0L label BGLCODE include C:gmaxgamepacksflightsimtestsol_0.asmOBJECT_0_END label wordEOFThen I compile this with fsregen and I have this:; Library Compiler - fsregen v0.31b by G.Ioannu ; Freeware. Commercial use is prohibited.; header label word dw 0001 dd 000989D57H dd 0FF6914C5H dd 07FFFFFFFH dd 080B60B62H dw 22 dup(0) dd (offset LIBRARY_DATA) - (offset header) dw 10 dup(0) dd 01E1B3836h dd 04CD7210Eh dd 01E1B3836h dd 04CD7210Eh dw 14 dup(0)LIBRARY_DATA label word dd (offset LIBRARY_0) - (offset LIBRARY_DATA) dd 01E1B3836h, 04CD7210Eh, 0027E0387h, 03BCC0816h dd 0,6,8 dd (offset LIBRARY_DATA)LIBRARY_0 label word dd 01E1B3836h, 04CD7210Eh, 0027E0387h, 03BCC0816h db 100 dd (offset LIBRARY_0_HE) - (offset LIBRARY_0) dd (offset LIBRARY_0_END) - (offset LIBRARY_0_START) dd 109 dd 131072 dd 0 dd 0 db "testsol" dd 0LIBRARY_0_HE label wordLIBRARY_0_START label word include C:gmaxgamepacksflightsimtestsol_0.asmLIBRARY_0_END label word dd 0,0,0,0the shadow is still there if I put the ";" or not can somebody explain me what I m doing wrong.In advance thks to everybody.MichelP.S. I also try to disable the entire line but still the same results. - also do you use to do that in gmax the rectangle or box (with 0.01 as width) because with the rectangle the texture is flikkering and with the box not. (what s the best solution ?) regarding the shadow problem I try the two solutions but have the same result, I put here the rectangle asm file I hope the solution will work also for the box asm file

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Arno, Unfortunatly, I already look to your site (it s the first site I look after AVSIM forum) and try the modifications you give but this shadow is still there. It s the reason I try this other tip I found here on the forum :-).It's why I ask me if using Fsregen Library compiler there is no somthing happening disabling the line modification you give to make the shadow not work.Thanks for your help.MichelP.S.: I m sure it s a shadow problem because if I disable the option in FS it disapear.

Share this post


Link to post
Share on other sites

Can you maybe post a screenshot of the problem? It seems the problem is not the shadow generated by the object self (then you would have been able to disable it).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Hi Michel,I've followed Arno's tips and I got a rock-solid ground poly in FS, without any shadow or 'flickering' effect. The aircraft's shadow is displayed OK too.It's not enough to delete the command line SHADOW_CALL OBJECT_0_SCALEYou must also edit the command lineADDOBJ OBJECT_0_SCALE (it's the one immediately above the 'SHADOW_CALL....)as follows:ADDCAT OBJECT_0_SCALE, 8This's equivalent to the 'LayerCall' SCASM command, where the '8' parameter is the layer level you assign to your polygon.Of course, you can also assign different layer levels, so you can overlap several polys without visual problems.Hope this helps,

Share this post


Link to post
Share on other sites

Hi and thanks for your help, I try with Arno's modifications and post you here under the line I modify:...OBJECT_0 label BGLCODE db 12 ; NEAR_FAR_HUGE_OBJECT_HEADER dd 00055DFAAh,003E1CF9Bh ; 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 ADDCAT OBJECT_0_SCALE, 9OBJECT_0_FAIL label BGLCODE ;SHADOW_CALL OBJECT_0_SCALEOBJECT_0_FAIL label BGLCODE BGL_JUMP_32 OBJECT_0_END OBJECT_0_SCALE label BGLCODE SCALE_AGL OBJECT_0_RETURN, 10000, 109, 131072, 00055DFAAh, 00777h, 003E1CF9Bh, 044CCh, 0, 0 BGL_CALL OBJECT_0_BEGINOBJECT_0_RETURN label word BGL_RETURN...But this shadow is still present I post also the screenshot off the problem.I have to thanks all off you a lot. It sure that without your help my scenery will always be at the begin and me with a lot of questions without answers.Many thanksMichel

Share this post


Link to post
Share on other sites

Try this code:[tt]OBJECT_0 label BGLCODEdb 12 ; NEAR_FAR_HUGE_OBJECT_HEADERdd 00055DFAAh,003E1CF9Bh ; latitude,longitude db 100 ; image power dd (offset OBJECT_0_END) - (offset OBJECT_0) OBJECT_0_START label wordIFIN1 OBJECT_0_FAIL, image_complex, 2, 32767ADDCAT OBJECT_0_SCALE, 8OBJECT_0_FAIL label BGLCODEBGL_JUMP_32 OBJECT_0_END OBJECT_0_SCALE label BGLCODESCALE_AGL OBJECT_0_RETURN, 10000, 109, 131072, 00055DFAAh, 00777h, 003E1CF9Bh, 044CCh, 0, 0BGL_CALL OBJECT_0_BEGINOBJECT_0_RETURN label wordBGL_RETURN[/tt]You had one line double and also I think it is better to use layers that are a multiple of 4 (so 4, 8, 12, etc).Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

How are you calling the Library object in the scenery?If you are using a macro to place the object then check that the macro doesn`t contain a ShadowCall() line. This is the usual procedure for calling library objects as usually you will want the shadow. However for ground polys you definitely don`t...

Share this post


Link to post
Share on other sites

True, but I think it makes no sense to use a library for ground polygons. If you are using a library it is all in the calling macro and no longer in the asm file, as that is not used.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Re-re-re hello and re-re-re thanks,I try your tips and here is the new file but also disable an other line where shadow appears :;compile with BGLC /BGL C:gmaxgamepacksflightsimtestsol.asmheader label word dw 0001 ; 00 World set number dd 00055E017H ; 02 North bound dd 00055DF3DH ; 06 South bound dd 003E1CF9CH ; 10 East bound dd 003E1CF9AH ; 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 02AEFh ;;lat min (inclusive) 512M units dw 02AF1h ;;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 00055DFAAh,003E1CF9Bh ; 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 ADDCAT OBJECT_0_SCALE, 12 <---------- THIS ONEOBJECT_0_FAIL label BGLCODE BGL_JUMP_32 OBJECT_0_END OBJECT_0_SCALE label BGLCODE SCALE_AGL OBJECT_0_RETURN, 10000, 109, 131072, 00055DFAAh, 00777h, 003E1CF9Bh, 044CCh, 0, 0 BGL_CALL OBJECT_0_BEGINOBJECT_0_RETURN label word BGL_RETURNOBJECT_0_BEGIN label wordmodel_outside label BGLCODE BGL_CALL model_crash;model_shadow label BGLCODE <------- THIS ONELOD_0 label BGLCODE BGL_JUMP_32 LOD_0Lmodel_inside label BGLCODE BGL_RETURNmodel_crash label BGLCODE BGL_CRASH_START model_crash_end, 218 BGL_CRASH_OCTTREE crash_end_1 dw CRASH_FLAG_OBJECT ; crash type dw 1 ; nodes used real4 -170.588593,0.000000,-134.445877 ; Box x,y,z real4 200.000198,66.666733,200.000198 ; Box w,h,d dw 1, 1, 1, 1, 1, 1, 1, 1 ; base offset into node table, one for each top-level branch ; So if you take branch 2 (count from 0), you add 1 to indices you encounter on that branch ; Nodes (254=empty 255=full, else an index into branch) OCTTREE_NODE 254, 254, 254, 254, 254, 254, 254, 254 ; node 0crash_end_1 label wordmodel_crash_end label word BGL_RETURNLOD_0L label BGLCODE include C:gmaxgamepacksflightsimtestsol_0.asmOBJECT_0_END label wordEOFBut the shadow is still there :-(. I really don't understand.Thanks once more for your help.P.S.: I use Fsregen to make the API and place it with Airport 2.6 156Can that be the reason of the problem ?Michel.

Share this post


Link to post
Share on other sites

Yes, if you have made the API with FsRegen it will have the ShadowCall. The trick on my site is only when you don't create a library first, just to export straight from GMax.Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Yep, I also guess the problem is there.I also export my ground poly(s) from Gmax into FS directly, and no problem occurs (making the hand modification you already know).

Share this post


Link to post
Share on other sites

Yes Yes Yes, You are perfectly right, If I put the file direct in FS not using fsregen it s working very well :-). The shadow disapear :-).But now a last question: if not using airport 2.6 or other prog. how do you do to put the ground poly exactly where you want that it appears in your scenery.In every case thanks for your usefull help.(I hope to be, a day, so usefull for others)Michel

Share this post


Link to post
Share on other sites

You can enter the exact coordinates in the exporter of GMax.If you still want to use Airport, you must makes some changes to the macro, try something like this then:[tt]Area( 5 %1 %2 22 )LayerCall( :L1 8 )Jump( : ):L1mif( %11 )RefPoint( 2 :E1 %4 %1 %2 E= %11 v1= %10 %13 %14 )melseRefPoint( 7 :E1 %4 %1 %2 v1= %10 %13 %14 )mifendRotatedCall( :R1 0 0 %5 )Return:R1CallLibObj( 0 11111979 25052002 00000000 00000003 ):E1ReturnEndA[/tt]Arno


Member Netherlands 2000 Scenery Team[a href=http://home.wanadoo.nl/arno.gerretsen]http://home.wanadoo.nl/arno.gerretsen/banner.jpg[/a]

Share this post


Link to post
Share on other sites

Holalalala, sorry Arno but it goes a little bit to fast for me, I have to say that s the first scenery I make :-).Here is the macro I create with Fsregen:Do you confirm the line I put a "<----" is the one I have to modify ?And have I to hold "(: OBJ)" or have I to put "( :L1 8 )" even if the layer is 12 ?; --- Created by FsRegen v0.31bmif (0)Area( 5 %1 %2 1 )RotatedCall( :symbol 0 0 %5 )Jump( :endsymbl ):symbolRefPoint( 7 : 0.5 %1 %2 )Points( 0-171 0 -135-171 0 6529 0 6529 0 -135-71 0 -35)Poly( a 0 1 2 3 )Poly( a 0 4 3 )Return:endsymblEndAmifendArea( 5 %1 %2 22 )perspectivecall( :OBJ )shadowcall( :OBJ ) <--------- HEREjump( : ):OBJmif( %11 )refpoint( 2 :END %4 %1 %2 E= %11 v1= %10 %13 %14 )melserefpoint( 7 :END %4 %1 %2 v1= %10 %13 %14 )mifendrotatedcall( :ROT 0 0 %5 )return:ROTcallLibobj( 0 BCA6E7FF 4D1CD4D3 6C36908B 2F5F64BF ):ENDreturnEndAThanks a lot for your help once moreMichel

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this