Sign in to follow this  
NWATech

RGBS Color Mode

Recommended Posts

A couple of years ago Graham Oxtoby created some super little ramp light macros (called ramp1 amd ramp2.api in ramplite.zip). In these he very successfully used color transparency to create the light beam effect. I've created some custom ramp light macros for my current project using EOD and I've tried to emulate Graham without success. I've created a custom object for the light cone but I'm danged if I can make it disappear during the day. Unfortunately Graham didn't give an email address in his zip file so I'm hoping someone here might be able to help.I've checked out Graham's API code and isolated the bit that gives his light beam, as follows.; Part: No Name.2:Part39Dbx( 39 00 0c 00 8c 02 06 00 23 00 06 00 22 00 )VecPoints( 0 67 249 8 10913 13665 -27709 ; 0 66 263 14 12824 29734 -5006 ; 1 295 -5 336 23143 12544 19511 ; 2 295 -7 20 18982 -9955 -24783 ; 3 -68 249 8 -10362 5227 -30642 ; 4 -69 263 14 -16035 23709 -15950 ; 5 -313 -5 336 -32159 -4634 4240 ; 6 -313 -7 20 -13844 -15481 -25344 ; 7 );RGBSColor( b3 227 227 227 )Dwx( 2d ) ; color commandDbd( 227 ) ; redDbx( b3 ) ; flag/transparencyDbd( 227 ) ; greenDbd( 227 ) ; blueShadedPoly( 25008 21171 -146 219.88 0 1 2 3 )ShadedPoly( 0 25150 21003 210.65 5 6 2 1 )ShadedPoly( 0 -32766 226 8.41 6 7 3 2 )ShadedPoly( 0 -1521 -32731 -20.06 7 4 0 3 )ShadedPoly( -27381 3669 -17619 80.66 7 6 5 4 )ReturnMy comparable code is as follows:part006; custom - Custom object 7VecPoints( a 56 0 -72 -144 ; 0 -144 -72 0 ; 1 0 -72 144 ; 2 144 -72 0 ; 3 0 72 -9 ; 4 -9 72 0 ; 5 0 72 9 ; 6 9 72 0 ; 7)RGBSColor( EA 227 227 227 )ShadedPoly( aibL 223 135 252 107 59 63 60 56 ) ;Inside Side 4RGBSColor( EA 227 227 227 )ShadedPoly( aibL 223 135 252 107 58 62 63 59 ) ;Inside Side 3RGBSColor( EA 227 227 227 )ShadedPoly( aibL 223 135 252 107 57 61 62 58 ) ;Inside Side 2RGBSColor( EA 227 227 227 )ShadedPoly( aibL 223 135 252 107 56 60 61 57 ) ;Inside Side 1RGBSColor( EA 227 227 227 )ShadedPoly( aibL 223 135 252 107 63 62 61 60 ) ;Inside TopRGBSColor( EA 227 227 227 )ShadedPoly( abL 223 135 252 107 56 60 63 59 ) ;Side 4RGBSColor( EA 227 227 227 )ShadedPoly( abL 223 135 252 107 59 63 62 58 ) ;Side 3RGBSColor( EA 227 227 227 )ShadedPoly( abL 223 135 252 107 58 62 61 57 ) ;Side 2RGBSColor( EA 227 227 227 )ShadedPoly( abL 223 135 252 107 57 61 60 56 ) ;Side 1RGBSColor( EA 227 227 227 )ShadedPoly( abL 223 135 252 107 60 61 62 63 ) ;TopReturnI've used EA on this occasion to give moderately transparent mid grey(the same RGB color that Graham used)Anyone give me advice on why mine doesn't work? I understand the principles but have to admit that it's rather beyond my level of current knowledge.Roger

Share this post


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

To let your beam dissapear at night try these changes to your code:

:part006IfVarRange( :nolight 28C 2 4 ); custom - Custom object 7VecPoints( a 560 -72 -144; 0-144 -72 0; 10 -72 144; 2144 -72 0; 30 72 -9; 4-9 72 0; 50 72 9; 69 72 0; 7)RGBSColor( EA 227 227 227 )ShadedPoly( aibL 223 135 252 107 59 63 60 56 );Inside Side 4ShadedPoly( aibL 223 135 252 107 58 62 63 59 );Inside Side 3ShadedPoly( aibL 223 135 252 107 57 61 62 58 );Inside Side 2ShadedPoly( aibL 223 135 252 107 56 60 61 57 );Inside Side 1ShadedPoly( aibL 223 135 252 107 63 62 61 60 );Inside TopShadedPoly( abL 223 135 252 107 56 60 63 59 );Side 4ShadedPoly( abL 223 135 252 107 59 63 62 58 );Side 3ShadedPoly( abL 223 135 252 107 58 62 61 57 );Side 2ShadedPoly( abL 223 135 252 107 57 61 60 56 );Side 1ShadedPoly( abL 223 135 252 107 60 61 62 63 );Top:nolightReturn

Also I have removed the repeated color commands, it is not needed to repeat it if the color does not change.I hope this helps,Arno


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

Share this post


Link to post
Share on other sites

Arno, thanks so much. I just had to remove the 'a' at the beginning of the vecpoints declaration and play around with colour and transparency and your suggestion worked beautifully.This is a daytime view across the main apron of my upcoming (eventually!) new Kai Takhttp://www.flightsim.ukgo.com/webpics/apron.jpgThis is the same view at dusk.http://www.flightsim.ukgo.com/webpics/apron_dusk.jpgMagic! I'm very pleased. Thanks againRoger

Share this post


Link to post
Share on other sites

I forgot all about these lights. Real nice. I think I will use them at a airport I have in mind.I would like to have a different color of beam, like the slight gold/amber/yellow -ish. Not the bold street light color.Any suggestion is great.Oh, and don't flame me for this, but how, scasm to API format, never did it before.Thanks,Jay_____________________________________________________________________

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