Author Topic: i need help fixing some bricks ASAP [FIXED]  (Read 1112 times)

so these new bricks i just made.

65 degree inverted corner ramp


80 degree inverted corner ramp


72 degree inverted corner


well i am having trouble with the textures and the collision.
first off, all the omni quads have stretched ramp textures and im not quite sure how to fix this.
also the side faces have stretched textures as well



(it may not look like it but those ones are stretched too)

and second the bricks don't have any collision at all, like i cant even break them with a hammer are paint them, which i dont know how to fix either.
this is my first attempt at making bricks so that's why i don't know how to fix any of this stuff.
« Last Edit: March 05, 2014, 09:49:06 PM by GhostStar »

For the collision.

Since these bricks are ramps and need collision other than cuboid, you need to make a .dts model in the shape of the brick for it to have collision, then define collisionShapeName in the datablock. collisionShapeName should be set to a file path.

For the collision.

Since these bricks are ramps and need collision other than cuboid, you need to make a .dts model in the shape of the brick for it to have collision, then define collisionShapeName in the datablock. collisionShapeName should be set to a file path.
hmm. would it be possible to just make its collision using script? like just having its collision be a cube instead?
because i dont have blender anymore and i haven't used it in like two years. so i would really like to avoid having to use it.
« Last Edit: March 01, 2014, 10:29:06 PM by GhostStar »

Right now your UVs for the ramp texture are probably something like this:
Code: [Select]
0 0
1 0
1 1
0 1

Change them to something like this:
Code: [Select]
0 0
0 1
1 2
0 2

This makes the UVs twice as tall thus repeating the ramp texture twice reducing stretching. In case you don't know the UV coords are X Y with 0 0 being the top left corner. The order of the number pairs depends on your brick and the vertex order so if that doesn't work try one of these:
Code: [Select]
0 2
0 0
0 1
1 2

1 2
0 2
0 0
0 1

0 1
1 2
0 2
0 0

hmm. would it be possible to just make its collision using script? like just having its collision be a cube instead?
because i dont have blender anymore and i haven't used it in like two years. so i would really like to avoid having to use it.
It's possible to make up to 10 squares of collision via script. But it really lowers the quality of your brick if it's a ramp with cuboid collision.

hmm. would it be possible to just make its collision using script? like just having its collision be a cube instead?
because i dont have blender anymore and i haven't used it in like two years. so i would really like to avoid having to use it.
Ramps don't have cubic collision. Simply no.

Ok, well I guess I will just suck it up and make the dts files. Thanks demian. I will try that later today.
so duplicating the texture would work for the 65 degree brick. Would that mean I would have to triplicate the texture for the 72 degree? And well... pentricate? The texture for the 80 degree?
ok, I cant do thedts models cos my parents wont let me instal blender on our home pc (my pc broke a few weeks ago) so I would need someone else to make the blender models.

so i tried your UV cords demian but none of them worked. i just got stretched textures and what appeared to be overlapping UV (Z effect if i remember right). well here is the code for the Omni quads on the 2x2x3 inverted corner ramp.

Code: [Select]
----------------omni quads:
2
//east-west section
TEX:RAMP
POSITION:
1 0 4.5
1 -1 -3.833
1 -1 -3.833
0 0 4.5
UV COORDS:
0 2
1.368 2
1.368 2
0 1
NORMALS:
0 -0.707107 0.707107
0 -0.707107 0.707107
0 -0.707107 0.707107
0 -0.707107 0.707107
//north-south section
TEX:RAMP
POSITION:
0  0  4.5
1  -1 -3.833
1 -1 -3.833
0 -1  4.5
UV COORDS:
0 1
1.368 0
1.368 0
0 0
NORMALS:
0.707107 0 0.707107
0.707107 0 0.707107
0.707107 0 0.707107
0.707107 0 0.707107



ok i have fixed the UV coords for the omni quads on my own. i just need some help with the side textures.

ok,

now how do i fix this? the south North omni quad texture is too bright.
I'm guessing I just have to reverse the normals?
« Last Edit: March 03, 2014, 04:13:38 PM by GhostStar »

I don't think reversing the normals would help, that would just make the face visible from the other side.

You could try pulling out one of the the bottom points so you don't have two on the exact same spot.

So-
Code: [Select]
POSITION:
0  0  4.5
1  0 -3.833
1 -1 -3.833
0 -1  4.5

instead of
Code: [Select]
POSITION:
0  0  4.5
1  -1 -3.833
1 -1 -3.833
0 -1  4.5

If that doesn't work... I made a 65 degree one of these with the same issue.  I was going to try remaking it from a scratch, starting with the omni quads just to make sure they work.

K thanks. Ill try that in the morning