Tutorial - Importing Custom objects

ddmx
Posts: 5373
Joined: Sun Apr 20, 2008 3:36 pm
Location: Midland MI

Tutorial - Importing Custom objects

Post 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!
Last edited by ddmx on Tue Mar 26, 2013 2:59 pm, edited 1 time in total.
ddmx
Posts: 5373
Joined: Sun Apr 20, 2008 3:36 pm
Location: Midland MI

Re: Tutorial - Importing Custom objects

Post by ddmx »

BIG bump
mace-x
Posts: 2303
Joined: Wed Jan 02, 2008 5:53 am
Team: your sister´s fan!
Location: candy planet.

Re: Tutorial - Importing Custom objects

Post by mace-x »

wohooo!
great, thanks for the guide, i knew how but sometimes i get confused lol
Image
Massacre ftw!

the human stupidity and the universe are unlimited, and im not totally sure about the universe...
yomo
Posts: 1930
Joined: Tue Apr 22, 2008 10:00 am

Re: Tutorial - Importing Custom objects

Post 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.
Image
mxallan15
Posts: 104
Joined: Mon May 11, 2009 7:35 pm

Re: Tutorial - Importing Custom objects

Post 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?
Image
jlv
Site Admin
Posts: 14910
Joined: Fri Nov 02, 2007 5:39 am
Team: No Frills Racing
Contact:

Re: Tutorial - Importing Custom objects

Post by jlv »

That's the angle.
Josh Vanderhoof
Sole Proprietor
jlv@mxsimulator.com
If you email, put "MX Simulator" in the subject to make sure it gets through my spam filter.
noahvosah
Posts: 4
Joined: Sun Dec 26, 2010 2:50 pm
Team: Privateer

Re: Tutorial - Importing Custom objects

Post 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
yzmxer608
Posts: 15352
Joined: Mon Dec 29, 2008 4:30 am
Team: SYS
Location: Wisconsin, U.S.A

Re: Tutorial - Importing Custom objects

Post by yzmxer608 »

You don't need to add a new line for lods or the norm/spec maps.
TeamHavocRacing wrote:If I had a nickel for every time someone asked for this, I would have a whole shitload of nickels.
Boblob801
Posts: 3998
Joined: Mon Nov 16, 2009 4:59 am
Team: <3 Andy
Location: New Zealand
Contact:

Re: Tutorial - Importing Custom objects

Post 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.
Hi
mxsisboss
Posts: 1702
Joined: Mon Feb 06, 2012 6:11 pm

Re: Tutorial - Importing Custom objects

Post 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:
cr500zd wrote:is there anyway that 500cc bikes will be put into the game?
jlv wrote:I'd say it will definitely happen at some point. Not any time soon though.
yzmxer608
Posts: 15352
Joined: Mon Dec 29, 2008 4:30 am
Team: SYS
Location: Wisconsin, U.S.A

Re: Tutorial - Importing Custom objects

Post 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?
TeamHavocRacing wrote:If I had a nickel for every time someone asked for this, I would have a whole shitload of nickels.
yzmxer608
Posts: 15352
Joined: Mon Dec 29, 2008 4:30 am
Team: SYS
Location: Wisconsin, U.S.A

Re: Tutorial - Importing Custom objects

Post 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.
TeamHavocRacing wrote:If I had a nickel for every time someone asked for this, I would have a whole shitload of nickels.
mxsisboss
Posts: 1702
Joined: Mon Feb 06, 2012 6:11 pm

Re: Tutorial - Importing Custom objects

Post 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
cr500zd wrote:is there anyway that 500cc bikes will be put into the game?
jlv wrote:I'd say it will definitely happen at some point. Not any time soon though.
mxsisboss
Posts: 1702
Joined: Mon Feb 06, 2012 6:11 pm

Re: Tutorial - Importing Custom objects

Post by mxsisboss »

*work
cr500zd wrote:is there anyway that 500cc bikes will be put into the game?
jlv wrote:I'd say it will definitely happen at some point. Not any time soon though.
mxsisboss
Posts: 1702
Joined: Mon Feb 06, 2012 6:11 pm

Re: Tutorial - Importing Custom objects

Post by mxsisboss »

still invisible :|
cr500zd wrote:is there anyway that 500cc bikes will be put into the game?
jlv wrote:I'd say it will definitely happen at some point. Not any time soon though.
Post Reply