BAM BAM Update v295

ravarcade

Pinball Wizard
Joined
Feb 8, 2020
Messages
101
Reaction score
232
Points
49
Favorite Pinball Machine
AFM
https://www.ravarcade.pl/files/BAM-OpenVR.zip

Updated or new files: BAM.dll, renderingengine.dll, libpng16.dll, zlib.dll, ModelImporter.exe
(Update: i just uploaded version with new renderingengine.dll and without libpng16.dll and zlib.dll)
  • Added Gif support
  • Updated custom models support
  • Part of default FP cabinet can be hidden (legs, buttons, ...)


GIFs in FP

  1. Add gif as texture in fp texture manager.
    Note 1: with this version of BAM you can do it. FP will accept GIF.
    Note 2: don't try to use that GIF as texture in FP, it will not work.
  2. Creation of GIF object in script:
    Code:
    Dim g
    Set g = xBAM.LoadGIF("GifName")
  3. Replace exiting texture with gif:
    Code:
    g.ReplaceTexture "einstein poster"
  4. Replace texture on custom model:
    Code:
    g.ReplaceModelTexture(slug)
    g.ReplaceModelTexture(freddy.part(15)) ' part 15 is freddys head
    g.ReplaceModelTexture(slug, 1) ' replece normal map texture (diffuse texture unchanged)
  5. Change speed of animation:
    Code:
    g.UpdateInterval = 40 ' 40ms -> 1000/40 = 25 FPS
  6. Play whole animation once:
    Code:
    g.Frame 0, g.NumFrames-1, g.NumFrames-1
  7. Play in infinte loop animation:
    Code:
    g.Frame 0, g.NumFrames-1, 0
  8. Set transparent color in GIF:
    Code:
    g.SetTransparentColor 0, 254, 0  ' default transparent green color

Custom models
See video:


Hide parts of FP cab
xBAM.VisibleCabParts = 0
cm-test.jpg

xBAM.VisibleCabParts = 7
cm-test2.jpg
 
Last edited:
that's brilliant! I love it so much! thx for all your hard work Rafal.
 
Amazing Rav !
 
Strange, I've got this error message:
Anmerkung 2020-07-14 153314.png

Tested with my default FP-Setup and a clean FP/BAM installation, still the same.

Installed MSVCR120.dll in system:
Anmerkung 2020-07-14 170710.png
 
Last edited:
Ok. So, we will debug this problem here.
I just installed 2-in-1, FP+BAM in different location on disk. Lets say: c:\Games\FP-Test.
All works: BAM, FP, Model importer.

Here is part of BAM_Crash.log with libs version:
Code:
libpng16.dll, 1.6.28.0 : 7BDF0000 - 7BE1C000
MSVCR120.dll, 12.0.40664.0 : 7C360000 - 7C44E000
zlib.dll, 1.2.8.0 : 7BE20000 - 7BE34000
msvcr120.dll version is same as yours. Still no problems.

You may use Model Importer to test if changed libs works.
 
Ok. So, we will debug this problem here.
I just installed 2-in-1, FP+BAM in different location on disk. Lets say: c:\Games\FP-Test.
All works: BAM, FP, Model importer.

Here is part of BAM_Crash.log with libs version:
Code:
libpng16.dll, 1.6.28.0 : 7BDF0000 - 7BE1C000
MSVCR120.dll, 12.0.40664.0 : 7C360000 - 7C44E000
zlib.dll, 1.2.8.0 : 7BE20000 - 7BE34000
msvcr120.dll version is same as yours. Still no problems.

You may use Model Importer to test if changed libs works.

Thank you, Rav, for the fast response.
My Test-Setting: newest 2-in-1-installer, Path D:\Game\FP-Test\
No luck, no BAM_Crash.log was created after the error message for libpng16.dll

With the beta renderingengine.dll FP starts. Now I can play some tables for testing.
 
Last edited:
@ravarcade
On my windows 7 laptop.
I can no longer import more animations than 1 for some reason.
Regardless of which version of model importer I am using ?
 
@Gimli Try to restart Model Importer. It look like if you load one model, do some work on it, load another model, You can't add more animations to that second model.
 
@Gimli Try to restart Model Importer. It look like if you load one model, do some work on it, load another model, You can't add more animations to that second model.
I have tried reloading and not working on models and adding animations still no luck.
Is there a way to open the TGA file and add Animations to the list ?

Addendum....just tried again it worked.....seems intermittent
 
I cannot say if there are any bugs as I keep using the standalone version of model importer.

Rav, I would keep the ModelImporter as a separate application in its own directory.
I have grown accustomed to put all my 3d models in folders in ModelImporter directory.

is it possible?
 
@ravarcade
@polygame
@Gimli
@GeorgeH

Question with new Custom Models...as I'm seeing a possible bug / problem.

I have no problem importing an fbx model with the texture and getting it to work with FP, as you can see in the picture.

What I am seeing however is that when the table is done loading.... BAM now displays the message

FOUND: xxxxx

....and it cycles through FOUND xxxxx on EVERY texture on the table. So it's almost like it's loading all the textures again, or doing a check on all of them. The problem here, is that in the case of Star Wars DSA Ultimate Pro as an example.... it cause the table to take 30secs to do a FOUND xxxx of all the tables textures. this is after the textures were loaded by the table already, so I'm assuming it's a custom model check.

While this is "functioning", it makes the table take more than twice as along to load, and not because it's taking time to load th model. Is there a way for BAM to only need to do check on textures it sees as TGA instead of all the textures?


If anyone is wondering, yes I'm starting my PinEvent mod for Star Wars DSA. I already have the table nicely updated for multiple colours of lightsabers (with a correct purple instead of pink)...and I modded the playfield texture to have multiple images with different colours for the Defence Bonus lightsaber images, so it looks correct with the colour now. So now you get Blue, Green, Purple, Yellow, and Orange...and the playfield looks correct for each one.

I also found that if I disable to custom model code in the table script, and remove the model TGA, it still tries to do the FOUND check as long as the code is in the table (still disabled)

I wanted to try adding a Tie fighter (shown in the pic) and maybe other things before diving deep into the PinEvent specific stuff. I just hope a workaround can be found to stop the table taking a long time to sort the textures.


1595514555830.png
 
Last edited:
@ravarcade
@polygame
@Gimli
@GeorgeH

Question with new Custom Models...as I'm seeing a possible bug / problem.

I have no problem importing an fbx model with the texture and getting it to work with FP, as you can see in the picture.

What I am seeing however is that when the table is done loading.... BAM now displays the message

FOUND: xxxxx

....and it cycles through FOUND xxxxx on EVERY texture on the table. So it's almost like it's loading all the textures again, or doing a check on all of them. The problem here, is that in the case of Star Wars DSA Ultimate Pro as an example.... it cause the table to take 30secs to do a FOUND xxxx of all the tables textures. this is after the textures were loaded by the table already, so I'm assuming it's a custom model check.

While this is "functioning", it makes the table take more than twice as along to load, and not because it's taking time to load th model. Is there a way for BAM to only need to do check on textures it sees as TGA instead of all the textures?


If anyone is wondering, yes I'm starting my PinEvent mod for Star Wars DSA. I already have the table nicely updated for multiple colours of lightsabers (with a correct purple instead of pink)...and I modded the playfield texture to have multiple images with different colours for the Defence Bonus lightsaber images, so it looks correct with the colour now. So now you get Blue, Green, Purple, Yellow, and Orange...and the playfield looks correct for each one.

I also found that if I disable to custom model code in the table script, and remove the model TGA, it still tries to do the FOUND check as long as the code is in the table (still disabled)

I wanted to try adding a Tie fighter (shown in the pic) and maybe other things before diving deep into the PinEvent specific stuff. I just hope a workaround can be found to stop the table taking a long time to sort the textures.


View attachment 14889
I noticed that on the Indinana jones Stern table as well .
 
What I am seeing however is that when the table is done loading.... BAM now displays the message

FOUND: xxxxx

....and it cycles through FOUND xxxxx on EVERY texture on the table. So it's almost like it's loading all the textures again..
To make things clear. BAM will read whole table from disk many times.
- once for shadow maps (when shadowmaps command is executed)
- once for all custom models in fpt file (if there is "xBAM.CreateModel" string in script, even if no models are used and line is in comment).
- once for every load gif command in script (when it is executed)
If you see slowdown when custom models are loade it is not because reading from disk is slow but because it takes time to process models.

If i restrict loading textures to "TGA" or "GIF", whole fpt file will be load. It will only save time used to decompres texture (if it is compressed with LZA) and single frame with message "Found".

@Gimli: You have ~15 custum models on table. Even if you use one, BAM have to load all models.
- BAM can't gues if model is used or not base on script text. For example you can have 15 models with names: "minion1", "minion2", ... "minion15" and read models in loop like this:
Code:
For i=1 To 15
xBAM.CreateModel("minion"&i)
Next
... so all models must be loaded
- It can't load models when you call xBAM.CreateModel because it will "freez" game
 
@TerryRed
Here is BAM version with remove restricted custom models to "TGA" when it is processes. Tell me if it is faster or not.
 

Attachments

  • BAM.zip
    1.8 MB · Views: 85
@TerryRed
Here is BAM version with remove restricted custom models to "TGA" when it is processes. Tell me if it is faster or not.

Yes, that is MUCH better Rav. I no longer see the FOUND xxxxx and the table loads normally and quickly now.

Thank you.

@Gimli Indy looks cool, haha
 
@ravarcade.... actually I have found a different problem.

The model will look perfect in desktop mode, like I show in the pic above....but in Arcade / Forced Arcade Mode, the textures are all gone like in the pic below.

1595558174216.png

If I switch back and forth between Forced Arcade mode on and off in-game, the model will still look correct in desktop, but not forced arcade mode.

I'm not sure this is a new issue with the updated DLL or this was an existing problem already, or it's something to do with how I converted the model,etc.


I've attached the table with the model added. Please note that you MUST have the Pinevent1.4 vbs files installed in FuturePinball\Scripts for this table to work.


Also, this is very much a wip, so you will see some wip PinEvent code, and some old DOFLinx code from my older SW DSA DOFlinx from way back (that I'm updating to PE).... and I may not use this model,etc.

....so this is not to be considered a "releasable" table (as more will be done / added), but you guys at least get the lighting / playfield image / lightsaber updates and adjustments in the mean time.

For those wondering... I have to use 5 different playfield images so the Defense Bonus / Lightsaber Image lights would change colour correctly. I actually don't use different coloured lights on there now (like i did before), since the light image changes colour while keeping the lightsaber hilt and white core / numbers looking correct.
 

Attachments

  • Star Wars DSA ULTIMATE Pro 1.06 - PinEvent - WIP 2.zip
    117 MB · Views: 87
Last edited:
@ravarcade

OK... so I tried reimporting the model again...and sure enough it's working correctly in both modes, now. Strange. That said, since the table example above does show it changing in both modes, there must be something significant to know there, as someone may create a table and only test it in desktop and not realize their custom models won't display correctly in arcade/cabinet mode.

Something else I've noticed is that all light halos pass through all custom models.

Not completely unexpected (that happens in normal FP models too)...however for things like bumpers that have the halo glow hidden by the bumper cap model, once a custom object is in front of the bumper, than you can see the halo glow lens flare now visible and passing through the custom object. :(

The New Importer is very cool...and I love being able to use nice hi poly models with control over specular, etc. Lots of the VP guys are very impressed with the screenshot of the Tie Fighter above. We can do some neat stuff with this.

I'm just trying to narrow down the difference between limitations or possible bugs.

I've also found a nice Tie Interceptor model (Darth Vader's ship) which would probably fir better on the table....but since there is this halo pass through issue, I may not be able to place any custom models in front of the bumpers or on top of them. I was hoping to try to add a turret on top of the bumpers. :(

If anyone knows of a workaround, let me know.

Here's a few pics of the Tie Interceptor and Tie Fighter.




1595575701123.png

1595575746858.png

1595575832711.png
 
@TerryRed If you refer to white color on tie-fighter in arcade mode, when it is not error.
1595585963764.png
In arcade mode angle between eye/model surfaces is different than in destkop mode... and you have set very strong "Rim" effect on that model.
See my video:
Set lower values.
 
@ravarcade

Awesome. Thanks for taking time to explain that!

I figured it was the rim settings. I'm still learning these newer terms. I just wanted to be sure it was something on my end (which it usually is. :)
 
I have found that reflections can produce a lot of glare depending on your camera position. As you guys know, I often rotate my display to play tables in portrait mode but I usually test tables using the Full Table 2 camera. The reflection off the apron from the main light can be bad depending on where the camera is located. Sometimes it is worse it portrait mode on one table or on other tables it might worse with the Full Table 2 camera. You can move the main light around but then it is often not in the right spot when you find a place that does not produce glare. A solution I have found is to reduce the shininess of the apron. It is what I did on TOTAN and a couple of other tables. These are the settings I used on TOTAN:

' Settings for the Apron
'[BAM] !texture = zapron
'[BAM] !shininess = 0.1
'[BAM] !specularLevel = 0.1
'[BAM] !specularBalance = 0.01
'[BAM] !normalMapScale = 1.0

Reducing shininess reduces glare off any object so it might help with your tie fighter. On TOTAN, I set the specularLevel so it produces a slightly higher amount of light but you may not want to increase the brightness so set it to 0.
 
It's getting very hard to find a good spot for the Tie Interceptor because of the halo glows that only show through the models, and not everything else.

I need to find a spot that stays clear of both the halo glows on the table (that you don't see until the object is in front of them, making the object not very viewable)... and also stays clear of the lightsabers. Not much room, while making it still look good. I can't put it like the pic above, because the bumpers halos can't be disabled.
 
Yes, I wish FP would not let halo's from lights shine through some objects (I like the way you can make it shine through plastics). You could go through the table and turn the glow off of all the offending lights. I have tried that in the past but it usually reduces the light output so it is too low. I suppose you could add multiple lights to all the locations where you set the glow to 0. I am not sure how many lights it would take or if this would even work.
 
This issue is the sides of the table are the only spots left, really...and they have very limited in space.

I can't disable the glow for the bumpers, as when the object is in front of it...it's as if the bumper doesn't exist, and the glow is completely visible. It's like x-ray vision. :)
 
Forum activity
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.
      Mibs Mibs: StevOz has posted a new reply in the thread "Post interesting videos you found on YouTube".
      Back
      Top