Register    Login    Forum    FAQ

Board index » Future Pinball » BAM corner

Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: BAM Custom Models.
 Post Posted: Sat Apr 08, 2017 11:07 am 

Joined: Mon Mar 25, 2013 4:02 pm
Posts: 1034
In BAM since version v.1.4-162.

BAM can display on table own 3D models. That models are not part of FP table.
3D model should be in one dir with textures used by model.
Few 3D formats are supported.

In BAM dir you will find simple tool: ModelImporter.exe. Run it. Look at panel on right.
1. From combobox select draw method:
- BAM_diffuse_normal - for models without animation. They may use normal maps, but don't have to.
- BAM_anim_diffuse_normal - as above but for models with animation.
- BAM_hero - for models from DOTA2 (without animation, not finished).

2. Press button "Open Model" and select model.
If you see now your model with loaded textures when all will work in FP. Just press "Save as TGA" button.
If model is not loaded or something is missing, try to save model in different format.
In ModelImporter you can change drawning params. Try it. It will not explode.
Additional info:
- with WASD you can move model
- when you press F11 you can with mouse change direction (like in FP). Press F11 again to turn it off
- when you press F10 model will be displayed as wireframe (like in FP).
- if you lost, press R. It will center model on screen.
- model can be build from many parts. For example "bob" have 6 parts. Each part can have own textures. Model is imported as whole object.

Model is saved as TGA. As you know TGA is texture format. It has one nice feature: you can add any amount of data at end of file (as metadata).
So that TGA file is simple 1 pixel texture with all data about model stored as meta-data at end of file.
Inside that file there is: 3d model, textures, model animations.

Add model to FP.
Now you need to add created model to table in FP Editor. So:
1. Open table and open Texture Manager.
2. Press Import button and load TGA file created with ModelImporter and load TGA file.
3. Remember name of that "texture".
4. Close Texture Managaer.

Display custom model on table. Command: CreateModel
All custom-models are displayed on table with script commands, not in FP editor. So time to open script editor.
Simplest command to display custom object on table:
xBAM.CreateModel("name-from-texture-manager", x, y, z)
If you only add this command and run table (press F5) you can go to "DEV Options" and "Custom Models" menu and change model params.

Full list of params for CreateModel:
X, Y, Z,

- X, Y, Z - coords from FP editor. Note, you can use objects from FP Editor as reference, like this: xBAM.CreateModel("something", Light1.X, Light1.Y+100, 0)
- Height - dimmension on Z axis of object in FP world. If you don't set it, BAM will gues value
- RX, RY, RZ - rotation on X, Y, Z axis, default is 0,0,0
- ReflectionFlag - True or False. Default is True
- SwapZ2YFlag - sometimes 3D model is designed with Y axis used as "up". You can set this flag to True. Same flag is in ModelImporter. Try it to understand it. Default is False.

This function will return "CustomModelObject". To change params later you will use this command like this:
Dim Starship
Set Starship = xBAM.CreateModel("starship", 100, 100, 0, 100)

This way you will have access to object properties.

[ToDo: more on custom object params.]

Better Arcade Mode
current BAM version: v1.5-289, released: May 10, 2020

 Post subject: Re: BAM Custom Models.
 Post Posted: Sat Sep 14, 2019 10:23 am 

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 3052
Location: Ontario, Canada

 Post subject: Re: BAM Custom Models.
 Post Posted: Sat Sep 14, 2019 5:31 pm 

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 3052
Location: Ontario, Canada
ravarcade wrote:
SLAMT1LT wrote:
ravarcade wrote:
Second, with model and textures imported as one single TGA.
This should work always.

But this isn't working for me. The Model Importer included in the BAM directory will not import any .fpt model, instead it only seems to import .ms3d models but then it doesn't load the texture, so I only have a blank model.

.ms3d format dont have any material/texture info. Try to save model as .obj (wavefront). It is text format. It should also create .mtl file (this is material description).
See Geralt model in:

If it fails, you may try other formats, like fbx.

ModelImporter is using Assimp and many formats are supported (but some are broken):

I am playing with this Custom Model feature Rav, it is quite interesting.

I think it would be cool to import animated models into FP.

It is not clear to me what animated file types are supported by "assimp" or where to find free animated models to try.

I tried some "rigged animated" models that weren't actually animated.

I found "bob" guy with a lamp demo is elsewhere on the net as well as in your demo folder. It is an md5anim file...that Bam model importer
imports nicely and converts to a tga file.

Also the Normal maps and diffuse map colored textures need to be assigned to and contained in the obj file to work...

My daughter uses Maya for Pixar type animations, so maybe she can export to md5anim

Last edited by Gimli on Sat Sep 14, 2019 6:20 pm, edited 1 time in total.

 Post subject: Re: BAM Custom Models.
 Post Posted: Sat Sep 14, 2019 6:19 pm 

Joined: Mon Jan 27, 2014 12:36 pm
Posts: 3052
Location: Ontario, Canada
It looks like Maya exports to fbx so we'll give that a go....

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

Board index » Future Pinball » BAM corner

Who is online

Users browsing this forum: No registered users and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to: