Fast Tracking my BAM/FP comprehension


I played with this feature recently and the model you see in the video is the only one actually that Rav and I could get to work.

In you BAM directory there is a program called "model importer" that is based on an open source program, I can 't remember the name of at GitHub.

In theory the model importer takes a fully animated model and converts it to a TGA file (very cool) and then when you import this TGA texture BAM
will read it as an animated model.
 

I played with this feature recently and the model you see in the video is the only one actually that Rav and I could get to work.

In you BAM directory there is a program called "model importer" that is based on an open source program, I can 't remember the name of at GitHub.

In theory the model importer takes a fully animated model and converts it to a TGA file (very cool) and then when you import this TGA texture BAM
will read it as an animated model.


You may want to read the rest of the thread and watch rav's new videos and note the new update to BAM. :)
 
wait what....suddenly there is a whole bunch of stuff I didn't see
where was I looking
oops

I was responding to the first page of this thread....oO
 
wait what....suddenly there is a whole bunch of stuff I didn't see
where was I looking
oops

I was responding to the first page of this thread....oO

you should also look at the mailbox
 
easing is important...it brings reality to movement. That's the first thing I went to check when you first mention it to me. and yes Terry, this is what I meant
 
By the way, I remember the inclusion of the PNG file format was discussed at some point. What's the ETA on that?
TGA is soooooo heavy for nothing
 
By the way, I remember the inclusion of the PNG file format was discussed at some point. What's the ETA on that?
TGA is soooooo heavy for nothing

Probably never :)

PNG compressed is a little smaller in file size... is that more of what you mean?
 
you don't have to create an extra alpha matte on PNG ...winner for me...
and little smaller is not what I wouldn't describe it...It's Waayyyyyy smaller than tga...
Anyway, you gotta choose your battle :)
 
you don't have to create an extra alpha matte on PNG ...winner for me...
and little smaller is not what I wouldn't describe it...It's Waayyyyyy smaller than tga...
Anyway, you gotta choose your battle :)

Alpha Matte..... for alpha blending?

Maybe I misunderstand...

I can do full alpha blending / transparency using just the one TGA image in FP.



1591308448079.png


...and here it is on the backglass retaining the alpha blend with the overlay videos underneath.


1591308560656.png



I know you have some awesome tutorials about this stuff out there...and I may have seen them on vpforums at on point.... so I may not have a clue about what I'm talking about :)
 
in photoshop, you do have to create the alpha channel separately for TGA
which is not the case for PNG

Maybe I should use GIMP instead.
 

Attachments

  • ps.png
    ps.png
    11.2 KB · Views: 110
in photoshop, you do have to create the alpha channel separately for TGA
which is not the case for PNG

Got it. Yah, for PNG, TGA, etc I'm so use to just right-clicking "Add Alpha" on GIMP (yes, I've barely touched PS still) :)
 
I was explaining MP process to Steve and asked if there was a simple code to grab objects /create miniplayfields automatically for us.

Breaking News : There is . Thanks to RAV

At begin helper function to create mini-playfield for given object
Code:
Function CreateMiniPlayfield(ByRef item, Z, H)
Dim X, Y
X = item.X
Y = item.Y
Const e = 0.2
Dim MP
Set MP = xBAM.CreateMiniPlayfield(X-e, X+e, Y-e, Y+e, Z-e, Z+H+e, X, Y, Z)
MP.MoveTo X, Y, Z, 0,0,0, 1, 0
Set CreateMiniPlayfield = MP
End Function


Usage:
Code:
Dim bumperMP
Set bumperMP = CreateMiniPlayfield(Bumper1, 0, 40)

It has 3 params:
- item: Almost all table object have X & Y property and that values are used... buf for example surface don't have.
- Z. For most case it is 0 for object on playfield. Note: ball is ~13 mm above.
- H. Height, in this example it is 40.
Bumper is wird. It has 2 or 3 parts and they are no positioned to surface, but above. This value can be found by experiments.

I hope this helper may solve most of problems.

From example above with bumper. Even simple object as bumper can have many parts and it is not so abvious to guess values.
This is also hard to add that logic into BAM. To make that posible i would have to reverse engineered all FP objects type.
Sorry but weeks of my work for this is not an option.

Surface as BOX may be used define MP. It can be done in 1-2 days. So, if you want, just let me know.
But only max coords for left/right/up/down can be used. It will not work as expacted with more complex shapes of surface.
 
So here is what I recommend.
Lets say we have a trigger named AliensTrigger2 that we want to grab. I would do these 2 steps.

1. Paste this code
Code:
Function CreateMiniPlayfield(ByRef item, Z, H)

Dim X, Y

X = item.X

Y = item.Y

Const e = 0.2

Dim MP

Set MP = xBAM.CreateMiniPlayfield(X-e, X+e, Y-e, Y+e, Z-e, Z+H+e, X, Y, Z)

MP.MoveTo X, Y, Z, 0,0,0, 1, 0

Set CreateMiniPlayfield = MP

End Function

2. Paste this code:

Code:
Dim miniplayfield_0

Set miniplayfield_0 = CreateMiniPlayfield(AliensTrigger2, 0, 40)

I would name all Miniplayfield from 0 - 48 . So when you want to tweak in BAM menu it will show them so you can animate them...
 
What do you know...I still have some life in me Gimli :)
 
Very nice developments today for sure.
Thanks for you input.
There have been a number of dangling threads that we hadn't followed
 
I just checked the new MP code and works with most objects that have names (kickers, flippers, bumpers, triggers, targets, Flashers, Lights)
But it obviously won't work for pegs, wires and ornaments as they don't have names

It doesn't work yet with Walls or Surfaces
 
Ok here is something cool. I remembered that previously Rav set the position of his model based on the location of another table object.
For instance Trigger1 or whatever . So now with our New Mp code. I can asign the fester TGA to Trigger1 and then grab them both instantaneously as follows:

Code:
Dim cm_fester
Set cm_fester = xBAM.CreateModel("fester",     Trigger1.x,     Trigger1.y,       0,     200,       0,       0,      -0, True, False)
cm_fester.Kd.Set     0.6,     0.6,     0.6
cm_fester.Ks.Set       0,       0,       0,       1
cm_fester.Rim.Set       1,       1,       1,       0
cm_fester.Spe.Set       1,       1


Function CreateMiniPlayfield(ByRef item, Z, H)
   Dim X, Y
   X = item.X
   Y = item.Y
   Const e = 0.2
   Dim MP
   Set MP = xBAM.CreateMiniPlayfield(X-e, X+e, Y-e, Y+e, Z-e, Z+H+e, X, Y, Z)
   MP.MoveTo X, Y, Z, 0,0,0, 1, 0
   Set CreateMiniPlayfield = MP
End Function

Dim miniplayfield_0
Set miniplayfield_0  = CreateMiniPlayfield(Trigger1, 0, 40)

 
Last edited:
ok one more silly video and I am packing it in.
I attach Fester to a moving collidable target
 
I refined the collision a little

Here is the demo table
See Code at Bottom of Script

Trigger1 is actually a target and not a trigger. I had started with a trigger object and changed to target and I couldn't be bothered to change the code (so I kept the name tirgger1 one just confuse everyone :p
 

Attachments

  • Fester Test2.fpt
    2 MB · Views: 93
Last edited:
Excellent video demonstration, I did not understand, if this new function is the one inserted by Rav, in 290,when, I asked him, to increase the MP limit.

I don't know if it is possible, or maybe there is a anothermethod, but I asked Rav, if it is possible, to move the orange box, from point A, to point B, with combinations of keys, without using xyz, just for moving I mean, obviously when you bring the box to point B, then you have to model it according to the object you have to catch.......obviously the same way must be for the green box.

this has always been my biggest problem, which has kept me from trying to learn a lot about MP

when... I have to grab an object, that is put off the table, I go crazy, trying to carry the orange box on that object
 
Excellent video demonstration....
this has always been my biggest problem, which has kept me from trying to learn a lot about MP
when... I have to grab an object, that is put off the table, I go crazy, trying to carry the orange box on that object
Thanks Paolo. With this code it is now so easy.
It was your suggestion to Rav to add "maintain physics" and to increase the limit to 48. Etc...Good ideas !
 
Thanks Paolo. With this code it is now so easy.
It was your suggestion to Rav to add "maintain physics" and to increase the limit to 48. Etc...Good ideas !

yes,I have good ideas, but I can't use them personally.....With this code it is now so easy.
which is easier? i don't know.....

I still can not move an orange box on the object ..... imagine if I understand all the rest
 
The code creates the orange box for you. You don't have to move it.
It is the green box that gets moved for everything else.

Try this Paolo

1. Start a "new table"
2. Add a trigger called "Trigger1" anywhere you want

3. Paste this code:
Code:
Function CreateMiniPlayfield(ByRef item, Z, H)
   Dim X, Y
   X = item.X
   Y = item.Y
   Const e = 0.2
   Dim MP
   Set MP = xBAM.CreateMiniPlayfield(X-e, X+e, Y-e, Y+e, Z-e, Z+H+e, X, Y, Z)
   MP.MoveTo X, Y, Z, 0,0,0, 1, 0
   Set CreateMiniPlayfield = MP
End Function

Dim miniplayfield_0
Set miniplayfield_0  = CreateMiniPlayfield(Trigger1, 0, 40)

That's it . Orange box is done.
 
I still don't understand, in my opinion we should talk about it in another place, I don't want to interfere here, between terry and polygame.
 
no problem it is a very good thread. I am very interested about that Paolo.
But Gimli...shouldn't we just wait for the "Grab box from a list" concept?
 
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