The insanely simple blender tutorial for Lugaru modders

The place to discuss all things Lugaru.

Do you want a YouTube video tutorial with voice over?

Yes
44
96%
No
2
4%
 
Total votes: 46

Funkdude
Posts: 43
Joined: Sun Sep 09, 2007 3:03 am

Post by Funkdude » Tue May 27, 2008 9:51 am

Cool! thats a neat mace you made :D

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

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Post by rudel_ic » Wed May 28, 2008 3:57 am

I hate my fucking piece of shit life
Last edited by rudel_ic on Sun Feb 22, 2009 3:27 pm, edited 1 time in total.

User avatar
Chainsaw man
Posts: 1492
Joined: Mon Mar 17, 2008 6:13 am
Location: New Zealand

Post by Chainsaw man » Wed May 28, 2008 7:56 pm

Since I dont know the first thing about creating 3D things...
do you think you could make me a Chainsaw?

User avatar
Makrond
Posts: 498
Joined: Mon Jun 25, 2007 11:34 pm

Post by Makrond » Wed May 28, 2008 10:30 pm

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.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Post by rudel_ic » Thu May 29, 2008 2:52 am

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.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Post by rudel_ic » Thu May 29, 2008 10:12 am

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.

User avatar
Makrond
Posts: 498
Joined: Mon Jun 25, 2007 11:34 pm

Post by Makrond » Fri May 30, 2008 3:42 am

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...

User avatar
BunnyWithStick
Gramps, Jr.
Posts: 4297
Joined: Mon Dec 05, 2005 12:14 am
Location: New Zealand

Post by BunnyWithStick » Fri May 30, 2008 4:58 am

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.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Post by rudel_ic » Fri May 30, 2008 5:10 am

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.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Post by rudel_ic » Fri May 30, 2008 5:24 am

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.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Post by rudel_ic » Fri May 30, 2008 6:21 am

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.

User avatar
Makrond
Posts: 498
Joined: Mon Jun 25, 2007 11:34 pm

Post by Makrond » Fri May 30, 2008 7:50 pm

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.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Post by rudel_ic » Sat May 31, 2008 4:29 am

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.

User avatar
rudel_ic
official Wolfire heckler
Posts: 2193
Joined: Sun Aug 28, 2005 11:19 pm
Location: Hamburg City
Contact:

Post by rudel_ic » Sat May 31, 2008 8:05 am

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.

User avatar
Makrond
Posts: 498
Joined: Mon Jun 25, 2007 11:34 pm

Post by Makrond » Sat May 31, 2008 8:44 pm

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...

Post Reply