Page 1 of 2

Tutorial - Importing Custom objects

Posted: Fri Jun 20, 2008 11:02 pm
by ddmx
(please sticky)
Ok, this is the second installment that goes along with "Creating Custom Objects". If you followed the first tutorial then you should already have a banner.jm, or whatever you called it, and a wireframe. (a .tga file)
If you haven't opened this file in photoshop, or an equivalent editing program, do so and skin it however you would like. You also need a collision file for the object. This is coming in the next tutorial. The collision file is not the most important right now though because if you hit a banner in real life, you don't bounce off of it, you would go through it.

If you already have your intended object, say wakestyle's ama stake, then follow along, making minor adjustments when needed.

The first thing that I like to do when putting custom objects into a track is to make three seperate folders within my track folder which is located at c:users/"name"/AppData/Local/MX Simulator/"Track". These three folders being "models", "skins", and "collision". The reason for creating these folders is to keep everything for that track nice and organized. When you find that you have to edit something it makes it much easier to do so. This also requires hardly any effort on the coding side to do it.

Some things to remember:
1. Your track name folder located at c:users/"name"/AppData/Local/MX Simulator/"Track" should not contain any capital letters or spaces. This tends to throw off the game when reading objects.
2. To be safe, you shouldn't name your objects or skins with any capital letters or spaces also
3. Your skin has to be a .png and make sure it is .png not .PNG
4. Your model has to be a .JM file
5. Your collision file has to be just a regular file file

Let's do it!
1. Place your "object name".jm into the models folder within the track folder
2. Place your "skin name".png into the skins folder within the track folder
3. If you have a collision file place it into your collision folder. If you don't have a collision file don't worry about it.
4. Right click the statues folder with your track folder, open it with notepad or notepad++ (preferred)
5. At the very end of the text, add another line. This is where you input the values for your object.

They are
[1000.000000 0.000000 1000.000000] - These are the coordinates for your object. X Y Z. the X and Z coordinates are where the object is placed on the map. The Y coordinate is the distance of the objects center from the ground. 0,000000 is placed on the ground. The reason I place it a 1000 0 1000 is because that just gets it into the game. Once it's in the game it is very easy to move and rotate by just clicking on the statues tab on the left side of the screen, and then clicking and dragging or rotating the little black icon in the center of the object.

0.000000 - This is the rotation of the object in radians. You can change this in the game much easier.

@"trackname"/models/banner.jm - this is the path for the object file
@"trackname"/skins/banner.png - this is the path for the skin file
@"trackname"/collision/banner.shp - this is the path for the collision file

The actual setup is this:

[1000.000000 0.000000 1000.000000] 0.000000 @redbud10/models/banner.jm
@redbud10/skins/banner.png @"trackname"/collision/banner.shp

*If you have subfolders for your models, skins, collision, etc, you cannot saf the track. It must be left open.

If you do not have a collision file it can be written:

[1000.000000 0.000000 1000.000000] 0.000000 @"trackname"/models/banner.jm
@"trackname"/skins/banner.png null

At the bottom of the file make sure you have at least one space. I don't know why this is but it is just finicky.

Hope this helps, now that you can make your own objects, and get them into the game, you can start placing it and making your tracks look sweet!

Re: Tutorial - Importing Custom objects

Posted: Thu Mar 19, 2009 6:02 pm
by ddmx
BIG bump

Re: Tutorial - Importing Custom objects

Posted: Thu Mar 19, 2009 9:48 pm
by mace-x
wohooo!
great, thanks for the guide, i knew how but sometimes i get confused lol

Re: Tutorial - Importing Custom objects

Posted: Thu Jul 02, 2009 8:22 am
by yomo
sorry to bring this up the top...

But how do you import a 3d Max object into blender

I have tried exporting as .OBJ (couldnt find .obj) but that does work.

Re: Tutorial - Importing Custom objects

Posted: Mon Jan 11, 2010 9:55 pm
by mxallan15
Thank's nice tutorial , but i have 2 question , it is possible to create an object with Autocad and imported?
and 0.0000 after the [] is a scale?

Re: Tutorial - Importing Custom objects

Posted: Mon Jan 11, 2010 10:59 pm
by jlv
That's the angle.

Re: Tutorial - Importing Custom objects

Posted: Sun Dec 26, 2010 2:58 pm
by noahvosah
This was my first attempt at attempting to create a code for anything. I read this guide numerous trying to figure this out, but it still doesn't appear to show up in the track editor. I have also seen other guides where the format seemed alittle different as well so I'm not sure if that could be it. Anyway, this is what I wound up with, trying to get a fence into the track editor. Can anyone tell me what might be wrong?

[1000.000000 0.000000 1000.000000] 0.000000 @trial/models/fence.jm @trial/skins/fence.png null [1000.000000 0.000000 1000.000000] 0.000000 @trial/models/fence_lod6.jm @trial/skins/fence_norm null

Re: Tutorial - Importing Custom objects

Posted: Mon Dec 27, 2010 3:59 am
by yzmxer608
You don't need to add a new line for lods or the norm/spec maps.

Re: Tutorial - Importing Custom objects

Posted: Thu May 10, 2012 6:52 am
by Boblob801
I have a problem with my object being invisible in game.
I've tried this multiple times it seems to be the texture.
Does the texture require special things? Alpha channels or.....
The models in game its just invisible.

Re: Tutorial - Importing Custom objects

Posted: Fri Aug 24, 2012 6:06 pm
by mxsisboss
Boblob801 wrote:I have a problem with my object being invisible in game.
I've tried this multiple times it seems to be the texture.
Does the texture require special things? Alpha channels or.....
The models in game its just invisible.
Same :evil:

Re: Tutorial - Importing Custom objects

Posted: Fri Aug 24, 2012 6:11 pm
by yzmxer608
Make sure you have the word null at the end of the line in the statues file. Also make sure you don't have a typo in the texture name, it sounds stupid but it happens. Do you have a material applied to the object in Blender?

Re: Tutorial - Importing Custom objects

Posted: Fri Aug 24, 2012 6:11 pm
by yzmxer608
yzmxer608 wrote:Make sure you have the word null at the end of the line in the statues file.
Assuming you don't have a collision file.

Re: Tutorial - Importing Custom objects

Posted: Fri Aug 24, 2012 6:15 pm
by mxsisboss
it was named right i jut made a material in blender to do a render thanks yzed ill see if it worj now :D
Image
skin is nowhere near finished

Re: Tutorial - Importing Custom objects

Posted: Fri Aug 24, 2012 6:16 pm
by mxsisboss
*work

Re: Tutorial - Importing Custom objects

Posted: Fri Aug 24, 2012 6:18 pm
by mxsisboss
still invisible :|