Jump to content

Lets talk Lights Data Blocks


SkateZilla

Recommended Posts

make sure all your { } ( ) and syntax is right...

 

I also get booted after 50% loading if I have another module that shares the same name as another.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

OK, Subbing my mesh in place of the A-10C's EDM,

 

all Lights work (Strobes, Position etc.)

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

also I think the code i copy/pasted above was missing 2 lines for the collection group.

 

 

lights_data = {
typename = "collection",
lights = {
   [1] = { typename = "collection", 
		lights = {-- Left Anticollision Light
					{typename = "natostrobelight",
					connector = "Left_Position_Light_Red",
					argument_1 = 195,
					period = 1.2,
					phase_shift = 0},
				  -- Right Anticollision Light
					{typename = "natostrobelight",
					connector = "Right_Position_Light_Green",
					argument_1 = 196,
					period = 1.2,
					phase_shift = 0},						
				  -- Vertical Stab Anticollision Light
					{typename = "natostrobelight",
					connector = "Top_Tail_Light_Bano",
					argument_1 = 192,
					period = 1.2,
					phase_shift = 0},
				  }
		 },
[2] = { typename = "collection",
		lights = {-- Landing light
					{typename = "spotlight",
					connector = "MAIN_SPOT_PTR001",
					argument = 209,
					dir_correction = {elevation = math.rad(-1)}},
					-- Landing/Taxi light
					{typename = "spotlight",
					connector = "MAIN_SPOT_PTR002",
					argument = 208,
					dir_correction = {elevation = math.rad(3)}},
				 }
	  },
   [3]	= {	typename = "collection",
		lights = {-- Left Position Light (Red)
		            {typename = "omnilight",
					connector = "Left_Position_Light_Red",
					color = {0.99, 0.11, 0.3},
					pos_correction  = {0, 0, -0.2},
					argument  = 190},
				  -- Right Position Light (Green)
					{typename = "omnilight",
					connector = "Right_Position_Light_Green",
					color = {0, 0.894, 0.6},
					pos_correction = {0, 0, 0.2},
					argument  = 191},
				  -- Tail Position Light (White)
					{typename = "omnilight",
					connector = "Tail_Position_Light_01",
					color = {1, 1, 1},
					pos_correction  = {0, 0, 0},
					argument  = 203}
				 }
	  },
  
[4] = {	typename = "collection",
			lights = {{typename = "collection",
					   lights = {
								 -- Top Formation Light (white)
								 {typename = "omnilight",
								  connector = "Top_Fuselage_Light_Red",
								  color = {0.99, 0.11, 0.3},
								 },
								 {typename  = "argumentlight", argument = 202},
								 -- Bottom Formation Light (white)
								 {typename = "omnilight",
								  connector = "Bott_Fuselage_Light_Red",
								  color = {0.99, 0.11, 0.3},
								 },
								 {typename  = "argumentlight", argument = 201},
								}
						},
						-- Electroluminescent formation lights
						{typename  = "argumentlight", argument = 200},
					 }
								},
[5]	= {typename = "collection",
		lights = {
					{typename = "collection",
					lights = {{
							-- Left Wing Floodlight
							typename  = "spotlight",
							position  = {-3.038, -0.028, -3.925},
							color = {1.0, 1.0, 1.0},
							intensity_max = 6.0, angle_max = 0.45,
							direction = {azimuth = math.rad(45)},
							argument = 211,
							dont_change_color = false,
							angle_change_rate = 0
						   },
						   {
							-- Right Nose Floodlight
							typename = "spotlight",
							position  = {-3.038, -0.028, 3.925},
							color = {1.0, 1.0, 1.0},
							intensity_max = 6.0,
							angle_max = 0.45,
							direction = {azimuth = math.rad(-45)},
							argument = 210,
							dont_change_color = false,
							angle_change_rate = 0
						   }
					}
				},
				-- UARRSI light
				{
					typename = "omnilight", position  = {-0.586, -0.395, 1.976}, color = {1, 1, 1}
				}
			  },
		}
	}
},
}

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

also I think the code i copy/pasted above was missing 2 lines for the collection group.

 

 

lights_data = {
   typename = "collection",
   lights = {
   [1] = { typename = "collection", 
           lights = {-- Left Anticollision Light
                       {typename = "natostrobelight",
                       connector = "Left_Position_Light_Red",
                       argument_1 = 195,
                       period = 1.2,
                       phase_shift = 0},
                     -- Right Anticollision Light
                       {typename = "natostrobelight",
                       connector = "Right_Position_Light_Green",
                       argument_1 = 196,
                       period = 1.2,
                       phase_shift = 0},                        
                     -- Vertical Stab Anticollision Light
                       {typename = "natostrobelight",
                       connector = "Top_Tail_Light_Bano",
                       argument_1 = 192,
                       period = 1.2,
                       phase_shift = 0},
                     }
            },
   [2] = { typename = "collection",
           lights = {-- Landing light
                       {typename = "spotlight",
                       connector = "MAIN_SPOT_PTR001",
                       argument = 209,
                       dir_correction = {elevation = math.rad(-1)}},
                       -- Landing/Taxi light
                       {typename = "spotlight",
                       connector = "MAIN_SPOT_PTR002",
                       argument = 208,
                       dir_correction = {elevation = math.rad(3)}},
                    }
         },
   [3]    = {    typename = "collection",
           lights = {-- Left Position Light (Red)
                       {typename = "omnilight",
                       connector = "Left_Position_Light_Red",
                       color = {0.99, 0.11, 0.3},
                       pos_correction  = {0, 0, -0.2},
                       argument  = 190},
                     -- Right Position Light (Green)
                       {typename = "omnilight",
                       connector = "Right_Position_Light_Green",
                       color = {0, 0.894, 0.6},
                       pos_correction = {0, 0, 0.2},
                       argument  = 191},
                     -- Tail Position Light (White)
                       {typename = "omnilight",
                       connector = "Tail_Position_Light_01",
                       color = {1, 1, 1},
                       pos_correction  = {0, 0, 0},
                       argument  = 203}
                    }
         },
  
   [4] = {    typename = "collection",
               lights = {{typename = "collection",
                          lights = {
                                    -- Top Formation Light (white)
                                    {typename = "omnilight",
                                     connector = "Top_Fuselage_Light_Red",
                                     color = {0.99, 0.11, 0.3},
                                    },
                                    {typename  = "argumentlight", argument = 202},
                                    -- Bottom Formation Light (white)
                                    {typename = "omnilight",
                                     connector = "Bott_Fuselage_Light_Red",
                                     color = {0.99, 0.11, 0.3},
                                    },
                                    {typename  = "argumentlight", argument = 201},
                                   }
                           },
                           -- Electroluminescent formation lights
                           {typename  = "argumentlight", argument = 200},
                        }
                                   },
   [5]    = {typename = "collection",
           lights = {
                       {typename = "collection",
                       lights = {{
                               -- Left Wing Floodlight
                               typename  = "spotlight",
                               position  = {-3.038, -0.028, -3.925},
                               color = {1.0, 1.0, 1.0},
                               intensity_max = 6.0, angle_max = 0.45,
                               direction = {azimuth = math.rad(45)},
                               argument = 211,
                               dont_change_color = false,
                               angle_change_rate = 0
                              },
                              {
                               -- Right Nose Floodlight
                               typename = "spotlight",
                               position  = {-3.038, -0.028, 3.925},
                               color = {1.0, 1.0, 1.0},
                               intensity_max = 6.0,
                               angle_max = 0.45,
                               direction = {azimuth = math.rad(-45)},
                               argument = 210,
                               dont_change_color = false,
                               angle_change_rate = 0
                              }
                       }
                   },
                   -- UARRSI light
                   {
                       typename = "omnilight", position  = {-0.586, -0.395, 1.976}, color = {1, 1, 1}
                   }
                 },
           }
       }
   },
}

 

this works well, in ai strobe light of vertical stab not work, no arg no flash, it works for you?

 

 

-- Vertical Stab Anticollision Light {typename = "natostrobelight", connector = "Top_Tail_Light_Bano", argument_1 = 192, period = 1.2, phase_shift = 0},

Link to comment
Share on other sites

it works when using AFM.

 

(ie I Sub the A-10C EDM for mine). AI and SFM cant control the vertical stab strobe.

 

which confirmed what was being told to me all along its an AFM only arg.


Edited by SkateZilla

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

  • 1 year later...

Hey Guys,

sorry I am a rookie in 3ds but willing to learn can anybody tell me how to add connectors to the 3d Model in 3ds?

 

I am thankfull for every help!

__________________

 

Windows 7 Ult 64 Bit | Intel Core i5-3570 | 16GB DDR3-2133 | GTX 770

Link to comment
Share on other sites

The Connectors only place the light source point and dont actually control the 3d Visible Lights.

 

It's the same as the rest of the connectors, a simple helper point placed where the light is, then you link the helper point to the light system in the LUA

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

  • 1 year later...

Not to revive an Old thread, but my method for animating Visibility seems to not be working anymore,

 

I also haven't gotten linear visibilty to work (fade on/off animation as well as variable intensity for brightness).

 

Can one of the other 3rd Party devs provide a Quickie Guide for those?

 

Both 0 - Off,, 1- On and Linear Lighting using the curve editor.

 

thanks in advance...

 

EDIT: Fixed My ON/OFF Light Animations (Had switched some settings to develop for Xbox One),

 

Still havent gotten LINEAR Lighting (Formation Lighting, Fading On/Off) yet.


Edited by SkateZilla

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

  • 1 month later...

Ok, seems like it's time to revive this thread...

 

I'm found some way to animate all the light sources in my model.

It's a little "hackish" method but who cares...

 

In DCS it is possible to create five COLLECTION of exterior lighting sourses:

 

1 = WOLALIGHT_STROBES ~~ Does not work for SFM planes in my case.

2 = WOLALIGHT_SPOTS

3 = WOLALIGHT_NAVLIGHTS

4 = WOLALIGHT_FORMATION_LIGHTS

5 = WOLALIGHT_TIPS_LIGHTS ~~ Does not work for SFM planes in my case.

 

This COLLECTION includes declaration of LIGHT TYPES:

spotlight

stroblight

omnilight

argumentlight

 

And we can setup up to five modes of lighting operations:

 

1. NO LIGHT at all. Shut off/Engage mode.

 

2. ANTICOLLISION lights ON - by setting to the light argument for taxing light [208] and put it in the WOLALIGHT_SPOTS Collection. Modes engaged by pressing [Alt+L] on the ground.

 

3. POSITION lights ON - by declaration WOLALIGHT_NAVLIGHTS collection with the different types of lighting sources. Modes engaged by pressing [Ctrl+L] on ground or in flight.

 

4. NAV/FORMATION lights ON - by declaration WOLALIGHT_FORMATION_LIGHTS collection with the different types of lighting sources. This mode engages automatically since you are take off and in the NAV avionics mode.

This mode disangaged then you pressed keys 2-6 - ie go into combat mode.

 

5. POSITION and NAV lights ON or CHRISTMASS TREE mode - engaged then you are in flight, in NAV mode by pressing [Ctrl+L]. It can be used at landing approach or at start sequence.

 

This is my Light_Data code with some comments. All declared light (strob/omni/spot/arg) works with no issues.

lights_prototypes[F_16A]              = 
{
   typename = "collection",
       lights = {
           --[[ Disabled / Does not work with SFM planes!
           [WOLALIGHT_STROBES] = { typename = "collection", 
               lights = {
                   -- Tail Anticollision Light
                   {typename = "natostrobelight",
                   connector = "Top_Tail_Strob_Light",
                   argument = 193,
                   period = 1.2,
                   phase_shift = 0},
               }
           },
           --]]
           [WOLALIGHT_SPOTS] = {typename = "collection", -- Position lights controllable by [Alt+L] 
               lights = {
                   -- Landing Lights
                   {typename = "spotlight",
                   connector = "Landing_Spot",
                   argument = 209,
                   dir_correction = {elevation = math.rad(-2)},
                   },
                   -- Taxi Lights
                   {typename = "spotlight",
                   connector = "Taxi_Spot",
                   argument = 208,
                   dir_correction = {elevation = math.rad(3)},
                   },
               }
           },
           [WOLALIGHT_NAVLIGHTS] = {typename = "collection", -- Lights controllable by [Ctrl+L] 
               lights = { 
                   {typename = "collection",
                       lights = {
                           {typename = "collection",
                               lights = {
                                   -- Left Position Strobe Light (red)
                                   {typename = "omnilight",
                                   connector = "Left_Position_Light",
                                   color = {0.99, 0.11, 0.3},
                                   argument = 190,
                                   },
                                   -- Right Position Strobe Light (green)
                                   {typename = "omnilight",
                                   connector = "Right_Position_Light",
                                   color = {0, 0.894, 0.6},
                                   argument = 191,
                                   },
                                   -- Tail Position Light
                                   {typename = "omnilight",
                                   connector = "Tail_Position_Light",
                                   color = {1, 1, 1},
                                   argument = 192},
                               },
                           },
                           {typename = "collection",
                               lights = {
                                   -- Tail Anticollision Light (white)
                                   {typename = "natostrobelight",
                                   connector = "Tail_Strob_Light",
                                   color = {1.0, 1.0, 1.0},
                                   argument_1 = 193,
                                   period = 1.2,
                                   phase_shift = 0,
                                   },
                                   -- Left Tail Light (white)
                                   {typename = "omnilight",
                                   connector = "Left_Ident_Light",
                                   color = {1.0, 1.0, 1.0},
                                   argument = 194},
                                   -- Right Tail Light (white)
                                   {typename = "omnilight",
                                   connector = "Right_Ident_Light",
                                   color = {1.0, 1.0, 1.0},
                                   argument = 195},
                               },
                           },
                           {typename = "collection",
                               lights = {
                                   -- Left Tail Logo Floodlight
                                   {typename = "spotlight",
                                   connector = "Left_Ident_Spot",
                                   color = {1.0, 1.0, 1.0},
                                   intensity_max = 3.0,
                                   angle_max = 0.8,
                                   argument = 194,
                                   },
                                   -- Right Tail Logo Floodlight
                                   {typename = "spotlight",
                                   connector = "Right_Ident_Spot",
                                   color = {1.0, 1.0, 1.0},
                                   intensity_max = 3.0,
                                   angle_max = 0.8,
                                   argument = 195,
                                   },
                               }
                           },
                           {typename = "collection",
                               lights = {
                                   -- Left Intake Position Light (red)
                                   {typename = "omnilight",
                                   connector = "Left_Intake_Position_Light",
                                   color = {0.99, 0.11, 0.3},
                                   argument = 205,
                                   },
                                   -- Right Intake Position Light (green)
                                   {typename = "omnilight",
                                   connector = "Right_Intake_Position_Light",
                                   color = {0, 0.894, 0.6},
                                   argument = 206,
                                   },
                               },
                           },
                       }
                   }, -- End of Position Lights Block
               },
           },
           [WOLALIGHT_FORMATION_LIGHTS] = {typename = "collection", -- Formation lights controllable by game engine [Nav Mode]
               lights = {
                   {typename = "collection",
                       lights = {
                           -- Left Formation Light (red)
                           {typename = "omnilight",
                           connector = "Left_Formation_Light",
                           color = {0.99, 0.11, 0.3},
                           argument = 200},
                           -- Right Formation Light (green)
                           {typename = "omnilight", 
                           connector = "Right_Formation_Light",
                           color = {0, 0.894, 0.6},
                           argument = 201},
                           {typename = "omnilight",
                           connector = "Tail_Formation_Light",
                           color = {1,1,1},
                           argument = 202},
                       },
                   },
                   {typename = "collection",
                       lights = {
                           -- Top Formation Light (white)
                           {typename = "omnilight",
                           connector = "Top_Formation_Light",
                           color = {1.0, 1.0, 1.0},
                           },
                           {typename  = "argumentlight",
                           argument = 203},
                           -- Bottom Formation Light (white)
                           {typename = "omnilight",
                           connector = "Belly_Formation_Light",
                           color = {1.0, 1.0, 1.0},
                           },
                           {typename  = "argumentlight",
                           argument = 204},
                       },
                   },
                   -- UARRSI light
                   {typename  = "argumentlight",
                   position  = {-0.753, 0.789, 0.0},
                   color = {1, 1, 1},
                   argument = 22},
               }
           },
           --[[ Disabled / Does not work with SFM planes!
           [WOLALIGHT_TIPS_LIGHTS ] = {typename = "collection",
               lights = {
                   -- Left Tail Floodlight
                   {typename = "spotlight",
                   connector = "Left_Ident_Spot",
                   color = {1.0, 1.0, 1.0},
                   angle_max = 0.75,
                   argument = 211,
                   },
                   -- Right Tail Floodlight
                   {typename = "spotlight",
                   connector = "Right_Ident_Spot",
                   color = {1.0, 1.0, 1.0},
                   angle_max = 0.75,
                   connector = "MAIN_SPOT_PTR_02",
                   argument = 210,
                   },                
               }
           },
           --]]
       },
}

a7e822df59e8.jpg

 

66390e3d5eb0.jpg

 

216d9cb02d0b.jpg

su-24.gif

Link to comment
Share on other sites

  • 2 years later...

Can you change the brightness?

 

VCAW-99_sig_ED_BD-3.png

 

Alienware New Aurora R15 | Windows® 11 Home Premium | 64bit, 13thGen Intel(R) Core(TM) i9 13900KF(24-Core, 68MB|  NVIDIA(R) GeForce RTX(TM) 4090, 24GB GDDR6X | 1 X 2TB SSD, 1X 1TB SSD | 64GB, 2x32GB, DDR5, 4800MHz | 1350W PSU, Alienware Cryo-tech (TM) Edition CPU Liquid Cooling  power supply | G2 Rverb VR

Link to comment
Share on other sites

Can you change the brightness?

 

The Data in this thread is OLD now,

 

You can control Lights directly in 3DS Max Now.

 

That being Said, for Old style lights you have:

color = {1.0, 1.0, 1.0},

 

color = { R, G, B }

 

1.0 is Max, 0.0 is Off.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

The Data in this thread is OLD now,

 

You can control Lights directly in 3DS Max Now.

 

That being Said, for Old style lights you have:

color = {1.0, 1.0, 1.0},

 

color = { R, G, B }

 

1.0 is Max, 0.0 is Off.

 

Dang it. I'm not familiar with 3DMax; more expertise in Photoshop and some scripting.

 

Thanks for your reply :)

 

VCAW-99_sig_ED_BD-3.png

 

Alienware New Aurora R15 | Windows® 11 Home Premium | 64bit, 13thGen Intel(R) Core(TM) i9 13900KF(24-Core, 68MB|  NVIDIA(R) GeForce RTX(TM) 4090, 24GB GDDR6X | 1 X 2TB SSD, 1X 1TB SSD | 64GB, 2x32GB, DDR5, 4800MHz | 1350W PSU, Alienware Cryo-tech (TM) Edition CPU Liquid Cooling  power supply | G2 Rverb VR

Link to comment
Share on other sites

  • 10 months later...
The Data in this thread is OLD now,

 

You can control Lights directly in 3DS Max Now.

 

That being Said, for Old style lights you have:

color = {1.0, 1.0, 1.0},

 

color = { R, G, B }

 

1.0 is Max, 0.0 is Off.

 

Hey Skate

 

can you provided a description of how to properly control lights within 3ds Max or a link to something that is up to date? Do you still use dummies/connectors?

 

Cheers


Edited by tacca
Link to comment
Share on other sites

  • 3 weeks later...

 

 

Thanks Skate, I had seen your first video but not the second one. Is it best practice now to just use 3ds max lights and not place any point helpers at all? Looking at the Christian eagle edm file and also the aircraft lua they call arguments for the lights and type name but no at all connectors (in lights section of lua or on model).

 

Cheers

Tacca

Link to comment
Share on other sites

use 3DS Lights. Old Lights are likely only on old models still.,

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

use 3DS Lights. Old Lights are likely only on old models still.,

 

Thanks Skate, pretty much as I thought. Your help has been much appreciated :) Now just down to playing with numbers to get realistic looking nav and anti-coll lights (intensity of lights and how much they light up surrounds)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...