PlayfieldReflectionsStrength

aquinaton

Pinball Wizard
Joined
Oct 5, 2019
Messages
76
Reaction score
79
Points
26
Favorite Pinball Machine
Taito Cosmic
Does anyone know how to use PlayfieldReflectionsStrength(int) in VP9 like VpX. I want to put reflection on some objects on the playfield. Please, help me. Thanks.
In Vp9 the ball reflects on the playfields. I want to do this with Bumpers, DropTargets, Posts, Flippers and Spinners
 
I don't know of a way to adjust shininess of specific areas on the playfield but you can change shininess of the entire playfield. See below. Replace textureName with the name of the texture of the playfield and value is a number. Specular level is the amount of light reflected off an object but the light has to come from a light source on the table so it can be reflected.

'[BAM] !texture = textureName
'[BAM] !shininess = value
'[BAM] !specularLevel = 10.0

There is another way to code the same thing with many textures along with adjusting specular level:

Sub SetTexParams(texNames, specLevel, shineLevel)
Dim texArray, oneTexName, tex
texArray = Split(texNames,",")
For each oneTexName in texArray
Set tex = xBAM.GetTexture(oneTexName)
If tex.isValid Then
tex.SpecularLevel = specLevel
tex.Shininess = shineLevel
End If
Next
End Sub

SetTexParams "BackWall,SideWall1B,SideWall2B,afm plastic hd 2 B,afm hd lt100 gold,card", 0.001, 0.001

Red is SpecularLevel and green is Shininess. Yellow are the names of textures separated by commas.

The FP editor also has a slider where you can adjust glossiness of the playfield.
 
Last edited:
I don't know of a way to adjust shininess of specific areas on the playfield but you can change shininess of the entire playfield. See below. Replace textureName with the name of the texture of the playfield and value is a number. Specular level is the amount of light reflected off an object but the light has to come from a light source on the table so it can be reflected.

'[BAM] !texture = textureName
'[BAM] !shininess = value
'[BAM] !specularLevel = 10.0

There is another way to code the same thing with many textures along with adjusting specular level:

Sub SetTexParams(texNames, specLevel, shineLevel)
Dim texArray, oneTexName, tex
texArray = Split(texNames,",")
For each oneTexName in texArray
Set tex = xBAM.GetTexture(oneTexName)
If tex.isValid Then
tex.SpecularLevel = specLevel
tex.Shininess = shineLevel
End If
Next
End Sub

SetTexParams "BackWall,SideWall1B,SideWall2B,afm plastic hd 2 B,afm hd lt100 gold,card", 0.001, 0.001

Red is SpecularLevel and green is Shininess. Yellow are the names of textures separated by commas.

The FP editor also has a slider where you can adjust glossiness of the playfield.
Thanks for responding, but I need it for Visual Pinball 9.
 
Sorry. I didn't notice this is a VP topic. It is FP code. I don't know anything about VP.
 
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.
      Chat Bot Mibs Chat Bot Mibs: qinnuendo has left the room.
      Back
      Top