Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Guide] Custom Items - Blender tutorial

Newbie Spellweaver
Joined
Aug 31, 2012
Messages
72
Reaction score
26
Custom Items in Blender:

Note: If you know all the basics of making models in blender you can skip to part6 or part7
Note2: Images still have to be added and part8 still has to be made.

Why would you make weapon in blender instead of just using 3ds Max? The answer is simple.
Blender is 100% free for use and easy to use and learn. There are allot of tutorials on it also.

Video tutorial (no voice recorded)
[Comming Soon]

1. Requirements:
1.
2.
3.
4. or or

You should have all of these installed!

2. Instalation of plugins:
Export "ASE251" anywhere
Open blender
Go to 'file' and 'user preferences...'

This should open:
6T7BSA5 - [Guide] Custom Items - Blender tutorial - RaGEZONE Forums


Go to addons.
A list should appear..
In the bottom left there is a button: "Install from file...", Click it.
Browse for your exporter and click 'OK'

Now the plgin should show up in the list, click the checkmark.
and i would now prefer to click "Save as default"

3. Custom Items in Blender:

The first you will see on blender is: a camera, an object, and a lamp.
VGsj1dY - [Guide] Custom Items - Blender tutorial - RaGEZONE Forums

this is the standart layout.
to remove something right click on it.
press 'x' or 'delete' and click 'ok' or press 'back/enter' key.
do this with everything you see.
to rotate your view use your middlemouse (click).


At the left of your 3d (edit)section you will find your "object tools" bar. You will find some basic tools like duplicate (copy), scale, delete...


At the buttom you will find the "animation bar". We wont use it for movement! Just to change modes.


At the right you find the most important toolbar, more about that later.


These are some keys you may use allot:
E - Extrude
A - (De-)Select all
R - Rotate
G - Move
S - Scale
U - UV tools
B - Select Box
1 - Front view (crtl = invert)
3 - Side view (crtl = invert)
7 - Top view (crtl = invert)
5 - Change view to orthographic or perspective


4. into Modeling:

If you everything correct your 3d edit screen should be empty.
for to the top left of your screen. click "add" -> "Mesh" -> "Cylinder"


Now press 1 and than press 5
You should now see the object from front view in orthographic view.

ontop of the animation bar there is a button with "object view" and next to it a little sphere image.
click on "object mode" and change it into "Edit mode"
change the sphere into "wireframe"

zoom out a little bit by scrolling down

This is what you should see now:
xZVQM5k - [Guide] Custom Items - Blender tutorial - RaGEZONE Forums


press 'a' to select everything
press 'g', than press 'z', type -4
press 'a' to de-select all
press 'b' and select the top verts
press 'g', 'z' and type 7
press a to select everything again:
s (Scale) 0.8 (.8) and enter

this is a perfect handel

select the tops verts again and press 'e' (extrude) 'z' (if it isen't allready), type 36/37.
this is a good size for a blade.

select the top of you blade and 's' (scale) 'y', now you can eather 0 or 0.15. You will not see this change. Thats ok.

Press crtl+r, move your move over your blade side now.. a purple line should appear horizontaly.
click now. only one time, if you move your move the line will follow, move the line down close to the handel.

press 's' to scale the line you just made by .4 or .5.

Here is a view from the side:

The sword MODEL is done.
you could add more details but i wont do that in this tut..

5: Uv/Textures:

Ths is more important than the model.
if you have a nice texture and a bad model it may look 'ok' still.

5.1: How to add textures:

in the top corner of the 3d edit screen you see this:
zijzkhu - [Guide] Custom Items - Blender tutorial - RaGEZONE Forums

drag it to your model and a new window should show up.
in the animation bar you will find this:
B] - [Guide] Custom Items - Blender tutorial - RaGEZONE Forums

change it to "uv/image editor"

now we can get back to the first screen
Go into edit mode if you aren't yet, select all (a) the lines/verts(verts = dots you see).
press 1 and 5 again. just to make sure.
press u, this will open the "uv mapping" options.
In this case you can use: "unwrap from view"

something like this will appear in the second screen
bmA7nxb - [Guide] Custom Items - Blender tutorial - RaGEZONE Forums

Scale it. [must be selected all (a)]

Open your Image editor and make a file of max 512x512. remember that it must be a .bmp image.
And i would suggest to save it under the name of the weapon you edit. (For example itWS226.bmp)

Nooby:
You can collor it in anything you like.
Save the image somewhere.

_____
Nooby2:
Take an image from the internet.

_____
Advanced:
Go to the "UV/image editor" in blender and in the animation ba there should be an option named:
UVs, click on it and "Export UV layout"
save it

Go to your image editor and place it in the first layer, make a second layer and make a nice texture there.

Remove the first layer and save the image.
_____

Now go back to blender and into the "UV/Image editor" there should be a button in the animation bar: Image, click on it and "open" your image.
IF the grid you made before deformed you should fit it correct with your texture.

If you would change the "wireframe" to "textured" will the texture show up from the uv.

If this works your model is ALMOST ready to export!

6. Adding materials:

At the right bar in blender there are some 'special options' like: Modefiers, Materials, Textures and more.
We will just add a Material (and later on a texture for the inventory image).
Make sure you selected your model (ONLY your model, no lamps and/or cameras!)!

Go into the right material toolbar, there should be an icon like this:
Tuur - [Guide] Custom Items - Blender tutorial - RaGEZONE Forums

Just add one. Not edit it at all for now.

If you did everything good you can now export without any errors.

Now go to the last part for exporting and testing the weapon out in game.

7. Inventory images:

Comming Soon.

8. Exporting and Testing:

Select your model, go to the top left of blender.
Click file, Export, If you did everything right in the beginning there should be an option: "AscII Scene exporter" do that. now be carefull, the size of the weapon is good allready so in the export screen on the left button there are options.

Set them like this:
VvEHCG - [Guide] Custom Items - Blender tutorial - RaGEZONE Forums


If you think its ready for use, its not. got to the location you saved the .ASE and open it in notpad.
The first part will look like this, OR IT WILL BE SIMILAR:
*3DSMAX_ASCIIEXPORT 200
*COMMENT "Ascii Scene Exporter v2.51"
*SCENE {
*SCENE_FILENAME ""
*SCENE_FIRSTFRAME 0
*SCENE_LASTFRAME 100
*SCENE_FRAMESPEED 30
*SCENE_TICKSPERFxRAME 160
*SCENE_BACKGROUND_STATIC 0.0000 0.0000 0.0000
*SCENE_AMBIENT_STATIC 0.0000 0.0000 0.0000
}
*MATERIAL_LIST {
*MATERIAL_COUNT 1
*MATERIAL 0 {
*MATERIAL_NAME "Material"
*MATERIAL_CLASS "Standard"
*MATERIAL_AMBIENT 0.0000 0.0000 0.0000
*MATERIAL_DIFFUSE 0.8000 0.8000 0.8000
*MATERIAL_SPECULAR 1.0000 1.0000 1.0000
*MATERIAL_SHINE 0.0978
*MATERIAL_SHINESTRENGTH 0.5000
*MATERIAL_TRANSPARENCY 0.0000
*MATERIAL_WIRESIZE 1.0000
*MATERIAL_SHADING Cooktorr
*MATERIAL_XP_FALLOFF 0.0000
*MATERIAL_SELFILLUM 0.0000
*MATERIAL_FALLOFF In
*MATERIAL_XP_TYPE Filter
*MAP_DIFFUSE {
*MAP_NAME "default"
*MAP_CLASS "Bitmap"
*MAP_SUBNO 1
*MAP_AMOUNT 1.0000
*BITMAP "None"
*MAP_TYPE Screen
*UVW_U_OFFSET 0.0000
*UVW_V_OFFSET 0.0000
*UVW_U_TILING 1.0000
*UVW_V_TILING 1.0000
*UVW_ANGLE 0.0000
*UVW_BLUR 1.0000
*UVW_BLUR_OFFSET 0.0000
*UVW_NOUSE_AMT 1.0000
*UVW_NOISE_SIZE 1.0000
*UVW_NOISE_LEVEL 1
*UVW_NOISE_PHASE 0.0000
*BITMAP_FILTER Pyramidal
}
}
}
You must edit some LITTLE things.

First of all find the Material tab:
Code:
*MATERIAL_LIST {

In this tab there is something called:
Code:
*MAP_DIFFUSE {
The second line is this sub-tab (*MAP_DIFFUSE {) Must be *MAP_CLASS "Bitmap" , just to be sure you used a bmp file.
In the Fifth line is set to *BITMAP "None" atm. This is not what you want. Set it to where the .BMP texture is but include the name.
For example:
Code:
*BITMAP "C:\Textures\TutorialWeapon\itWS226.BMP"

Now you can save the .ASE you just edited.
Rename the file to the same you named your texture.
If your texture is named "itWS226.BMP" your .ASE (model) must be named itWS226.ASE
You can now put the files in the "image\Sinimage\Items\Dropitem" Folder. Replace the old files. (I recoment to save a backup)

Start the game and see how it works out. if you have any problems feel free to reply or PM me.


Credits go to ME for creating the full tut.
 

Attachments

You must be registered for see attachments list
Last edited:
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
A reply to this thread is often nicer because it can save the same question being asked and answered multiple times. :wink:

Thanks Tuur
 
Over rock and under tree
Joined
Jul 20, 2011
Messages
568
Reaction score
347
The texture can be BMP or TGA. And its name must be the same as the one inside the ase file (that line you mentioned), not the same name as the ase itself, you can put any name you want for your texture... And naming the item's texture like the original texture names can be unpractical, since you would have to delete the previous (original) one every time (the only file you would have to delete (or change name) indeed is the original SMD file), etc..


NUMSUBMTLS is the number of submaterials to an material (Multi-Sub material). If you make a sword with 3
submaterials, one for the handle, one for the guard and one for the blade, you would have NUMSUBMTLS=2
(the zero counts as 1).


The item drops at its position in scene.

The character holds the item by its pivot (axis).

Javelins flight position are related to its angle on the scene.

Polearms (itwp: item, weapon, polearm) have a slightly rotated axis.

Effected meshes become invisible by 'mixing' or 'aging', due to "conflict of effects".

A mesh with lots of submaterials will glow a whole lot less on blinking effects..

etc..
 
Last edited:
Newbie Spellweaver
Joined
Aug 31, 2012
Messages
72
Reaction score
26
NUMSUBMTLS was only a big problem to me.. so i did just remove it :)
 
Over rock and under tree
Joined
Jul 20, 2011
Messages
568
Reaction score
347
I know that there are a lot of ase exporters for Blender; in an 'ideal'(normal) situation, you would export the ase and run it on the game without having to edit anything on notepad.. Try to find and use the oldest ase exporter you can find to Blender, it will probably be easier..

If you would export it on 3dsmax, you could run it on the game right away, if you use an older/simpler exporter you would probably run the items ingame right away too (some newer ase exporters are aimed to specific purposes, etc..)..

Try exporting just the object (export just the selected object, etc..), it will probably ease some exporting problems too..
 
Newbie Spellweaver
Joined
Aug 31, 2012
Messages
72
Reaction score
26
Thats i've tryd first. Went back to an exporter for 2.45. though it didnt work at all. the plugin couldn't load up.. :thumbdown:

Edit1: I tell in the tut to export only the weapon itself.
Edit2: The tutorial is supposed to use only blender, otherwise it would be worthless xDDD
 
Last edited:
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
I know that there are 0 officially supported or integrated ASE exporters for Blender, and all of them are tuned to a specific purpose by private enthusiasts.

The plugins are usually Python code, and shipped in source form, so finding one which requires minimal notepad / grep work and then modifying it's .py to work better with PT, and releasing that here would actually be the ideal. ^_^
Code:
170        self.numSubMtls = len( material_list )
171        self.diffusemap = cDiffusemap( slot.texture_slots[0] )
172        if ( self.numSubMtls > 1 ):
173            self.matClass = 'Multi/Sub-Object'
174            self.diffuseDump = ''
175        else:
176            self.matClass = 'Standard'
177            self.numSubMtls = 0
178            self.diffuseDump = self.diffdump()
then
Code:
201        self.dump += '''\n\t\t*MATERIAL_NAME "{0}"\
202                       \n\t\t*MATERIAL_CLASS "{1}"\
203                       \n\t\t*MATERIAL_AMBIENT {2}\
204                       \n\t\t*MATERIAL_DIFFUSE {3}\
205                       \n\t\t*MATERIAL_SPECULAR {4}\
206                       \n\t\t*MATERIAL_SHINE {5}\
207                       \n\t\t*MATERIAL_SHINESTRENGTH {6}\
208                       \n\t\t*MATERIAL_TRANSPARENCY {7}\
209                       \n\t\t*MATERIAL_WIRESIZE {8}\
210                       \n\t\t*MATERIAL_SHADING {9}\
211                       \n\t\t*MATERIAL_XP_FALLOFF {10}\
212                       \n\t\t*MATERIAL_SELFILLUM {11}\
213                       \n\t\t*MATERIAL_FALLOFF {12}\
214                       \n\t\t*MATERIAL_XP_TYPE {13}\
215                       {14}\
216                       \n\t\t*[COLOR="#FF0000"]NUMSUBMTLS[/COLOR] {15}\
217                       {16}'''.format( self.name, self.matClass, self.ambient, self.diffuse, self.specular, self.shine, self.shinestrength, self.transparency, self.wiresize, self.shading, self.xpfalloff, self.selfillum, self.falloff, self.xptype, self.diffuseDump, self.numSubMtls, self.matDump )
Is the code causing problems here.

Can you give examples of how this plugin produces incorrect output, compared to the same, and working output from 3DS?
 
Last edited:
Newbie Spellweaver
Joined
Aug 31, 2012
Messages
72
Reaction score
26
You can actualy turn NUMSUBMTLS off but than you still have to add the texture path

I edited the tut to solve it, it's just a setting of the export xDDD

Blender 2.65 "NUMSUBMLTS fixed" Export
*3DSMAX_ASCIIEXPORT 200
*COMMENT "Ascii Scene Exporter v2.51"
*SCENE {
*SCENE_FILENAME ""
*SCENE_FIRSTFRAME 0
*SCENE_LASTFRAME 100
*SCENE_FRAMESPEED 30
*SCENE_TICKSPERFxRAME 160
*SCENE_BACKGROUND_STATIC 0.0000 0.0000 0.0000
*SCENE_AMBIENT_STATIC 0.0000 0.0000 0.0000
}
*MATERIAL_LIST {
*MATERIAL_COUNT 1
*MATERIAL 0 {
*MATERIAL_NAME "Material"
*MATERIAL_CLASS "Standard"
*MATERIAL_AMBIENT 0.0000 0.0000 0.0000
*MATERIAL_DIFFUSE 0.8000 0.8000 0.8000
*MATERIAL_SPECULAR 1.0000 1.0000 1.0000
*MATERIAL_SHINE 0.0978
*MATERIAL_SHINESTRENGTH 0.5000
*MATERIAL_TRANSPARENCY 0.0000
*MATERIAL_WIRESIZE 1.0000
*MATERIAL_SHADING Cooktorr
*MATERIAL_XP_FALLOFF 0.0000
*MATERIAL_SELFILLUM 0.0000
*MATERIAL_FALLOFF In
*MATERIAL_XP_TYPE Filter
*MAP_DIFFUSE {
*MAP_NAME "default"
*MAP_CLASS "Bitmap"
*MAP_SUBNO 1
*MAP_AMOUNT 1.0000
*BITMAP "None"
*MAP_TYPE Screen
*UVW_U_OFFSET 0.0000
*UVW_V_OFFSET 0.0000
*UVW_U_TILING 1.0000
*UVW_V_TILING 1.0000
*UVW_ANGLE 0.0000
*UVW_BLUR 1.0000
*UVW_BLUR_OFFSET 0.0000
*UVW_NOUSE_AMT 1.0000
*UVW_NOISE_SIZE 1.0000
*UVW_NOISE_LEVEL 1
*UVW_NOISE_PHASE 0.0000
*BITMAP_FILTER Pyramidal
}
}
}

3Ds Max 2010 Export
*3DSMAX_ASCIIEXPORT 200
*COMMENT "AsciiExport Version 2,00 - Thu Jan 01 00:41:11 2009"
*SCENE {
*SCENE_FILENAME ""
*SCENE_FIRSTFRAME 0
*SCENE_LASTFRAME 100
*SCENE_FRAMESPEED 30
*SCENE_TICKSPERFRAME 160
*SCENE_BACKGROUND_STATIC 0.0000 0.0000 0.0000
*SCENE_AMBIENT_STATIC 0.0000 0.0000 0.0000
}
*MATERIAL_LIST {
*MATERIAL_COUNT 1
*MATERIAL 0 {
*MATERIAL_NAME "Material"
*MATERIAL_CLASS "Standard"
*MATERIAL_AMBIENT 0.0000 0.0000 0.0000
*MATERIAL_DIFFUSE 0.6400 0.6400 0.6400
*MATERIAL_SPECULAR 0.5000 0.5000 0.5000
*MATERIAL_SHINE 0.9608
*MATERIAL_SHINESTRENGTH 1.0000
*MATERIAL_TRANSPARENCY 0.0000
*MATERIAL_WIRESIZE 1.0000
*MATERIAL_SHADING Blinn
*MATERIAL_XP_FALLOFF 0.0000
*MATERIAL_SELFILLUM 0.0000
*MATERIAL_FALLOFF In
*MATERIAL_XP_TYPE Filter
*MAP_DIFFUSE {
*MAP_NAME "Map #1"
*MAP_CLASS "Bitmap"
*MAP_SUBNO 1
*MAP_AMOUNT 1.0000
*BITMAP "C:\Program Files (x86)\Models\1.Blender\Weapons\BigSword2\itWS231.bmp"
*MAP_TYPE Screen
*UVW_U_OFFSET 0.0000
*UVW_V_OFFSET 0.0000
*UVW_U_TILING 1.0000
*UVW_V_TILING 1.0000
*UVW_ANGLE 0.0000
*UVW_BLUR 1.0000
*UVW_BLUR_OFFSET 0.0000
*UVW_NOUSE_AMT 1.0000
*UVW_NOISE_SIZE 1.0000
*UVW_NOISE_LEVEL 1
*UVW_NOISE_PHASE 0.0000
*BITMAP_FILTER Pyramidal
}
}
}

______________

Btw i am working on a new project of weaps, Like kinda dragon looking items.
I will only do Sword 1h and 2h, Staff, Javelin AND maybe a dagger
 
Last edited:
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
Is the line "*SCENE_TICKSPERFxRAME 160 " a typo when you where copying and pasting, or is that really in the Blender output?

Other remaining differences (Blender | 3DS):-
[pre]*MATERIAL_DIFFUSE 0.8000 0.8000 0.8000
*MATERIAL_DIFFUSE 0.6400 0.6400 0.6400

*MATERIAL_SPECULAR 1.0000 1.0000 1.0000
*MATERIAL_SPECULAR 0.5000 0.5000 0.5000

*MATERIAL_SHADING Cooktorr (Note, Cooktorr is not supported by PT)
*MATERIAL_SHADING Blinn

*MAP_NAME "default"
*MAP_NAME "Map #1"

*BITMAP "None"
*BITMAP "C:\Program Files (x86)\Models\1.Blender\Weapons\BigSword2\itWS231.bmp"
(both are wrong because we don't know where the bmp will be installed on client PCs, this path needs to be relative :wink:)[/pre]
Other than that, blender outputs spaces where 3DS puts tabs, and it adds an extra space to the end of each line. That's pretty close. :D
 
Newbie Spellweaver
Joined
Aug 31, 2012
Messages
72
Reaction score
26
I knew most of these you posted there.

(Blender | 3DS)

Bugs in the plugin:

*SCENE_TICKSPERFxRAME 160
Yes is is a typo, but not by me, i found the line in the plugin and its wrong there also. Can be changed fast.

Remaining bugs:

*MATERIAL_DIFFUSE 0.8000 0.8000 0.8000
*MATERIAL_DIFFUSE 0.6400 0.6400 0.6400

*MATERIAL_SPECULAR 1.0000 1.0000 1.0000
*MATERIAL_SPECULAR 0.5000 0.5000 0.5000

*MATERIAL_SHADING Cooktorr (Note, Cooktorr is not supported by PT)
*MATERIAL_SHADING Blinn
All of these settings are in the material. Can be changed in Blender.


No solution (yet):
*MAP_NAME "default"
*MAP_NAME "Map #1"

*BITMAP "None"
*BITMAP "C:\Program Files (x86)\Models\1.Blender\Weapons\BigSword2\itWS231.bmp"
 
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
Do those figures match what is in the UI on both programs? How are you importing from Blender to 3DS? It may be that the discrepancy is caused by a .x plugin one side or the other?

Just like human language translation, it's often interesting to try the translation in both directions, to see if the error is exponential, and if it occurs in both directions or only one.

I think I could fix up all but the last two of those errors in the .py, and then we could attach a "good" plugin to this guide. :D
 
Newbie Spellweaver
Joined
Aug 31, 2012
Messages
72
Reaction score
26
Do those figures match what is in the UI on both programs? How are you importing from Blender to 3DS? It may be that the discrepancy is caused by a .x plugin one side or the other?

I dont import from blender to 3ds :O
 
Custom Title Activated
Loyal Member
Joined
May 26, 2007
Messages
5,545
Reaction score
1,315
Oh... then I'm a little confused. XD From 3DS to Blender? Or are you manually recreating the same object? :eek:
 
Newbie Spellweaver
Joined
Aug 31, 2012
Messages
72
Reaction score
26
This is what i did before..
Export obj from blender, import it to 3ds max and export it to ase from there..
Now i just export ase from blender..

But lately some of my models come with holes in them..

Example: (Dagger from set i am working on)
8NaTqJ8 - [Guide] Custom Items - Blender tutorial - RaGEZONE Forums

hqtfxZ0 - [Guide] Custom Items - Blender tutorial - RaGEZONE Forums


When i export this with blender i get this, but also when i export obj and than ase..
 

Attachments

You must be registered for see attachments list
Last edited:
Over rock and under tree
Joined
Jul 20, 2011
Messages
568
Reaction score
347
These triangles that are missing are halves of some squares, that got lost on some conversion (it is a common error on conversions).. You can complete the holes with Create on 'edit poly' on 3ds or its equivalent on Blender, or try to convert it with other program/parameters..

If you just modeled it and exported it to ase, the holes can be because of the 'normals' (the 'normals' kind of point which way is in or outwards on the model..), but to fix it it is just to apply a 'Two-Sided' material to it, then the 2 sides of the faces will show..
 
Back
Top