Author Topic: [Sort of Solved] Packaging a Ramp Brick  (Read 1137 times)

So today, I've been teaching myself how to code ramp bricks (With the help of Space Guy's Brick Reference.) I was able to understand most of how the ramp.blb files work, but I can't seem to get any collision with the ramp. There is also some texture stretching that I don't know how to help.



Here's a shot of my ramp brick...





And here is the code for the .blb... (skipping the excessively long brick grid part that has nothing to do with my errors.)
Code: [Select]
1 2 24
SPECIAL

0
COVERAGE: //TBNESW
1 : 1
1 : 2
0 : 34
0 : 68
1 : 34
0 : 68
----------------top quads:
1

TEX:TOP
POSITION:
-0.5    -1    12
-0.5    0    12
0.5    0    12
0.5    -1    12
UV COORDS:
0 0
0 1
-1 1
-1 0
NORMALS:
0 0 1
0 0 1
0 0 1
0 0 1
----------------bottom quads:
4

TEX:BOTTOMEDGE
POSITION:
-0.5    -1    -12
0.5    -1    -12
0.0    -0.5    -12
0.0    -0.5    -12
UV COORDS:
0.5 0
1.5 0
1 0.5
1 0.5
NORMALS:
0 0 -1
0 0 -1
0 0 -1
0 0 -1

TEX:BOTTOMEDGE
POSITION:
0.0    0.5    -12
0.0    0.5    -12
0.5    1    -12
-0.5    1    -12
UV COORDS:
1 0.5
1 0.5
1.5 0
0.5 0
NORMALS:
0 0 -1
0 0 -1
0 0 -1
0 0 -1

TEX:BOTTOMEDGE
POSITION:
-0    -0.5    -12
-0    0.5    -12
-0.5    1    -12
-0.5    -1    -12
UV COORDS:
0 0.5
1 0.5
1.5 0
-0.5 0
NORMALS:
0 0 -1
0 0 -1
0 0 -1
0 0 -1

TEX:BOTTOMEDGE
POSITION:
0.5    -1    -12
0.5    1    -12
0    0.5    -12
0    -0.5    -12
UV COORDS:
-0.5 0
1.5 0
1 0.5
0 0.5
NORMALS:
0 0 -1
0 0 -1
0 0 -1
0 0 -1
----------------north quads:
1

TEX:SIDE
POSITION:
-0.5    1    -11.333
-0.5    1    -12
0.5    1    -12
0.5    1    -11.333
UV COORDS:
1.02 -0.09
1.02 1.09
-0.02 1.09
-0.02 -0.09
NORMALS:
0 1 0
0 1 0
0 1 0
0 1 0
----------------east quads:
2

TEX:SIDE
POSITION:
0.5    -1    -11.333
0.5    1    -11.333
0.5    1    -12
0.5    -1    -12
UV COORDS:
0 0.833
1 0.833
1 1.006
0 1.006
NORMALS:
1 0 0
1 0 0
1 0 0
1 0 0

TEX:SIDE
POSITION:
0.5    -1    -11.333
0.5    -1    12
0.5    0    12
0.5    1    -11.333
UV COORDS:
0 0.833
0 -0.017
1 -0.017
1 0.833
NORMALS:
1 0 0
1 0 0
1 0 0
1 0 0
----------------south quads:
1

TEX:SIDE
POSITION:
0.5    -1    12
0.5    -1    -12
-0.5    -1    -12
-0.5    -1    12
UV COORDS:
1.02 -0.01302
1.02 1.01302
-0.02 1.01302
-0.02 -0.01302
NORMALS:
0 -1 0
0 -1 0
0 -1 0
0 -1 0
----------------west quads:
2

TEX:SIDE
POSITION:
-0.5    -1    -12
-0.5    1    -12
-0.5    1    -11.333
-0.5    -1    -11.333
UV COORDS:
1 1.006
0 1.006
0 0.833
1 0.833
NORMALS:
-1 0 0
-1 0 0
-1 0 0
-1 0 0

TEX:SIDE
POSITION:
-0.5    0    12
-0.5    -1    12
-0.5    -1    -11.333
-0.5    1    -11.333
UV COORDS:
0 -0.017
1 -0.017
1 0.833
0 0.833
NORMALS:
-1 0 0
-1 0 0
-1 0 0
-1 0 0
----------------omni quads:
1

TEX:RAMP
POSITION:
-0.5    0    12
-0.5    1    -11.333
0.5    1    -11.333
0.5    0    12
UV COORDS:
0 0
1.368 0
1.368 1
0 1
NORMALS:
0 0.707107 0.707107
0 0.707107 0.707107
0 0.707107 0.707107
0 0.707107 0.707107

Can anyone help me fix the texture stretching as well as clean up any other flawed bits of code here? Thanks.

-EpicFrySauce
« Last Edit: November 26, 2011, 11:57:08 PM by EpicFrySauce »

I recall that abnormal collision meshes require a .dts shape for use as a collision mesh.
I'm also pretty sure there's not any way around the stretching issue, you see that on some other large bricks.

I recall that abnormal collision meshes require a .dts shape for use as a collision mesh.
I'm also pretty sure there's not any way around the stretching issue, you see that on some other large bricks.
No, there is. You just need to muck around with the UV coords.

I recall that abnormal collision meshes require a .dts shape for use as a collision mesh.

I'm very familiar with a 3D modelling software called blender, and  blender has a .dts exporter, so I've been messing with that the last few hours. Thank you.

You just need to muck around with the UV coords.

I Guess I just need to experiment more with the .blb then... sigh...

I Guess I just need to experiment more with the .blb then... sigh...
No amount of experimenting will help you understand UV coords. They drive me insane. It's really hard to explain how they work (and most programs do them automatically) so there's not really that much information on them. Basically, its saying how to stretch the textures, or repeat them, etc.

No amount of experimenting will help you understand UV coords. They drive me insane.

Okay but I'm still going to attempt to mess with it... but assuming a fail, it's not like the stretching is really that bad. I can live with it. On a second note about .dts collision, I haven't found any documentation of how to create collision for bricks in blender or milkshape. I know the objects in my 3D scene need to be specific names for the game to recognize it, and I know the collision bounds must only have four vertexes, but I can't seems to get anything when I load up the .dts into the game.

Anyone know how to get a .dts collision file working for ramp collision? Or for that matter, how to package it in a 3D program?

ah a 10x ramp. I always wanted someone to make that
maybe siba could help you?
or Zack0

ah a 10x ramp. I always wanted someone to make that
maybe siba could help you?
or Zack0

Space Guy seems to have a good grasp on how to make custom ramps. He's even made his own brick pack before. Think he would help me out?

Anyone know how to get a .dts collision file working for ramp collision? Or for that matter, how to package it in a 3D program?
I've found this tutorial helpful. Collision is discussed primarily in section 4 (vehicles).

I've found this tutorial helpful. Collision is discussed primarily in section 4 (vehicles).

Yes, I've successfully followed that tutorial before. (Excellent tutorial, by the way) I have also tried this tutorial as well but I just can't seem to get any collision. I have no real suspects as to why it won't work... perhaps I should try Milkshape.

No amount of experimenting will help you understand UV coords. They drive me insane. It's really hard to explain how they work (and most programs do them automatically) so there's not really that much information on them. Basically, its saying how to stretch the textures, or repeat them, etc.

Textures=fixed. Let's just say I stole some code from the 5X height ramps... and the stretching is so minimal, it's basically unnoticeable. :D I also am temporarily borrowing the a 5X height ramp .dts file for collision... so I can at least re-paint the brick in the game. For the custom map I'm building, that's all I really need it for anyways.
« Last Edit: November 24, 2011, 06:48:51 PM by EpicFrySauce »