• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Model rotation

Status
Not open for further replies.
Level 3
Joined
May 24, 2011
Messages
47
Hi,
I´d like to ask community, what tools do you use for making basic rotations with your models? For example you want some attachment to be rotated or the entire building/building section, etc... I´m using Magos model editor, but have really hard time to accomplish any rotation, because at some point, the model becomes stretched or constantly rotates back and forth while being tested in the game. With some small attachments, I always tried to fake it somehow, but this time I want an entire building section to be rotated, but it still won´t work.

I have seen many discussions about this, but no answer. I´m trying Warcraft 3 modding around 2 years, but this still plagues my efforts. Could you please help me with this? Are there other methods/tools with effective method of rotating?
 
Rotations are like this:

Rotation around Z

0: { 0, 0, 0, 1}
500: { 0, 0, 0.7, 0.7}
1000: { 0, 0, 1, 0}
1500: { 0, 0, -0.7, 0.7}
2000: { 0, 0, 0, 1}

Rotation around Y

0: { 0, 0, 0, 1}
500: { 0, 0.7, 0, 0.7}
1000: { 0, 1, 0, 0}
1500: { 0, -0.7, 0, 0.7}
2000: { 0, 0, 0, 1}

Rotation around X

0: { 0, 0, 0, 1}
500: { 0.7, 0, 0, 0.7}
1000: { 1, 0, 0, 0}
1500: { -0.7, 0, 0, 0.7}
2000: { 0, 0, 0, 1}
 
Level 3
Joined
May 24, 2011
Messages
47
Thank you very much Anvil, it is certainly an useful piece of information. The rotation was working, but my additional question is, how can i make a bone to be angled during some sequence. So it won´t go through some rotation, but will be just constantly in 90 degrees during certain sequence. Logically I tried to add just 2 lines of rotation at the beginning and at the end of the sequence, like this:

0: { 0, 0, 0.7, 1}
1000: { 0, 0, 0.7, 1}

In model editor, it looks OK, but in game, the model keeps skipping between the rotated angle and default angle.
 
If you need the model spin in all animations, you can use a GlobalAnimation.
Create a Global animation, should be the same as the last keyframe in rotation. In your example needs to be 1000.

If you need the bone not rotate in some animations, you need to write all the animations keyframes (In order).
If you have:
Stand 0-500
Death 2000-2500
Birth 1000-1500

You need to put in bone rotation:
0: { 0, 0, 0.7, 1}
500: { 0, 0, 0.7, 1}
1000: { 0, 0, 0, 1}
1500: { 0, 0, 0, 1}
2000: { 0, 0, 0, 1}
2500: { 0, 0, 0, 1}

Also, I think you can use this to reduce lines:

0: { 0, 0, 0.7, 1}
500: { 0, 0, 0.7, 1}
1000: { 0, 0, 0, 1}
2500: { 0, 0, 0, 1}
 
Level 3
Joined
May 24, 2011
Messages
47
I did it exactly like that, but it didn´t solve the issue.

If you will have time, here I upload the map with already imported building and also created a video, so you don´t need to download the map, if you recognize the issue.


As you can see, the building of Castle is rotated using the global sequence rotation with parent Helper. For some unknown reason it keeps skipping. I tried using basic sequence instead of global, but no luck.

Thanks for your time.
 

Attachments

  • Castle.w3x
    102.8 KB · Views: 60
I opened the model in Magos.

If you use a GlobalAnimation, and for some reason you don need it anymore, you need to remove it, because Magos has many bugs. The program will put again the GlobalAnimation in the bone, or any place where you have used.

In the Unnamed helper, in rotation I found this:

0: { 0, 0, -0.3, 1 }

+GlobalAnimation.

Don't use a Helper, use a Bone. You need to do something like this:

1000: { 0, 0, -0.3, 1 }
4000: { 0, 0, -0.3, 1 }
5000: { 0, 0, -0.3, 1 }
8000: { 0, 0, -0.3, 1 }
9000: { 0, 0, -0.3, 1 }
12000: { 0, 0, -0.3, 1 }
13000: { 0, 0, -0.3, 1 }
17000: { 0, 0, -0.3, 1 }
18000: { 0, 0, -0.3, 1 }
22000: { 0, 0, -0.3, 1 }
23000: { 0, 0, -0.3, 1 }
27000: { 0, 0, -0.3, 1 }
28000: { 0, 0, -0.3, 1 }
32000: { 0, 0, -0.3, 1 }
33000: { 0, 0, -0.3, 1 }
37000: { 0, 0, -0.3, 1 }
38000: { 0, 0, -0.3, 1 }
42000: { 0, 0, -0.3, 1 }
43000: { 0, 0, -0.3, 1 }
103000: { 0, 0, -0.3, 1 }
104000: { 0, 0, -0.3, 1 }
107000: { 0, 0, -0.3, 1 }

I uploaded the map again, has the modified model and the original, extract the models and check it with magos.
 

Attachments

  • Castle.w3x
    191.4 KB · Views: 72
Level 3
Joined
May 24, 2011
Messages
47
Again, thank you for your effort, but there is a problem. Have you tested the map? It caused me a pretty strange thing, that the old model with Helper is fine, but your new one is skipping now.
 
Level 3
Joined
May 24, 2011
Messages
47
It´s working now. I wonder what really cause this problem? Is it the model editor bug? Or the models? Are there some other tools/editors to do the rotation in similar easy way?

Thanks for you help.
 
Level 3
Joined
May 24, 2011
Messages
47
I don´t usually use the rotation for the entire model like this, but in this case there were too many animations that would screw up, if I rotate it manually.
 
Are there some other tools/editors to do the rotation in similar easy way?
MdlVis is the quickest way to rotate a bone as you don't have to guess and experiment with the values.
Just open the model, switch to sequence editor, select the global sequence, select the root bone and rotate with mouse to the desired angle.


Sometimes, adding a bone to existing bone structure and mesh structure to rotate the entire model cause problems, I don't really know why.
I can't see how that could cause problems.
It has always worked perfectly fine to me, except with the earlier Magos' model editor version that broke the rotation data during editing.

you can't edit bones via text(I think).
Save the model as .mdl and open with notepad and you can edit all aspects of it.
But the only reason you'd want to do that is to convert all helpers to bones before animation transfer.
Everything else is easier and faster to do with programs.


I don´t usually use the rotation for the entire model like this, but in this case there were too many animations that would screw up, if I rotate it manually.
You could just skip all the hassle and use Oinkerwinkle's "Geoset Translation" tool instead. It can be used to rotate, scale and translate the entire model.
Oinkerwinkle's Tools

It's very easy to use but you should note that it has two of the coordinates mixed up (Y and Z were switched if I recall correctly).
And yes, it rotates both the mesh and the animations.
 
I can't see how that could cause problems.
It has always worked perfectly fine to me, except with the earlier Magos' model editor version that broke the rotation data during editing.

Sometimes this happens, no matter what version of Magos is used. I don't know why. Magos is really bugged, good example is de GlobalSequence, if you put it in a bone, then save the model, remove the GlobalSequence. If you create another Sequence, when you save the model, Magos will assign the new sequence to the old bone. If you convert your model to mdl you can see in the bone GlobalSeqId, Magos never will remove this, you need to do it manually. Also, lights and other stuff is bugged, I think you know that. The point is, this program can fuck up your model.

Save the model as .mdl and open with notepad and you can edit all aspects of it.
But the only reason you'd want to do that is to convert all helpers to bones before animation transfer.
Everything else is easier and faster to do with programs.

I know that. Also, I edit a lot of models directly in .mdl because is less bugged than the .mdx format. About "you can't edit bones via text(I think)." I mean you can't edit bones easy like in Magos.( writing text for translation, rotation, etc)
 
Level 3
Joined
May 24, 2011
Messages
47
Kitabatake, I try to use Mdlvis as rarely as possible, because sometimes even opening a model in there may corrupt it.

But I´ll try Geoset Translation, if it really safely translate/scale/rotate even the animations, then I already spent a lot of time on non-effective workarounds.

EDIT

Geoset Translation worked flawlessly, thank you very much for advice Kitabatake.
 
Last edited:
Status
Not open for further replies.
Top