Help BAM BAM -- any way to create a mirror which reflects the playfield and ball?

madmrmax

Weeeeeee
Site Supporters
Joined
Sep 21, 2017
Messages
519
Solutions
2
Reaction score
250
Points
75
Favorite Pinball Machine
Indiana Jones (Williams)
I've always loved the ToM (Theatre of Magic) pinball and I'm investigating what it might take to bring that to FP. As I've been reading on some VPX forums, the mirror seems to be an interesting challenging part of this table.

I've thought about doing the "secondary playfield approach" but if that is the case then I'll probably punt on the mirror for a while.

Does BAM have anything that help me create true mirror surface?
 
I have always loved Theatre of Magic and it would be great to have it on FP. I am not aware of any BAM options for a mirror but you can apply the right texture to most table objects and make it look like a mirror by placing a check in the option that says "Sphere Map".

I have never tried to create a mirror but the following BAM coding might help. The code in red is specular level which increases the reflective light level when you enter a higher value. The code in blue is the shininess where a higher value will increase shininess.

SetTexParams "[Name of Texture]", 0.7, 0.1

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
 
Last edited:
Does BAM have anything that help me create true mirror surface?
Hi Mark....
How you describe this mirror, it seems to do something particular, and if you associate it with Bam, then I think that in FP it could not be done, consequently we are not talking about a common "surface" that is placed along the entire table that simulates the glass and that serves as a barrier for the ball, right?

If you could, insert some photos or videos to better understand what this mirror is, and what it does or is used for.....

George I didn't know about this code, it's a surprise.....so you too have the talent of a "code man" inside you..... :clap::lol:oO
 
If you could, insert some photos or videos to better understand what this mirror is, and what it does or is used for.....
Sure! In the upper back right, above the playfield there is a mirror (red box) which reflects the playfield and lights and rollover lanes to advance bonus multiplier.
1702323162186.png

The actual playfield is printed incorrect with the knowledge that it will be mirrored:
1702323494577.png
 
I have always loved Theatre of Magic and it would be great to have it on FP. I am not aware of any BAM options for a mirror but you can apply the right texture to most table objects and make it look like a mirror by placing a check in the option that says "Sphere Map".

I have never tried to create a mirror but the following BAM coding might help. The code in red is specular level which increases the reflective light level when you enter a higher value. The code in blue is the shininess where a higher value will increase shininess.

SetTexParams "[Name of Texture]", 0.7, 0.1

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
I'll have to make a few tries with this to see if it will accomplish my needs! Thanks!
 
Sure! In the upper back right, above the playfield there is a mirror (red box) which reflects the playfield and lights and rollover lanes to advance bonus multiplier.
I understand!! it's really a real mirror....
Therefore a "surface" could not work because it has the property of reflecting on the playfield, in practice we would need a playfield that reflects on the "surface" something inverse.

It occurs to me that using the mini-playfield function could perhaps work, you could capture that portion of the playfield and set it to the height of the mirror, the problem is that what you capture you see, there would be the problem of reflection, that is, on the playfield there are drawn backwards, and the reflection of the mirror makes you see the drawings frontallyperhaps rotating it (the mini-play) on its axis could work, you have to try, perhaps you could ask Rav, if in some way he could make the MP reflect on himself(, it wouldn't be impossible, given that for me it he reversed the gravity for my vertical mp.
 
Someone might prove me wrong, but even with all the tools we have in our disposal today, I don't think a mirror object that reflects the playfield is possible in FP.

As you know, pinball objects have materials assigned, and how those materials are displayed is described in FP's executable, and were further extended with BAM. Even though metal might seem reflective at first (for example, you can see a reflection of the flashers on the ball, and there's also some sort of reflection of the playfield under it), that's not actually the full table being reflected on the object, just a workaround using enamel texture mapping. In other words, objects aren't reflected, only light "halos" and the playfield image. Similarly, changing the shininess and specular level of a metal texture doesn't make it actually reflect the playfield over it. The sphere mapping only looks reflective because of how the texture (which in the case of chrome-silver simulates a reflected room) is applied.

The only material that reflects table objects is the playfield (including surfaces with the Playfield property) and it ONLY reflects those objects that are defined strictly upon it (using the "Playfield" option in the editor). That uses a trick I will expand on later. Even if you could define a playfield surface and rotate it to make a mirror wall (or maybe create an object and assign the playfield material to it), it would only reflect the objects defined "over" it, and that would mean no reflections on the actual playfield, apart from other bigger issues due to how that trick works. The mirror would still not work.

Now, making mirrors may be impossible, but "faking" them is another thing. Old engines use a trick to make something look reflective when it isn't: just make the object translucent and copy everything else in the other side. For example, this is how the reflective floor in the Airport from Tony Hawk Pro Skater 3 was made: See image here.
This is, in fact, the same trick FP uses to reflect objects over the table. You can see that by pressing the asterisk button while playing.

You could theoretically recreate this trick on a wall with some clever usage of a Mini-playfield. If you make the mirror wall transparent (like a hole) and place the Mini-playfield on the other side with a copy of what should be reflected, it will kind of look like a mirror, at least until you drastically change the camera, which may reveal the trick. You would also need a Toy ball that tracks the real ball's movement but on the Mini-Playfield for when the ball is in view. All this is easier said than done and very context-specific based, and in fact may still be one of the hardest things to do in FP, but at least should theoretically be possible, and that in my book means it's worth a try.

There's even another option in the table as well, which involves dynamically changing the texture of the wall to update what should be reflected on it. You may need a lot of versions based on the current ball placement, but maybe there's some magic there that I simply haven't thought of.
 
You could theoretically recreate this trick on a wall with some clever usage of a Mini-playfield. If you make the mirror wall transparent (like a hole) and place the Mini-playfield on the other side with a copy of what should be reflected, it will kind of look like a mirror, at least until you drastically change the camera, which may reveal the trick.

I think the issue I have is the "drastically change the camera angle" thing. I'm less concerned on drastic changes, but I would want it to support all camera angles, pin cabinets, and a lot of manual camera angles used when playing.

You would also need a Toy ball that tracks the real ball's movement but on the Mini-Playfield for when the ball is in view.
I think having the toy tracked (but mirrored) the real balls movement is easy, it is more challenging during multi-ball. I also don't think I want to deal with the toy ball interacting with thumper bumpers in the mirrored playfield.
 
It occurs to me that using the mini-playfield function could perhaps work, you could capture that portion of the playfield and set it to the height of the mirror, the problem is that what you capture you see, there would be the problem of reflection, that is, on the playfield there are drawn backwards, and the reflection of the mirror makes you see the drawings frontallyperhaps rotating it (the mini-play) on its axis could work, you have to try, perhaps you could ask Rav, if in some way he could make the MP reflect on himself(, it wouldn't be impossible, given that for me it he reversed the gravity for my vertical mp
Thanks Paolo. Yes I think asking Ravi for some help on this. Totally good point about the order that items are drawn. Objects in the mirrored playfield would reflect objects on the real playfield and visa-versa.

How does one go about asking Ravi for requests like this? Or at least starting the discussion?

Note that I will continue to develop the Theatre of Magic table even without the mirror playfield, just that I wanted to understand what sort of challenges there will be to "complete" it.
 
George I didn't know about this code, it's a surprise.....so you too have the talent of a "code man" inside you..... :clap::lol:oO
Well... Rav actually wrote the code. I use it a lot. I also use this code that increases the brightness of textures which I just about always use to brighten targets, spinners and other things:

xBAM.GetTexture("[Name of Texture]").brightness = 2.0

Sure! In the upper back right, above the playfield there is a mirror (red box) which reflects the playfield and lights and rollover lanes to advance bonus multiplier.

I did some experimenting and I could easily make shiny metal but not a mirror. I think Wecoc is right. You will have to make a fake mirror somehow with a reverse image of the playfield.
 
xBAM.GetTexture("[Name of Texture]").brightness = 2.0
Ahhh....yes,I also use this to create the on/off effect, it's also there in sturdast!
 
Ahhh....yes,I also use this to create the on/off effect, it's also there in sturdast!

It is a nice way to brighten objects without having to resort to a flasher which increases the number of hardware lights. I tend to use it more on smaller objects that wouldn't have and shadows. It really helps to be able to see targets and spinners better.
 
Here is an example of how I captured the surface with the traditional method and not with "calculate center" because the surface does not have X.Y coordinates in the editor.
I turned the green box by 180° and in this case it is the reflection of the surface on the playfield that we see, it is not a mirror, this is just an example that perhaps could work if Rav could add something to the green box (therefore to the surface) which gives us the mirror reflection option.....who knows????, after all this function was also born in this way from an idea of mine talking to @Gimli maybe you could say something about this mirror.


.
 
Here is an example of how I captured the surface with the traditional method and not with "calculate center" because the surface does not have X.Y coordinates in the editor.
I turned the green box by 180° and in this case it is the reflection of the surface on the playfield that we see, it is not a mirror, this is just an example that perhaps could work if Rav could add something to the green box (therefore to the surface) which gives us the mirror reflection option.....who knows????, after all this function was also born in this way from an idea of mine talking to @Gimli maybe you could say something about this mirror.


.
Interesting. I am not aware of a true way to mirrow the playfield onto the ball , but there may be a way to "swap the ball texture" based on playfield location so it creates the illusion.
 
Interesting. I am not aware of a true way to mirrow the playfield onto the ball , but there may be a way to "swap the ball texture" based on playfield location so it creates the illusion.
Yes, of course this is another thing that the mirror should do, not only the playfield, but also the ball when it passes over it.
do you think Rav could implement this option in the MP.
 
Yes, of course this is another thing that the mirror should do, not only the playfield, but also the ball when it passes over it.
do you think Rav could implement this option in the MP.
I don't know . I don't think it would be worth the work on his part, but who knows.
 
Simply put... no you can't have FP or BAM create a reflective mirror surface wall. Even VP 10.8 struggles to do this correctly, even though it has added reflection probes capability to do this.

Your only option, would be to have a duplicate of the entire table that is mirrored and placed behind the backwall, and then have an opening in the backwall (like I did with Star Wars DSA GE) in place of the mirror. This is similar to how some VP tables created fake reflections.
 
Your only option, would be to have a duplicate of the entire table that is mirrored and placed behind the backwall, and then have an opening in the backwall (like I did with Star Wars DSA GE) in place of the mirror. This is similar to how some VP tables created fake reflections.
I'm going to take a look at your Star Wars DSA GE cause I'm not sure exactly how to tell FP to not render a part of the back part of the inner cabinet. (of course there is the obvious "how to make an image transparent" in FP -- use a tga image, or purple fill transparent color, etc)
 
Ok. for testing purposes, I have created a surface which is the mirrored playfield and I've used BAM to create and move a miniplayfield version to be in the "reflecting" position.

I am puzzled though on how to make the back wall of the pinball cabinet to have any "hole" to make it so I can see the reflecting playfield. Trying to use a surface that "punches" through it doesn't work. Anyone have thoughts on how to actually "punch through" the back wall?

1702605197994.png

1702605073162.png
 
For Star Wars DSA GE, I made a new Ornament model that had its mask in the size and shape of the opening I wanted for the back wall. This required making a milkshape model, then importing that model into the Future Pinball Model Editor as an ornament model. Then I made another flat milkshape model in the size of the opening and import that into Future Pinball Model Editor as the mask of the ornament model. Then I save the ornament model, and import it into FP. Then I add an ornament using that model to the table. Then I use a BAM miniplayfield to rotate and position that model on the back wall.

Or otherwords,... not a simple process :)
 
It's not too bad of a process though, but yeah not straight forward.

I'm trying to get an idea if I need to either:

1) enclose the mini mirrored playfield in an ornament with a part that bulges out that becomes the mirror, and then all of that (MP + ornament case) angled using BAM miniplayfield rotate
or
2) if I can just have the mirrored playfield angled using BAM and have a separate ornament that is just a rectangle which creates a window through the back of the playfield, making the angled MP visible through this window.

#1 above is exactly like the Star Wars DSA GE design you have Terry, just scaled up. I can't figure out yet if there is a way to punch out a window which could cause the graphics rendering to show what's behind it (#2 above).
 
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:
    DrazeScythe has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Torntabittz has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    brotherboard has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    GARRY040 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    BL2K has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Chilldog has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    rodneyfitz has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    ace19120 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Tomasaco has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Greek_Jedi has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Beermano has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    02browns has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    nitram1864 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    aeponce has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    JEAN LUC has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    lorenzom has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    maxangelo19 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Dragonslapper has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    royaljet has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Tyfox has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Goldtopboy has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    slick267 has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    dabreeze has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Spike has left the room.
  • Chat Bot Mibs Chat Bot Mibs:
    Tofa has left the room.
      Chat Bot Mibs Chat Bot Mibs: Tofa has left the room.
      Back
      Top