Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Fence.. Sun light effects (see Pic)

Featured Replies

Hi allI'm back with my fence and a lighting/shading problem. In the picture below there is two identical DXT1(A), one with minus a post!!! the time of day is middayI can't understand why the lighting is different on them, the textures come from the same *.psp file/source, below is the code I have used, calling from a library object...

; ------------------------------------------------------------------------; FENCE MACRO; ------------------------------------------------------------------------ Area( 5 52:37:52.257002 -03:09:3.908071 5 );   Start of library call  IfVarRange( : 346 3 32767 ) PerspectiveCall( :persp ) Jump( : ):persp;   Perspective :Fence1;-------------------------------------------------------------------------   RefPoint( rel :Fence2  1 52:37:52.257002 -03:09:3.908071 		V1= 2000 V2= 1000 )       RotatedCall( :objcall 0 0 47.402679 ); rotate object to user preset	  :Fence2;-------------------------------------------------------------------------      RefPoint( rel :Fence3 1 52:37:52.257002 -03:09:3.908071 		V1= 2000 V2= 1000 )       RotatedCall( :Trans_01 0 0 47.402679 ); rotate object to user preset      :Trans_01	 	  TransformCall( :objcal2 -7 0 0			  0 0000   0 0000   0 0000 )

This is the Object in the Library, I have rem'ed out alot of commands because I thought they were old and unnecessary, I could be wrong!!! didn't want crash detection, either!!

;---------------------------------------------------------------------------------------------; FENCE---Twin--Posts-------------------------------------------------------------------------;---------------------------------------------------------------------------------------------ObjId( 0013CC70 0013CC6E 00517344 4D415402 )  LibObj( PWR 100 SIZE 0 SCALE 0.1 TYPE 0x203 NAME Fence ) ;:fence_01;	ShadowCall( :fence_02 );:fence_02Monitor3D( :fence_nocrash -0 0 0 0 -0 0 );Setvar( 284 14 ):fence_nocrashPoints( 0	-3 0 0							; 0	-3 4 0							; 1	 3 4 0							; 2	 3 0 0							; 3	  )LoadBitmap( 0 0 0 0 0 0 Wfence.bmp  );ConcavePoly;BitmapMode( 1 );Inst_7DTexPoly(   a   		0   0	0  ; point 0		1   0	255; point 1		2   255  255; point 2		3   255  0  ; point 3		);BitmapMode( 0 );ConcavePoly;BitmapMode( 1 );Inst_7DTexPoly(   a   		3   255  0  ; point 3		2   255  255; point 2		1   0	255; point 1		0   0	0  ; point 0		);BitmapMode( 0 )Return:EndEndObj; End of LibraryObject ;---------------------------------------------------------------------------------------------; FENCE1--Single--Post------------------------------------------------------------------------;---------------------------------------------------------------------------------------------ObjId( 0023CD70 0023CC6E 00517344 4D411402 )  LibObj( PWR 100 SIZE 0 SCALE 0.1 TYPE 0x203 NAME Fence ) ;:fence_01;	ShadowCall( :fence_02 );:fence_02Monitor3D( :fence_nocrash -0 0 0 0 -0 0 );Setvar( 284 14 ):fence_nocrashPoints( 0	-3 0 0							; 0	-3 4 0							; 1	 3 4 0							; 2	 3 0 0							; 3	  )LoadBitmap( 0 0 0 0 0 0 Wfence01.bmp  );ConcavePoly;BitmapMode( 1 );Inst_7DTexPoly(   a   		0   0	0  ; point 0		1   0	255; point 1		2   255  255; point 2		3   255  0  ; point 3		);BitmapMode( 0 );ConcavePoly;BitmapMode( 1 );Inst_7DTexPoly(   a   		3   255  0  ; point 3		2   255  255; point 2		1   0	255; point 1		0   0	0  ; point 0		);BitmapMode( 0 )Return:EndEndObj; End of LibraryObject

I am uncertain why in the texpoly() command the 0-3 are reversed for the otherside of the fence!!once again I am in need of help, hope somebody can!!!

  • Commercial Member

>I am uncertain why in the texpoly() command the 0-3 are >reversed for the otherside of the fence!! That's just what I wanted to ask. Normally you use the option a and ai for the two different sides. But I know for the new FP commands the order of the points also has an influence on which side is drawn, maybe this is the same.For the rest the code looks OK to me, I don't see any differences between the two sources. Do you call them different from the macro?Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Cheers ArnoOnce again, you were looking in the right direction, I'm not reading my Scasm Doc's enough, am I!!!I do actually think I am getting some where, I actually only needed the one Texpoly() (0123), I think I thought you needed one Texpoly() for each side of the polygon!!Thanks againRegardsDave

  • Commercial Member

I don't want to confuse you again, but normally you need one TexPoly for each site. Something like this:TexPoly( a0 ...1 ...2 ...3 ... )TexPoly( ai0 ...1 ...2 ...3 ... )Arno


Member Netherlands 2000 Scenery Team[link:home.wanadoo.nl/arno.gerretsen]Arno's FlightSim World for scenery design hints, tips and other tricks...

Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Hi ArnoThat's enough confusion for one nightI coded the fence like this, which seem ok, except that may be the sunlight effect is applied to both sides. Manfred's notes state that the brightness is apllied equally, which in this case, is! although it does appear to be drawn as if the sun was shining on both sides.

TexPoly( m 0 32766 0 -100		0   0	0  ; point 0		1   0	255; point 1		2   255  255; point 2		3   255  0  ; point 3		)

May be that has confused you!!!The fence I have is what I am looking for, except it may be a little flat looking. I did think about applying a actual 3d post with texture applied, but that would cost more in frame rates.When landing there is a limit to what you can look at, only when taxing and up close could this make a difference!Thanks for your helpDave

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.