[WEAPON] Ba Gua Dao

MishoM
Posts: 47
Joined: Tue Oct 30, 2012 2:19 am

[WEAPON] Ba Gua Dao

Post by MishoM » Mon Jan 21, 2013 6:15 am

Hi,

I'm making a weapon for Overgrowth in Blender. This is actually my first 3D model ever. Here is a preview:

Image

I've still got to add textures and to actually get it into the game. As I have very little time, this might take me one or two weeks, but I just couldn't wait to share it :)

Also, some pointers that would help me make it look the same in the game as in Blender will be extremely welcome.

UPDATE: The weapon is ready. Well, it still needs custom animations, but this will happen much later. I've attached the data in a .zip file.

Also, here is the weapon in-game:
Attachments
BaGuaDao.zip
(489.68 KiB) Downloaded 170 times
Last edited by MishoM on Sat Feb 16, 2013 6:16 am, edited 1 time in total.

MishoM
Posts: 47
Joined: Tue Oct 30, 2012 2:19 am

Re: [WEAPON] Ba Gua Dao

Post by MishoM » Mon Jan 21, 2013 6:48 am

Also, to get some idea of what the real-life weapon looks like and how it is used, here is a video on youtube:


User avatar
SteelRaven7
Posts: 681
Joined: Sat Sep 26, 2009 2:02 pm
Location: Sweden

Re: [WEAPON] Ba Gua Dao

Post by SteelRaven7 » Mon Jan 21, 2013 7:26 am

That weapon is looking pretty smooth and cool. Now to add some texture, you'll probably want to have a look at UV mapping: http://en.wikibooks.org/wiki/Blender_3D ... Map_Basics

Furhtermore, you should generate an object-space normal map which sounds really fancy but it really isn't :), I haven't done this with blender but I reckon someone here on the forum might know how it's done. You can always use a blank normal map like the one in "Overgrowth\Data\Custom\Korban3\blank_normal.tga" which should be there if you've installed the menu mod.

MishoM
Posts: 47
Joined: Tue Oct 30, 2012 2:19 am

Re: [WEAPON] Ba Gua Dao

Post by MishoM » Mon Jan 21, 2013 7:34 am

SteelRaven7 wrote:That weapon is looking pretty smooth and cool. Now to add some texture, you'll probably want to have a look at UV mapping: http://en.wikibooks.org/wiki/Blender_3D ... Map_Basics

Furhtermore, you should generate an object-space normal map which sounds really fancy but it really isn't :), I haven't done this with blender but I reckon someone here on the forum might know how it's done. You can always use a blank normal map like the one in "Overgrowth\Data\Custom\Korban3\blank_normal.tga" which should be there if you've installed the menu mod.
Thanks for the pointers. I know about UV mapping and normal maps. There's a lot of Blender tutorials on the net, so I don't want to waste people's time with such basic noob questions :).

What I was really asking is, how should I export the model, so that it looks good in the game engine?

User avatar
Endoperez
Posts: 5668
Joined: Sun Jan 11, 2009 4:41 am
Location: cold and dark and lovely Finland

Re: [WEAPON] Ba Gua Dao

Post by Endoperez » Mon Jan 21, 2013 8:21 am

Awesome, that's a great first model.

Can't post more now, but you export it as OBJ and write some XML files. Image files can be PNG.

MishoM
Posts: 47
Joined: Tue Oct 30, 2012 2:19 am

Re: [WEAPON] Ba Gua Dao

Post by MishoM » Mon Jan 21, 2013 8:27 am

Endoperez wrote:Awesome, that's a great first model.

Can't post more now, but you export it as OBJ and write some XML files. Image files can be PNG.
What worries me, is that I exported it to .obj and opened it into an external 3D model viewer, and the model was very dark and the colors looked off. So I was concerned about the way materials are exported. Then again, it might be a problem of this specific viewer (G3DViewer - I'm using Linux).

User avatar
Anton
pretty cool guy
Posts: 3328
Joined: Fri Oct 17, 2008 8:16 pm
Location: Los Angeles
Contact:

Re: [WEAPON] Ba Gua Dao

Post by Anton » Mon Jan 21, 2013 8:48 am

I'm excited to see this weapon in game! I use a dao as part of my kung fu training in real life (although, not a bagua dao, which looks to be significantly longer) and I am curious how it will play in the final game. Can't wait to see some custom animations for this! :)

User avatar
last
Posts: 2154
Joined: Fri Jan 07, 2011 4:02 am
Location: Estonia

Re: [WEAPON] Ba Gua Dao

Post by last » Mon Jan 21, 2013 11:44 am

The game don't use material files like Blender. It uses textures, normalmap and shader. So there isn't much else to do to make a really nice normalsmap and texture for it.

User avatar
Endoperez
Posts: 5668
Joined: Sun Jan 11, 2009 4:41 am
Location: cold and dark and lovely Finland

Re: [WEAPON] Ba Gua Dao

Post by Endoperez » Mon Jan 21, 2013 1:26 pm

When you export an OBJ file, you don't get the actual textures (usually). Overgrowth also doesn't even bother to look at the .mtl (material) file that's created with the OBJ export. For Overgrowth, what you should do is to put all the relevant information into image files, and then use those images as textures inside Overgrowth.


This is going to be a huge wall of text, but this isn't that complicated, really. You only need one OBJ file, two images Blender can make for you, and then you need to edit three lines in one text file - that's all it takes to get an object into Overgrowth. To use it as a weapon, you need to edit a second text file, but for that you only need to edit ONE line in a text file.

I'll start with te text file. It's an XML file, and it looks like this:

Code: Select all

<?xml version="1.0" ?>
<Object>

<Model>Data/Custom/Endoperez/Models/mymodel.obj</Model>
<ColorMap>Data/Custom/Endoperez/Textures/mycolormap.tga</ColorMap>
<NormalMap>Data/Custom/Endoperez/Textures/mynormalmap.png</NormalMap>
<ShaderName>cubemapobjitem</ShaderName>

</Object>
You only need to change the Model, ColorMap and NormalMap lines.

Model is model, duh.

The second one, ColorMap, controls the colors and the shininess. Colors are simply the colors, shininess is read from the Alpha channel, which is usually used for transparency. You can ignore the alpha channel/shininess stuff for now. You sword will be shiny inside OG, but it simplifies things a lot.
[+] Shininess stuff
You'll probably need an image editing software to combine color and shininess (= specularity) into one image with RGB and A channels. It's possible to do it through Blender nodes too if you don't have an image editor.
Also, due to game engine limitations, only Specular Intensity is used, Specular Color and Specular Hardness aren't used; specular color is calculated from the sky and hardness (or something close to it) only uses one specific value for most objects. I don't know which Hardness value matches what's used inside Overgrowth, so try something like 50. It might be 100, but I'm not certain, and 50 is a more neutral value.
The third one, Normalmap, is used to calculate advanced light information. At its simplest, it creates an effect that's similar to enabling Shading: Smooth (as opposed to Shading: Flat) in Blender. It can also do other stuff.

Blender can take the information you have in the scene and put it into image files for you. This is called Texture Baking, or Baking.

You can Bake textures and normals maps into an image file.
You need to have an object selected, it has to be unwrapped, and it has to have an (empty or new, preferably) image file assigned to it in the UV window.
Then, on the same panel where you have the Render button, scroll down until you find Bake panel. Choose Textures from the dropdown menu and press the big Bake button.
However, you only see the result in the screen where you edit your UVs. To see what you're doing, it's best to go into UV Editing layout, and divide the 3D screen into two parts. Then you change one of those parts into the Properties window. If you haven't done that before, check the dark red parts of this little tutorial image:
Blender_TextureBaking_Tutorial.png

MishoM
Posts: 47
Joined: Tue Oct 30, 2012 2:19 am

Re: [WEAPON] Ba Gua Dao

Post by MishoM » Mon Jan 21, 2013 11:22 pm

@Endoperez: Wow, thank you, that's everything I needed to know.

User avatar
Endoperez
Posts: 5668
Joined: Sun Jan 11, 2009 4:41 am
Location: cold and dark and lovely Finland

Re: [WEAPON] Ba Gua Dao

Post by Endoperez » Mon Jan 21, 2013 11:41 pm

No problem.

Maybe I should write up a proper tutorial? I think I've written more or less the same thing several times now. :lol:

User avatar
SteelRaven7
Posts: 681
Joined: Sat Sep 26, 2009 2:02 pm
Location: Sweden

Re: [WEAPON] Ba Gua Dao

Post by SteelRaven7 » Tue Jan 22, 2013 4:00 am

Endoperez wrote:Maybe I should write up a proper tutorial? I think I've written more or less the same thing several times now. :lol:
Yeah, I think people would find that very helpful.

User avatar
Semel
Posts: 31
Joined: Fri Jun 01, 2012 8:58 am
Location: Wales

Re: [WEAPON] Ba Gua Dao

Post by Semel » Tue Jan 22, 2013 5:03 am

Cool weapon!

I have been creating weapons in Blender on Linux, but although I have tried using GIMP to mess around with the alpha channel, the version of GIMP on Ubuntu 12.04 LTS is 2.6 which doesn't support either .dds files or editing channels!

So I resorted to using Blender's composition Nodes to combine the Mirror intensity UV bake with the texture UV bake to give me the correct regions of black and white for the alpha channel, see the image below:
Blender Texture Nodes
Blender Texture Nodes
I have also used the normalised Ambient Occlusion bake to add some dirt to the finished texture, this is optional.

Semel.

MishoM
Posts: 47
Joined: Tue Oct 30, 2012 2:19 am

Re: [WEAPON] Ba Gua Dao

Post by MishoM » Tue Jan 22, 2013 11:19 am

@Semel: Thanks for the pointer. I thought I could leave nodes for later, but it seems that if I want to make this weapon good enough I'll have to look into them next. Of course, I could just duplicate your setup, but I try to know what I'm doing - at least most of the time ;)

You're all being very helpful :)

User avatar
Semel
Posts: 31
Joined: Fri Jun 01, 2012 8:58 am
Location: Wales

Re: [WEAPON] Ba Gua Dao

Post by Semel » Wed Jan 23, 2013 4:59 am

@MishoM: feel free to use my nodes setup, it could probably be streamlined to use less nodes, but this works for me. :)

I have developed a work flow for creating weapons in Blender but I'm finding it a little tricky finding a good way of documenting it so I can share it with the community :?

Post Reply