Beta BAM Update v297: custom model animations

ravarcade

Pinball Wizard
Joined
Feb 8, 2020
Messages
101
Reaction score
232
Points
49
Favorite Pinball Machine
AFM
Inside 3 demo tables.


- few bugs fixed.
- you can create many models on table with animation (but at some point cpu speed will be limit). Previously with 10 or more Indy model there ware artifacts.
- new script command to make animation simpler.

Code sample from ijtezt4:
Code:
Dim ij
Set ij = xBAM.CreateModel("IndyFinal2")
ij.Position.X = 300
ij.Position.Y = 100
ij.Height = 80
ij.Animation(20).ImportFinalPose() ' U
ij.Animation(17).ImportFinalPose() ' R
ij.Anim("UURUT")

Sub FuturePinball_KeyPressed(ByVal KeyCode)
    If KeyCode = 31 Then ' On Key S
        ij.Position.Y = 100
        ij.Reset()
        ij.Anim("UURUT")
    End If

    If KeyCode = 32 Then ' On Key D
        ij.Anim("U")
    End If
 ....
Animation "U" is run, "R" is jump, "T" is stop run.

Line ij.Animation(20).ImportFinalPose() will store change for position and rotation of model after animation 20 ("U") is finished.
So, every time animation "U" is played model will move befer next animation will be played.
When you press S key, whole animation will be replayed.
If you press D key, run animation will be played once.

Line ij.Reset() will stop playing current animation.

This is simplified version how to animations with custom models.
 
Inside 3 demo tables.


- few bugs fixed.
- you can create many models on table with animation (but at some point cpu speed will be limit). Previously with 10 or more Indy model there ware artifacts.
- new script command to make animation simpler.

Code sample from ijtezt4:
Code:
Dim ij
Set ij = xBAM.CreateModel("IndyFinal2")
ij.Position.X = 300
ij.Position.Y = 100
ij.Height = 80
ij.Animation(20).ImportFinalPose() ' U
ij.Animation(17).ImportFinalPose() ' R
ij.Anim("UURUT")

Sub FuturePinball_KeyPressed(ByVal KeyCode)
    If KeyCode = 31 Then ' On Key S
        ij.Position.Y = 100
        ij.Reset()
        ij.Anim("UURUT")
    End If

    If KeyCode = 32 Then ' On Key D
        ij.Anim("U")
    End If
....
Animation "U" is run, "R" is jump, "T" is stop run.

Line ij.Animation(20).ImportFinalPose() will store change for position and rotation of model after animation 20 ("U") is finished.
So, every time animation "U" is played model will move befer next animation will be played.
When you press S key, whole animation will be replayed.
If you press D key, run animation will be played once.

Line ij.Reset() will stop playing current animation.

This is simplified version how to animations with custom models.
Absolutely AMAZING STUFF !!!
Thanks Rav
 
Somewhere a poor, hapless boulder is rolling for its life.

Gimli's version of the table has the boulder in a couple of different ways. One of the guys created a custom ball that looks like the boulder and Gimli added a rolling ball animation when one of the modes start.
 
@ravarcade

I may have some questions about blending different animations.

I do have a question on another related thing.

I mentioned before about the problem with custom models allowing all halo glow / flares to pass through them on the table. This is a problem when using any custom model that moves over the table as the halo glows from all lights (even those hidden under other objects and surfaces) will appear through the custom object. It's the same problem when using animated characters... the halo flares appear through them.

My workaround for this (on my current Star Wars DSA mod) was to instead use FP Model Importer to convert the lower polygon space ship models to a "peg" instead which allows them to move across the table without any halo flares showing through them. This however won't allow for FBX or more detailed models to be used like this.

Is it possible for Custom Models to be rendered or "seen" in the same way as a "peg" or other FP model types to prevent this problem? I can understand this being hard for animated characters.... but even if we could somehow make a static BAM custom model render like a "peg" or similar.... it would allow for more freedom with using mini playfield to move and animate objects.

It was very tricky to get everything arranged and animated in a way so the halo flares don't show up through everything I have being animated on Star Wars... but that won't always be possible on some tables.
 
Gimli's version of the table has the boulder in a couple of different ways. One of the guys created a custom ball that looks like the boulder and Gimli added a rolling ball animation when one of the modes start.
Ya now I can have Indy running ahead of the boulder and diving out of the way.... :)
 
Code:
sw2EPLuXTtQ
Hey, someone tell that boulder to settle down! No cutting in line in front of Indy!

Haha, that's awesome, though. Something to look forward to when I eventually get my guinea pig-powered machine up to speed.

Btw, that reminds me, what's the status of Rat Race and Labyrinth? They are on pause, I suppose?
 
Last edited:
Hey, someone tell that boulder to settle down! No cutting in line in front of Indy!

Haha, that's awesome, though. Something to look forward to when I eventually get my guinea pig-powered machine up to speed.

Btw, that reminds me, what's the status of Rat Race and Labyrinth? They are on pause, I suppose?
Ya I got diverted by that big squirrel known as "BAM model importer". I have been dreaming about this for years...and I can't wait to see what Polygame and TerryRed are up to in their sinister BAM laboratories. Not to mention if SLAMT1LT gets a hold of these secrets ....best keep our voices low.

But I will get back to them and I have worked on Billiards a fare bit...I will post a WIP for people to try. I found a much better table and it is not so easy now....
 
@ravarcade

This is what I am referring to. The first pic shows a custom model Vader not being displayed in front of any lights. they are to the left and right hidden under other objects / surfaces.

Star Wars DSA ULTIMATE Pro 1.06 - PinEvent - WIP - Vader New2.png


....and here I moved the camera to show the light / halos that are now visible and passing through the custom model.

Star Wars DSA ULTIMATE Pro 1.06 - PinEvent - WIP - Vader New3.png



Would it be possible to have the option to have a custom model act or render like a "peg" or similar model in FP that won't allow lights / halos to pass through them?
 
@TerryRed Try this BAM.dll. Inside is demo table. Press L key to change xBAM.DrawCustomModelsLast.
xBAM.DrawCustomModelsLast = True will make custom models to be drawed last, after all glow flares.
 

Attachments

  • BAM.zip
    4.4 MB · Views: 98
@TerryRed Try this BAM.dll. Inside is demo table. Press L key to change xBAM.DrawCustomModelsLast.
xBAM.DrawCustomModelsLast = True will make custom models to be drawed last, after all glow flares.
Thanks Rav !
once again outstanding work !!

This is opening pandoras box but what is BAM's capacity to determine the models position at this time ?

Are you Tracking position x , y and z of model as "Block" or are you tracking the "skeleton" ?
 
@TerryRed Try this BAM.dll. Inside is demo table. Press L key to change xBAM.DrawCustomModelsLast.
xBAM.DrawCustomModelsLast = True will make custom models to be drawed last, after all glow flares.


This is working great for Custom Models now rendering in front of glow flares....awesome.

However, it causes the custom models to also render in front of holograms as well (which normally are always on top of everything). For a table like Star Wars DSA which uses holograms for lightsabers (and now with my mod, lasers and explosions), it doesn't look right because Darth Vader and some ships render on top of the lightsabers, lasers and explosions.

Would it be possible to have them not render in front of holograms.... or be able to specify what level / layer they render after (flares only = 1, flares and holograms = 2, default = 0, etc).

Thanks again for all the support you provide for BAM.
 
Are you Tracking position x , y and z of model as "Block" or are you tracking the "skeleton" ?
As block.
With this version of BAM.dll you can read update model position. Note: model position is updated when next animation is played, not when current want. Even if current is finished. When current animation is finished model stays in last frame of animation.

@TerryRed It can't work like you described. Holograms may be drawed befor or after lights flares. BAM don't have control on draw order.

This is new version and new demo. Press L to draw models as last, press K to draw models with surface "cms", press J to draw models at begin.
Now you have command:
Code:
xBAM.DrawCustomModelsWithSurface "name of surface"
So, you can bind custom models draw with given surface. This may be existing surface on table. This surface must be drawed, so you cant uncheck Render object (initial value)
 

Attachments

  • BAM.zip
    4.4 MB · Views: 97
@ravarcade

With the latest BAM and demo table, when I press K, FP crashes. Pressing L and J work fine though.
 
@TerryRed I will work on it tomorrow. For me it works fine. Only L with different Video/Rendering options sometimes don't draw model.
 
@ravarcade

Update: I was wrong about this. Read the next response for clarification.

Another thing I just noticed with the new update and the previous update.... the "flares" seem to be missing altogether on lights no mater what setting is used.

This pic is from before the updates... note the slingshots and the plastics on the bottom have the halo flares....

1597015300907.png



...and this is from using the last two bam beta updates, no matter what setting I use for DrawCustomModelsLast , the flares are gone.


1597015461342.png
 
Last edited:
@ravarcade
@Gimli
@GeorgeH
@wild

OK guys... please take note of what I posted above about the lens flares. I was wrong with that assessment.

The problem is NOT from BAM it turns out. It's from using the Zed x64 1.1 Future Pinball EXE.

By coincidence, I had been using the Zed x64 1.1 EXE to get around the max 800 objects limit while doing my "Epic Space Battles" mod. (If there is a better more proper way, someone please let me know). While testing the newer BAM update, I had a crashing problem. So I wanted to be sure that the Zed EXE wasn't causing a crash, and put back the original FP EXE (which I normally always use). When the halos looked different I thought it was wrong since I've seen them look like the top pic for the last 2 weeks. :)

The bottom picture is correct, not the top picture. I knew the halos looked odd while I was creating this mod! :p I also thought some pics posted previously by you guys a while back looked the same way and remembered thinking you guys messed up your lights on your mods (i think it was pics of the BB-8 mod)... but it turns out it was most likely the Zed EXE causing them to look wrong.


So keep that in mind guys when using the Zed EXE!
 
I decided to try making screenshots of Robots Invasion with all these versions:

These versions
FP Orig
2.5R1
2.5R2
2.6
2.7
looked like this:
RI+2.7.png

These versions
Zed 1.0 64
Zed 1.1 64
looked like this:
RI+Zed 1.1 64.png

Terry is right. The 2 Zed versions look different. I used to be a big fan of the Zed 1.1 64 version because it had better memory management. I stopped using it when Rav fixed the big memory leak in one of the previous BAM versions. Whenever I need to exceed 800 objects now, I use the 2.5R2 version which unfortunately also removed the debug mode. I have to agree with Terry that I don't like the way the Zed versions look.
 
Last edited:
@GeorgeH Zed's FP.exe have replaced glow textures. BTW: when you get last time "exceed 800 objects error" with BAM? Maybe you should try again.

@TerryRed another BAM.dll. Crashes solved, probably missing flares too.
 

Attachments

  • BAM.zip
    4.4 MB · Views: 86
@GeorgeH Zed's FP.exe have replaced glow textures. BTW: when you get last time "exceed 800 objects error" with BAM? Maybe you should try again.

@TerryRed another BAM.dll. Crashes solved, probably missing flares too.

No crashing Rav.

However... I can't seem to get the halos to not show through on my Star Wars custom models. (It works on demo table).

I've tried...

xBAM.DrawCustomModelsLast = True

and

xBAM.DrawCustomModelsLast = True : xBAM.DrawCustomModelsWithSurface ""

...but neither seems to change anything, whereas the first dll did work for me.


As for the 800 objects... I'm not getting the pop up message when "creating" objects over 800 with BAM.... but if I have two tables open, and I try to "copy" an object from one table to the other, I then get the pop up message saying I've exceeded 800 objects. I also get the same if I have only one table open and try to copy and paste an object if I'm over 800 (this is how Zed EXE also worked).
 
@polygame
@ravarcade
@Gimli
@GeorgeH
@wild
@ULTIMATE Pro Pinball

Prepare to be wowed. :)

Star Wars: Death Star Assault (Ultimate Pro)

"EPIC Space Battles" mod!


I'm glad I can finally show off some of what I've been working on the last 2 weeks. This is my crazy mod that changes this awesome table into a Galactic Battleground in Future Pinball. You've never seen a Star Wars table like this!

I think you guys will be blown away.

– you want X-Wing, Tie Fighter, Millenium Falcon, Turbo Laser Cannon, and Vader’s Tie Fighter… you got it
– you want space battles… you got it
– you want ships flying around the table…. you got it
– you want tie fighter and x-wing laser blasts… you got it
– you want XWing and Tie Fighter firing at each other… you got it
– you want exploding ships… you got it
– you want a turbo laser cannon that fires with animation… you got it
– you want the Millenium Falcon flying around the table…. you got it.
– you want Darth Vader on the table reacting to table events… you got it.

This is using 25 mini playfields so far... its nuts. The Millenium Falcon, Vader and his Tie Fighter are custom models.... the others are "pegs" (to avoid the flares showing through the model problem).

I'll have a wip of the table available after some code clean up and testing with the newer BAM (if I can get the "render last" working in a way that benefits this specific table).

Thanks to @Gimli for help with Darth! ... @polygame for nudging the progress of new Importer features... and of course @ravarcade for the amazing updates that allow this to be possible!

Big thanks to @fuzzel for the usage of his X-Wing, Vader Tie Fighter, and Turbo Laser models!

Watch until the end for a special treat.
?


 
Last edited:
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: JonPurpleHaze has posted a new reply in the thread "What music are you listening to?".
      Back
      Top