• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Changing the rotation of an attachment

Status
Not open for further replies.
Level 1
Joined
Nov 17, 2013
Messages
4
Hey guys,

I´m so desperate because I just can´t find a solution for a problem and I´m hoping you can help me a little bit.

Ok, first I downloaded this awesome model : http://www.hiveworkshop.com/forums/models-530/animated-marine-jk2pach-146212/?prev=search%3Dspace%2520marine%26r%3D20%26d%3Dlist%26page%3D4
Then I downloaded some warfare weapons and attached them to the model via item/skills. It looks just right and awesome. Exactly what I wanted.

Inspirated from that I took the standard Space Orc model from the war3.mpq and removed it´s weapon with the WC3 Model Editor. All fine.
Then I tried to make the attachment-nodes and here my problems begin:

A small addition: What really bothers me, if you make the node at the left hand bone, the weapon is held to the side, but in the wrong degree...and the right hand (where I want the node) the weapon just sticks to the front...so there must be a way to change the rotationn of a node, without editing the rotatioin of a node...

In the Marine-Model you can attach weapons and is looks just fine, because the weapon is held over his arm...so I tried to rotate the node that the weapons my orc holds don´t stick to the front... (the second reason is, because of the attack animation), but it just doesn´t work..no matter what I try... I looked through dozens of threads and read something about this Euler-shit, what seems to be the right solution, but it also seems that I don´t have the knowledge to work it out.

Does somebody know an easy solution to rotate nodes, so that the model can hold weapons without changing them in the editor?

My english isn´t very good, so if my problem is bad described, I will upload several pictures to show my exact problem. I just don´t want give up at this point....
 
Luckily it is very easy to fix.

Open the model in Magos' model editor (download it from our tools section). Go to Windows -> Model Editor. Drag select all of the vertices so that they become green. Go to Transformations -> Rotation, and then rotate it so that it has the proper facing. I don't remember which axis.

I can give you a more detailed guide if you want later. Just attach the model to attach (the weapon) to a post and then I can rotate it for you + give you pictures and a quick guide on how to do it manually. I'll probably be able to do it later on today or tomorrow. There should be a way to get it to look right through editing the attachment only.
 
Level 1
Joined
Nov 17, 2013
Messages
4
Luckily it is very easy to fix.

Open the model in Magos' model editor (download it from our tools section). Go to Windows -> Model Editor. Drag select all of the vertices so that they become green. Go to Transformations -> Rotation, and then rotate it so that it has the proper facing. I don't remember which axis.

I can give you a more detailed guide if you want later. Just attach the model to attach (the weapon) to a post and then I can rotate it for you + give you pictures and a quick guide on how to do it manually. I'll probably be able to do it later on today or tomorrow. There should be a way to get it to look right through editing the attachment only.

First thank you very much!!!:thumbs_up: My intention is only to edit the attachment point for weapons of the orc, nothing more...when he grabs a item on my map it will directly be in the right degree...I tried your suggestion, but I don´t know how this really should help....or maybe I just don´t get the idea.. ;-(
 
Oh okay. I see where the issue is. I'll do my best to explain what is going on.

First, attachments don't have a rotation field. They (usually) inherit the rotation of the parent object (the bone), and the bone's rotation is determined by its movement.

The right hand attachment point inherits off the Bone_Hand_R bone. Now, for most models, there won't be any issues. However, the space marine is a special model. Its gun is held sideways initially:
attachment.php


Why is this an issue? Most custom attachments developed on the hive are set face forward, facing the screen and are horizontal. In the following pictures, pretend that the gray block is the attachment:
attachment.php
attachment.php

(Left) Front view of the model. The block is facing us.
(Right) Side view of the model. Note the direction the block is facing.


And that outlines the problem. The model was designed differently, and thus the attachment ends up looking weird on the model. Orientation (rotation, position, tilt, etc.) is very important in attachments, especially when using them for default models. It will work perfectly fine for some units (e.g. Arthas is a good unit to hold attachments because his hammer faces us and has no tilt, same for peasant, footman has the right rotation but is slightly tilted--he is still pretty good for it though). However, others won't work as well (e.g. shadow hunter has a side-ways weapon, tauren chieftain has a tilted and rotated weapon). This is how it would move, and as you can see, the block isn't looking how it is supposed to:
attachment.php

For it to be in the proper position, it should end up being horizontal
in this picture, just like the original gun.


Fun fact: They ended up remedying this in WoW. All the attachments face one direction, and all character models are designed to fit those attachments. Attachments are a much bigger deal in WoW since weapons and armor are replaceable, but in wc3 they probably didn't account for that since the models are static.

How do you fix it?

There are two options. (1) Redo animations of the model. You would have to reanimate the bones so that they rotate properly with the attachment models you want to use. (2) Make alternate versions of the attachment models so that they will attach properly on that unit. (Note: There might be more options, I just didn't think of any others)

I don't have much experience with option #1, so I won't go into detail on it. There is a tutorial by jk2pach for animating in mdlvis in case you're interested, but it takes a lot of patience. #2 is a bit more feasible, although you have to consider that you'll be importing the model twice and you'll need different attachments for different units. e.g. if you have the attachment with an item, you may have to trigger it instead so that it shows the original attachment when you attach it to the marine, and the rotated attachment when you attach it to the orc.

Anyway, the goal is to make the attachment look as it does in the picture where the unit is standing still (see the pic in the first spoiler above). I will be using Suselishe's "Angry Fire" (Plasma Gun) for this as an example:
http://www.hiveworkshop.com/forums/models-530/angry-fire-171445/
I will be using MDLVis (check our tools section), but you can use Magos too. You would just go to Windows -> Model Editor, select all the vertices (so they become green) and then go to Transformations -> Rotation, and rotate it until you get the right position. It is a bit of guesswork though.

Anyway, open up the attachment in MDLVis, and then click Perspective in the upper left corner. Select Front. The model should be facing you. Click the button that looks like a mouse cursor (it should already be selected), and then select the vertices you want to rotate.
attachment.php

Next, look on the tools on the right side and select the rotation tool. It will allow you to rotate the selected vertices.
attachment.php


You'll have to fiddle with the axes to get it to rotate to the correct angle, they will be labeled as ZX, XY, and YZ. Just mess around and try to get it to look as close as possible. This is the result of my first attempt:
attachment.php

I rotated is so that it is sideways, looking down, and slightly tilted towards us (just like the picture of the orc marine)
attachment.php

Oops, it doesn't look quite right in game.


As you can see in the second image, it didn't look right in-game. But it was really close! Fixing that is a simple matter of translating it to the right a little. This requires a lot of patience and testing to get right, but it is worth it in the end! Always test in an empty test map. It'll take too long to test in your actual map. Anyway, to fix it, I just switched from the rotation tool to the move tool (the icon is a hand), and I moved the vertexes to the right.
attachment.php


And there we have it. It looks pretty good. It could still use a little bit of adjusting, and should probably be scaled down a bit, but overall it turned out well.

I know that you explicitly wanted to edit the base model, but you might find it easier to just make duplicates of the attachments. You can always try the requests forum, but animation requests are rarely completed (unless they are very simple). Good luck, and I hope this helped.
 

Attachments

  • Bone0.jpg
    Bone0.jpg
    44 KB · Views: 563
  • Bone1.jpg
    Bone1.jpg
    33 KB · Views: 576
  • Bone2.jpg
    Bone2.jpg
    30 KB · Views: 557
  • Bone3.jpg
    Bone3.jpg
    110.5 KB · Views: 592
  • Bone4.jpg
    Bone4.jpg
    11.1 KB · Views: 569
  • Bone5.jpg
    Bone5.jpg
    21.8 KB · Views: 583
  • Bone7.jpg
    Bone7.jpg
    38.1 KB · Views: 555
  • Bone6.jpg
    Bone6.jpg
    50.4 KB · Views: 539
  • Bone8.jpg
    Bone8.jpg
    60 KB · Views: 570
Level 1
Joined
Nov 17, 2013
Messages
4
Man, I don´t know how to thank you, such a detailed explanation! I will definitly credit you in my map =) I discovered Mdlvis for me yesterday and it is just the right program to solve my problem. Your suggestion to rotate the attachments, is as far as I can judge that, the easier way, but it will cost more space in the end...I will try both ways =) Again, thank you, you were really helpful =)
 
Status
Not open for further replies.
Top