• Google Translate to French or Other Languages Click on the link and a new tab will open with this page translated into French.
    Click on the "To:" pull down option to select a different language. Users will not be logged in on the new Google tab.

Fast Tracking my BAM/FP comprehension

Gimli

Pinball Master

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.
 

TerryRed

Pinball Master

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. :)
 

Gimli

Pinball Master
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
 

polygame

Inserted Coin
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
 

polygame

Inserted Coin
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
 

TerryRed

Pinball Master
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?
 

polygame

Inserted Coin
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 :)
 

TerryRed

Pinball Master
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 :)
 

polygame

Inserted Coin
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: 71

Gimli

Pinball Master
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.
 

Gimli

Pinball Master
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...
 

Gimli

Pinball Master
Very nice developments today for sure.
Thanks for you input.
There have been a number of dangling threads that we hadn't followed
 

Gimli

Pinball Master
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
 

Gimli

Pinball Master
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:

Gimli

Pinball Master
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: 64
Last edited:

Paolo

No Bam no Play
Chat Moderator
Site Supporters
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
 

Gimli

Pinball Master
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 !
 

Paolo

No Bam no Play
Chat Moderator
Site Supporters
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
 

Gimli

Pinball Master
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.
 

Paolo

No Bam no Play
Chat Moderator
Site Supporters
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.
 

polygame

Inserted Coin
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?
 
General chit-chat
Help Users
  • No one is chatting at the moment.
    @ Paolo: ********* *** ******
    Top