Author Topic: [Solved] Blender Weapon Creation  (Read 2096 times)

I have this model I have made:



I really can not find any good, working tutorials/documentation for Blockland weapon creation in Blender - this is as far as I have got.

I don't know how to do stuff like the mountPoints in Blender, nor do I know what 'points' actually have to be added to make it a valid weapon for scripting.

The model isn't textured because I don't know how to texture it, I found a section on DarkStar's old Blender tutorial and I followed it exactly: I selected the faces I wanted to texture, I went to the UV/Image Editor and I loaded up the 16x16 .png file of the color I wanted - nothing happens (even when switching to textured/material view).

I also don't know if the model is even the right size for a Blockhead's hand, but I guess I can worry about that after I've learned to do all the above.

Reference:
I am using Blender v2.77 with Port's DTS Importer/Exporter.
I would like to know what _____point's have to be added and how/where to add them properly.
I would also like to know how to texture the weapon.
« Last Edit: July 08, 2016, 12:11:44 AM by Crazycom »

For the new exporter, you don't use armatures/bones. You have to use empties. (Shift A, Empty)
mountPoint: Where the player holds the object
muzzlePoint: Where the projectile (bullets and stuff) come out
ejectPoint: Where shells and stuff come out

Using state scripts, you can also add your own "_points" and use them for emitters and whatnot.

For the new exporter, you don't use armatures/bones. You have to use empties. (Shift A, Empty)
mountPoint: Where the player holds the object
muzzlePoint: Where the projectile (bullets and stuff) come out
ejectPoint: Where shells and stuff come out

Using state scripts, you can also add your own "_points" and use them for emitters and whatnot.

I'm seeing multiple different empty types, does it matter which one I pick? I took a guess:




I have no idea, but I normally pick Single Arrow for all my points, and Plain Axes for other empties that you need (shape and detail32), and it works just fine.

I have no idea, but I normally pick Single Arrow for all my points, and Plain Axes for other empties that you need (shape and detail32), and it works just fine.

Alright. I have parented the ____points to detail32, and parented detail32 to shape (as per instruction in a previous post I found by you).
They all seem to be done now.

Now I just need to figure out how to texture the model and size it appropriately for a Blockhead's hand, then I think that's it?

Alright. I have parented the ____points to detail32, and parented detail32 to shape (as per instruction in a previous post I found by you).
They all seem to be done now.

Now I just need to figure out how to texture the model and size it appropriately for a Blockhead's hand, then I think that's it?
Once you're done with the actual model part, it needs to stay by itself outside of any empties, unless you are doing animations. Make sure you apply location, rotation, and scale for all meshes (ctrl a > location, rotation & scale)
For texturing (i'm assuming you mean coloring it), you add a material to the mesh, and name it. Then, you need to find or create a 16x16 png with the same name as the material that is the color you want, and put it in the addon's folder.
For example, if I named the material on the handle "brown", I would need a "brown.png" in the folder that the model is in.



i'm getting somewhere lmao.
must the scaling be done within the script or back in Blender?



i'm getting somewhere lmao.
must the scaling be done within the script or back in Blender?
do this
Once you're done with the actual model part, it needs to stay by itself outside of any empties, unless you are doing animations. Make sure you apply location, rotation, and scale for all meshes (ctrl a > location, rotation & scale)

do this

I re-did that step just now.
The model is now smaller (and I also notice that the flash emitter now fires correctly from the location I set it with muzzlePoint).
It's still not small enough though:



Minus the fact that I'll have to spend a couple of minutes tweaking the offset (after getting it to the correct size), do I just have to keep downsizing it in Blender until I get it to a size fit for the hand?

I re-did that step just now.
The model is now smaller (and I also notice that the flash emitter now fires correctly from the location I set it with muzzlePoint).
It's still not small enough though:



Minus the fact that I'll have to spend a couple of minutes tweaking the offset (after getting it to the correct size), do I just have to keep downsizing it in Blender until I get it to a size fit for the hand?
You can also import a default player model and view it with the weapon, and then scale the weapon until it fits


thanks guys, I have one more issue to address:



it looks like the muzzlepoint is offset by a fair margin, but in the Blender model it seems fine:



EDIT: I did try moving the muzzlepoint empty further in (as shown above) from before, it didn't do anything.
« Last Edit: July 07, 2016, 11:38:14 PM by Crazycom »

apply scale and rotation and location on the muzzlepoint, then move it back to position. Also reset the location/scale/rotation of shape and detail32 empties, which appear to be in the middle of the gun for some reason. you actually dont need to give direction to the muzzlepoint; dont need to rotate it to point forward, i believe. May be wrong on that but i recall testing it out since someone said it worked and didnt believe them, and then it turned out it works
« Last Edit: July 07, 2016, 11:40:10 PM by Conan »

thanks guys, I have one more issue to address:

[i mg]https://i.gyazo.com/d330035ad234162f421e976a4e9d2c7d.png[/img]
 
it looks like the muzzlepoint is offset by a fair margin, but in the Blender model it seems fine:

[im g]https://i.gyazo.com/51bdef57ee01b6d208b1cf2702336a1f.png[/img]

EDIT: I did try moving the muzzlepoint empty further in (as shown above) from before, it didn't do anything.
Point the muzzleVector upwards

I fixed it by just re-applying location/rotation/scale to the entire thing and then repositioning the ____points.
thanks for all the help, I'm going to leave this thread open just in-case.