• Welcome to MX Bikes Official Forum. Please login or sign up.
 
March 28, 2024, 09:32:36 PM

News:

MX Bikes beta18j available! :)


Track editing questions/help

Started by Ruubs, April 24, 2014, 01:38:04 PM

Previous topic - Next topic

Ruubs

I felt like we should make a topic for this, since in the other topic everyone is talking about something different.

----

I've a problem with mapview. When I have 5 texture layers it works fine, nothing is wrong, but when I add my 6th one I get the error: Mapview has stopped working. I don't know if there's a limit on how many textures you can have, or if I did something wrong, but I'd love to know this.
Here is the last line of codes I put in the track.hmf file:

layer5
{
map = whitelines.tga
repetitions = 50
mask = whitelines_mask.tga
}


Yes I changed the num_layers to 6. Yes I have the whitelines.tga in the same folder as the track.hmf. Yes I made the mask exactly the same as the other so it should work. Yes it has both in the track.hmf a repetition of 50 and in the whitelines.shd.

PiBoSo


It should work.
Please make sure that all textures are power of 2.

Ruubs

Quote from: PiBoSo on April 24, 2014, 03:02:31 PM

It should work.
Please make sure that all textures are power of 2.
Power of 2? You mean a size of like 1024, 2048 etc.?
I have that, and it doesn't work. I can upload my .hmf and textures if you want?

MotoX745

could someone fill me in on how to add objects to the tracks, ive been in tracked trying to get a obj in but it never shows up when i try to go to the folder where it is to create it

Ruubs

How to add track objects.

Tools needed:
-A 3d model software which can export FBX files (3ds max, blender etc.)
-FBX2EDF.exe (You can find this in the track tools)
-Text editing program (Notepad, Notepad++ etc.)

I'm taking 3ds max as an example program here, everything what I do should be done the same in any other 3d model software, but you might need to hit different buttons.

Getting started.
-Open a new scene and add a plane with 1000x1000 segments (if your pc can handle this, if not then just make the plane with less segments, keep in might to make it as much as posible though). The size and width should be exactly the same as in your .hmf file, so make sure that's alright (you might have to calculate the right sizes).
-Open the plane in Modify mode and add a displace modifier. Now choose your terrain in the bitmap slot. Make sure the strenght is the same as the max height in your .hmf file.
-Go into Hierarchie mode (http://gyazo.com/239efafafe105fb3e01a6db724f2ebea) and move the Pivot point to the bottom left corner of the plane. When you're done with this you should go back into the Create tab.
-Now you need to place the plane in the correct spot, therefore all the coordinates of the plane should be 0,0 (X, Y and Z axis).
-Now you can start adding your own objects to the track, be sure to scale them right and place them good. You should also make sure the object has a bottom face, so don't remove any faces on the bottom of your objects.
-Once you're done placing all the objects you should hide the plane, in 3ds max you can do this by selecting the plane and click 'Hide selection'. Once it's hided you should hit ctrl+A on your keyboard, go to file, export, export as and save it as an FBX file. Make sure in the export information panel you set the Units (advanced options, units) to Meters.
-You now have an FBX file of your objects, but you need an EDF file to get it in Mx-Bikes. Open the program FBX2EDF.exe, load the FBX file you just made, click save and chose the directory of your track folder where you want the objects to appear on, also give the file a name and click save. You HAVEN'T saved the actual EDF file yet, you first need to click on OK and wait for the CMD to finish (it'll say NOTE:: Ending log when it's done). That's how you make your EDF file, now we should get it to work.
-Open your .hmf file in any text editing program and go to the bottom of the script. This is an example of what you should add here.

scene0
{
name = scene0.edf
pos
{
x = 0
y = 0
z = 0
}
rot
{
x = 0
y = 0
z = 0
}
}

Make sure the name of your EDF file matches the name you give it in the .hmf file, otherwise it won't work. If you do not touch any of the positioning/rotation settings in the .hmf file it should all appear in the right spot on the track.

Sorry if I forgot anything, and sorry if my English sucks. I wanted to do this real quick before going to bed.

MotoX745

would this be possible to do in blender, or is it required to be done with 3ds max. I know how to use both just curious if ti would be  possible to do in blender.

nevermind just saw the programs listed...

bearded4glory

I am trying to get shaders setup on some objects just to figure out how to do it.  I have setup a test.shd for test.tga and test_norm.tga with the following:
bump
{
map = test_norm.tga
}

specular
{
shininess = 10


Cant seem to get it working.  All the textures are coming from the same directory (the track folder) and are setup just like my ground shaders that are working.  Anyone know where I am going wrong?

MotoX745

went through with those steps exactly as you said and not sure if i got the calculations wrong or what. I made a plane and set the dimensions to 1025x1025 and not sure about the height part? just set it to 14 and it didnt look tall enough so not sure what to do for that, but still not getting objects in game.

bearded4glory

Quote from: MotoX745 on April 25, 2014, 08:17:46 AM
went through with those steps exactly as you said and not sure if i got the calculations wrong or what. I made a plane and set the dimensions to 1025x1025 and not sure about the height part? just set it to 14 and it didnt look tall enough so not sure what to do for that, but still not getting objects in game.

Length and width should be whatever is set in the .hmf as well as height.  1000 is the segments (this is the highest max will go without converting to editable poly and cutting it manually).  Make sure your units are set properly.

MotoX745

i know thats what i had the plane set to and in the displace i had the scale or the strength set to 14

Ruubs

Quote from: MotoX745 on April 25, 2014, 09:39:46 AM
i know thats what i had the plane set to and in the displace i had the scale or the strength set to 14
Are you sure you selected Meters as units in 3ds max, it might be in CM or inches or something.

MotoX745

i did in exporting, and i tried setting the units to meters in the actual units panel as well before exporting and tried exporting again but when i just hide the plane it still exports it out and it comes out like 50 mb's and if i delete the plane and just export the toughblocks then the toughblocks don't show up on the map when i go in to view them. unless i have to regenerate the map and trh files again?

PiBoSo

Quote from: bearded4glory on April 25, 2014, 12:31:05 AM
I am trying to get shaders setup on some objects just to figure out how to do it.  I have setup a test.shd for test.tga and test_norm.tga with the following:
bump
{
map = test_norm.tga
}

specular
{
shininess = 10


Cant seem to get it working.  All the textures are coming from the same directory (the track folder) and are setup just like my ground shaders that are working.  Anyone know where I am going wrong?

The closing bracket is missing.

bearded4glory

April 25, 2014, 06:42:46 PM #13 Last Edit: April 25, 2014, 08:53:19 PM by bearded4glory
Quote from: PiBoSo on April 25, 2014, 01:58:27 PM
Quote from: bearded4glory on April 25, 2014, 12:31:05 AM
I am trying to get shaders setup on some objects just to figure out how to do it.  I have setup a test.shd for test.tga and test_norm.tga with the following:
bump
{
map = test_norm.tga
}

specular
{
shininess = 10


Cant seem to get it working.  All the textures are coming from the same directory (the track folder) and are setup just like my ground shaders that are working.  Anyone know where I am going wrong?

The closing bracket is missing.

I noticed that when I reread my post, haven't had a chance to check to see if it is actually that way or if I just messed up when I copied it to paste here.  Hopefully that is it.  Thanks for the reply.

ETA:Yea, I just checked and the bracket is correct in the actual file but I do not get any norm/spec on the object when it comes into the mapviewer.  I was missing the params.ini causing me to have no shadows (thought that might be the problem as well) but I fixed that and added a new object with norm and SHD and still cant get it working.  What am I missing?

MotoX745


i found my objects but they are off the map. its confusing me because i set it up how sandbiter explained

also the pivot point is at the bottom left of the plane.