Lighting

Slippery Jim

Pinball Wizard
Joined
Dec 13, 2018
Messages
71
Reaction score
25
Points
15
Favorite Pinball Machine
Stern Dracula
I noticed in one of Slam's tables the room is dark and the machine has low intensity flood lighting. Has he done this with BAM?
Here is the code he has used, can someone explain what XBAM.Lights do? Do I need to add anything to the table for this to work?

Code:
Sub SetLightsParamsInBAM()
xBAM.Lights.EnableNewRenderer = TRUE
xBAM.Lights.MainLightLock = TRUE
xBAM.Lights.SetMainLightProperties 1,    0.6,   0.75,  0.075
xBAM.Lights.SetMainLightAttenuation 1,      0,      0
xBAM.Lights.SetOtherLightsAttenuation 0.2,      0,      1
xBAM.Lights.EnablePostprocessing = FALSE
xBAM.Lights.SetPostprocessing 1,      0,      1,      1
xBAM.Lights.SetPostprocessingForNewRenderer 1,      0,      1,      1,    2.2,      1,      1,      1,    0.2
End Sub

    SetLightsParamsInBAM()
    
xBAM.Lights.BallReflection = 1.6
xBAM.Lights.BallShininess = 300
xBAM.Lights.BallSpecular = 1.6
xBAM.Lights.BallBrightness = 1.2

xBAM.Lights.Brightness = 1.2
 
Everything you pasted from the script also appears in the BAM menu. You can hold down the ctrl key and type c on the lighting menu to copy the script to the clipboard and paste it into the script. The ball settings are the same ones on the addons menu under ball parameters.
 
Last edited:
xBAM.Lights.Brightness is used for changing the brightness of "all" lights, bulbs, shaped lights in one command. You don't always want to do that, depending on the rest of your table and the main BAM lighting / post processing settings. It's just a quick way to brighten all lights.

If you look at my PinEvent releases, you'll see that I change the brightness of each light separately and also change it for when the GI is on and for when the GI is off.
 
therefore, we can directly modify the dynamic light with bam and then copy everything into the script. I never managed to use bam's light well and I didn't know the copy-paste trick.
 
The downside of it is that once you add the lighting to the script, the options on the menu don't work anymore. Well, you can temporarily change the lighting after the game starts but when the game is closed and restarted, the values in the script will be loaded.
 
so is there a command in BAM to dim the playroom lights?
 
These are the BAM Global Lighting (playroom lighting) and Post Processing settings I typically start with (first set in BAM menu, then CTRL_C then paste into script):

Code:
Sub SetLightsParamsInBAM()
   xBAM.Lights.EnableNewRenderer             = TRUE
   xBAM.Lights.MainLightLock                 = FALSE
   xBAM.Lights.SetMainLightPosition               400,    650,    500
   xBAM.Lights.SetMainLightProperties               1,   0.35,      1,  0.075
   xBAM.Lights.SetMainLightAttenuation              1,      0,      0
   xBAM.Lights.SetOtherLightsAttenuation        0.066,      0,  0.333
   xBAM.Lights.EnablePostprocessing          = FALSE
   xBAM.Lights.SetPostprocessing                    1,      0,      1,      1
   xBAM.Lights.SetPostprocessingForNewRenderer      1,      0,      1,      1,      1,      1,      1,      1,      1
   xBAM.Lights.BallReflection =      2
   xBAM.Lights.BallShininess =    400
   xBAM.Lights.BallSpecular =    0.4
End Sub

Any of the above commands can be adjusted on their own at anytime during gameplay. This command is what you would typically change.

xBAM.Lights.SetMainLightProperties 1, 0.35, 1, 0.075

0.35 = Diffusion, and 0.075 = Ambient

I would typically change the Ambient lighting.

Keep in mind the above settings are already pretty dim... and you would need to brighten the playfield lights / bulbs as needed to match whatever you set... as they will all be very dim with the above settings.
 
Last edited:
I could post the values I use but I always add flashers for general illumination. The settings for BAM Global Lighting would be too dark without the flashers.
 
I am of the opinion that FP/BAM/TerryRed should set up standards for lighting like they did with physics & such for PinEvent V2... by lighting I mean "bulb means this" and stuff like that. Believe me that it's the ONLY way forward and the only way to preserve the unimaginable world of pinball we were are gifted with by both the original producers+artists+programmers the community that took more than a liking in this form of art.

Considering the number of fine VP(X) tables existing, there must be a way for people to convert tables from VP to FP and from FP to whatever... and the establishment of coherent standards would be a huge step in this direction.
 
Converting any table from FP to VP or VP to FP is "a lot" of work. It's why it doesn't happen often... and those who would know how to do it are very few.

"Standards" are only as good as those who will want to use them. I've learned that all I can do is put my own examples out there. Some may learn from them (just as I have learned from other examples). Some may not want to do things the same way.
 
I understand. I have seen your Sonic Pinball review on youtube which included details on how to add FizX to a table and the table settings in script... and wish that if you had the time, opportunity, and motivation, make a short video on converting an EM table (one of the legendary Loserman76 tables, for example Blue Chip https://vpuniverse.com/files/file/8856-blue-chip-williams-1976/ ) from VPX to FP.
 

there you have it. The hard work is already done by @angmarg52
You just need to update it.

/edit
just to be clear, if you wish to share after the update make sure you have author permission to do so.
 
Thank you very much, I really appreciate it. I will probably attempt to convert it (edit: convert it to FizX that is, as it's already FP) and if I'm satisfied with the results seek the author's permission to publish it.
But just to make it clear, my point was that there are no tutorials concerning the conversion from VPX to FP. If I was greedy I would have mentioned Centaur (which was also converted for FP as I see now :D), but as it's a game that makes use of a rom, it would have meant extra attention given to BAM...
 
You can't really "convert" tables between both programs.

You can use the same images and sounds and even those depend on the format used. Maybe some code can be used but in the end, you'll simply build the table all over again. And this is for tables that don't use roms, otherwise, you'll have to code the "rom" into FP because FP can't use those.
 
Oh so you can't export the playfield (3D model, placement of objects) from VP(X) and import into FP? Alright. Quite a bummer.
 
Oh so you can't export the playfield (3D model, placement of objects) from VP(X) and import into FP? Alright. Quite a bummer.

Correct. you can't do that from VP to FP... or FP to VP.... not without basically rebuilding the table in the long run. You also have to reprogram the entire table, all the lighting.... most everything. Model assets can be converted and reused, textures, etc.... but no matter what way you do it.... it's A LOT of work. Way beyond a simple video / text tutorial.
 
I see no reason to convert anything. To my thinking, both FP and VP groups should concentrate on building tables that have not been built.
 
These are the BAM Global Lighting (playroom lighting) and Post Processing settings I typically start with (first set in BAM mane, then CTRL_C then paste into script):

Code:
Sub SetLightsParamsInBAM()
   xBAM.Lights.EnableNewRenderer             = TRUE
   xBAM.Lights.MainLightLock                 = FALSE
   xBAM.Lights.SetMainLightPosition               400,    650,    500
   xBAM.Lights.SetMainLightProperties               1,   0.35,      1,  0.075
   xBAM.Lights.SetMainLightAttenuation              1,      0,      0
   xBAM.Lights.SetOtherLightsAttenuation        0.066,      0,  0.333
   xBAM.Lights.EnablePostprocessing          = FALSE
   xBAM.Lights.SetPostprocessing                    1,      0,      1,      1
   xBAM.Lights.SetPostprocessingForNewRenderer      1,      0,      1,      1,      1,      1,      1,      1,      1
   xBAM.Lights.BallReflection =      2
   xBAM.Lights.BallShininess =    400
   xBAM.Lights.BallSpecular =    0.4
End Sub

Any of the above commands can be adjusted on their own at anytime during gameplay. This command is what you would typically change.

xBAM.Lights.SetMainLightProperties 1, 0.35, 1, 0.075

0.35 = Diffusion, and 0.075 = Ambient

I would typically change the Ambient lighting.

Keep in mind the above settings are already pretty dim... and you would need to brighten the playfield lights / bulbs as needed to match whatever you set... as they will all be very dim with the above settings.

That's very useful information. I did not know you could set the specularity of the ball.

Is there a way to load that as a default for every game? (maybe put it in a default.zip?).

I have been doing my own research on building a "better" pinball, one that would work with the game engine rather than simply using a distorted picture of somebody's living room, and I think specularity is one of those things that I'd want to tweak, especially what makes a metal surface look metallic. The default ball might not have enough specularity.
 
Is there a way to load that as a default for every game? (maybe put it in a default.zip?).

No

I have been doing my own research on building a "better" pinball, one that would work with the game engine rather than simply using a distorted picture of somebody's living room, and I think specularity is one of those things that I'd want to tweak, especially what makes a metal surface look metallic. The default ball might not have enough specularity.

Some of the custom balls posted on the forum are silver.
 
No



Some of the custom balls posted on the forum are silver.

I use a neutral gray ball, but I use random RGB color noise run through a gaussian blur (instead of the scratch texture), to try to simulate the iridescent light scatter of metal and give it some texture (I don't think FP or BAM can do metal maps proper). I think the ball set at reflection 1-2, specularity of 0.9 and shininess of 10 looks the best, then it resembles the appearance of Pinball Arcade.
 

Attachments

  • MyBall.zip
    541.4 KB · Views: 4
I noticed in one of Slam's tables the room is dark and the machine has low intensity flood lighting. Has he done this with BAM?
Here is the code he has used, can someone explain what XBAM.Lights do? Do I need to add anything to the table for this to work?

Code:
Sub SetLightsParamsInBAM()
xBAM.Lights.EnableNewRenderer = TRUE
xBAM.Lights.MainLightLock = TRUE
xBAM.Lights.SetMainLightProperties 1,    0.6,   0.75,  0.075
xBAM.Lights.SetMainLightAttenuation 1,      0,      0
xBAM.Lights.SetOtherLightsAttenuation 0.2,      0,      1
xBAM.Lights.EnablePostprocessing = FALSE
xBAM.Lights.SetPostprocessing 1,      0,      1,      1
xBAM.Lights.SetPostprocessingForNewRenderer 1,      0,      1,      1,    2.2,      1,      1,      1,    0.2
End Sub

    SetLightsParamsInBAM()
   
xBAM.Lights.BallReflection = 1.6
xBAM.Lights.BallShininess = 300
xBAM.Lights.BallSpecular = 1.6
xBAM.Lights.BallBrightness = 1.2

xBAM.Lights.Brightness = 1.2


Which table?
 
I noticed in one of Slam's tables the room is dark and the machine has low intensity flood lighting. Has he done this with BAM?
Here is the code he has used, can someone explain what XBAM.Lights do? Do I need to add anything to the table for this to work?

Code:
Sub SetLightsParamsInBAM()
xBAM.Lights.EnableNewRenderer = TRUE
xBAM.Lights.MainLightLock = TRUE
xBAM.Lights.SetMainLightProperties 1,    0.6,   0.75,  0.075
xBAM.Lights.SetMainLightAttenuation 1,      0,      0
xBAM.Lights.SetOtherLightsAttenuation 0.2,      0,      1
xBAM.Lights.EnablePostprocessing = FALSE
xBAM.Lights.SetPostprocessing 1,      0,      1,      1
xBAM.Lights.SetPostprocessingForNewRenderer 1,      0,      1,      1,    2.2,      1,      1,      1,    0.2
End Sub

    SetLightsParamsInBAM()
   
xBAM.Lights.BallReflection = 1.6
xBAM.Lights.BallShininess = 300
xBAM.Lights.BallSpecular = 1.6
xBAM.Lights.BallBrightness = 1.2

xBAM.Lights.Brightness = 1.2

If it has flood lighting, it probably uses a spotlight. Search the script for spotlight.
 
General chit-chat
Help Users
You can interact with the ChatGPT Bot in any Chat Room and there is a dedicated room. The command is /ai followed by a space and then your ? or inquiry.
ie: /ai What is a EM Pinball Machine?
  • No one is chatting at the moment.
      xenonph @ xenonph: @oilpainter27 find here...
      Back
      Top