Page 2 of 7

Posted: Tue May 27, 2008 9:51 am
by Funkdude
Cool! thats a neat mace you made :D

(if you ever need a texture for it mail me :wink: )

Posted: Wed May 28, 2008 3:57 am
by rudel_ic
I hate my fucking piece of shit life

Posted: Wed May 28, 2008 7:56 pm
by Chainsaw man
Since I dont know the first thing about creating 3D things...
do you think you could make me a Chainsaw?

Posted: Wed May 28, 2008 10:30 pm
by Makrond
OMFG... I'm absolutely amazed with the progess you've made. Well done.

Wait, I'm a little confused... can you have irregular quads or not?

I'll post up if I can get my sword working in Lugaru.

Posted: Thu May 29, 2008 2:52 am
by rudel_ic
Chainsaw man wrote:Since I dont know the first thing about creating 3D things...
do you think you could make me a Chainsaw?
I think I could. But I won't post something that detailed without fixed texture mapping, sorry.
Makrond wrote: Wait, I'm a little confused... can you have irregular quads or not?
Yes.

I think there's a little confusion here: Quads are faces with 4 vertices. Cubes are die-shaped closed meshes.

You can have irregular quads, cubes, triangles and a lot of other meshes.

The restriction lies in the structure of meshes. For example, cones wouldn't work, neither would icospheres. But with a little ingenuity, you can build working alternatives.

Posted: Thu May 29, 2008 10:12 am
by rudel_ic
Okay, as of v0.2 of the X2Solid tool, texture mapping works. There are some quirks to it though.

Look:
Image

In a nutshell, the UVMap picture you use in blender needs to be mirrored vertically for Lugaru. Blender has an inverted Y-Axis for UV maps, that's why. I was too lazy to write code that deals with that, it's not really a problem though.

Have fun!

Oh, the 1:1 size for objects is 0.6666, just in case you wondered. At that size, the UV map is correct. At least for cubes.

Posted: Fri May 30, 2008 3:42 am
by Makrond
Why don't cones and icospheres work? They're essentially made of triangles, right?

No sword yet... not sure where the problem is though... it's made entirely of triangles...

Posted: Fri May 30, 2008 4:58 am
by BunnyWithStick
Makrond wrote:Why don't cones and icospheres work? They're essentially made of triangles, right?
I think you just answered your own question. From what I've gathered it doesn't seem to work very well with anything other than a bunch of squares made of two triangles. Or something like that.

Posted: Fri May 30, 2008 5:10 am
by rudel_ic
Makrond wrote:Why don't cones and icospheres work? They're essentially made of triangles, right?

No sword yet... not sure where the problem is though... it's made entirely of triangles...
I don't know why, that's just how it is...

Okay, I'll give you an example of how to make a sword.

Cubes are represented here with an O, the one at (0,0,0) with an X. The (0,0,0) one has to contain (0,0,0).

You start with a cube at (0,0,0) that's made of quads, NOT of triangles:

Code: Select all

X
And you extrude the cube's faces bit by bit:

Code: Select all

X
O

Code: Select all

O
X
O

Code: Select all

OOO
 X
 O

Code: Select all

 O
 O
 O
 O
 O
OOO
 X
 O
So what you do is always just extrude quads.
You can of course translate vertices, rotate faces and whatever, as I said.

When you're done, you convert all quads to triangles, do UV mapping, flip the normals, scale the model up (and apply rotations and scaling), export to .x, mirror your texture vertically, convert the .x to .solid, replace the Sword model and the Sword texture. That should work.

Edit: Forgot a few steps.
Edit: Terminology.

Posted: Fri May 30, 2008 5:24 am
by rudel_ic
Also, does Lugaru crash with your .solid or is it just invisible? If it's invisible, you either forgot to scale it up or you haven't flipped the normals (or both).

I'd advise you to start with really simple meshes and save them before you triangulate. That helps a lot. So you get a simple mesh working in-game and iterate on it, you know? Instead of making a crazy 1000poly katana for 1 hour just to find out it makes the game crash.

Posted: Fri May 30, 2008 6:21 am
by rudel_ic
Okay, here is a sword manufacturing tutorial in video form. This is the first take, so it's a little undecided and the mesh is a steaming pile of shit, but you get the idea.

http://rapidshare.com/files/118795232/swordex.avi.html

Edit: Also, I didn't put the handle to (0,0,0), which turned out to be a bad idea.

Posted: Fri May 30, 2008 7:50 pm
by Makrond
rudel_ic wrote:Also, does Lugaru crash with your .solid or is it just invisible?
Nope, it crashes when I try to start a level. I'll try it your way and see what I can get.

EDIT: Nope, still crashes. I'm confused.

Posted: Sat May 31, 2008 4:29 am
by rudel_ic
You're on a PPC, right?
I've got no time right now, but I'll upload a .solid later that you can try out. If it works just fine, we know it's not endianness.

Posted: Sat May 31, 2008 8:05 am
by rudel_ic
So here's the CrazySword, a mesh for you to test. It's just for testing purposes, so don't mind the bad texture.

Screenshot:
Image

ZIP comment:

Code: Select all

CrazySword for Lugaru, a test mesh by rudel_ic 08-05-31

Copy
CrazySword.solid to Lugaru/Data/Models
CrazySword.jpg to Lugaru/Data/Textures
CrazySwordblood.jpg to Lugaru/Data/Textures
CrazySwordbloodlight.jpg to Lugaru/Data/Textures

Backup
Sword.solid in Lugaru/Data/Models
Sword.jpg in Lugaru/Data/Textures
Swordblood.jpg in Lugaru/Data/Textures
Swordbloodlight.jpg in Lugaru/Data/Textures

Rename
CrazySword.solid in Lugaru/Data/Models to Sword.solid
CrazySword.jpg in Lugaru/Data/Textures to Sword.jpg
CrazySwordblood.jpg in Lugaru/Data/Textures to Swordblood.jpg
CrazySwordbloodlight.jpg in Lugaru/Data/Textures to Swordbloodlight.jpg

And then slash em with the CrazySword!
Get CrazySword.zip at http://lugaruspace.50megs.com/models and follow the above instructions. Please report whether it works for you.

Posted: Sat May 31, 2008 8:44 pm
by Makrond
Odd... that works.

I have an interesting question: does the .x exporter triangulate meshes before export? Because if not that may be the problem...

EDIT: Huh... nope, that's not it...

I don't get it... it's made entirely of triangulated quads - even the point at the tip is a very small quad...

Awesome, found a free file hosting site...

Here is the .blend... maybe you can tell me where I went wrong...