PDA

View Full Version : absolute image-origin coordinates



Metal Storm
11-06-2003, 03:10
Hello everybody,

How do I get/calculate the absolute image-origin coordinates?

I have been searching & reading a whole bunch of posts and tutorials in them. I do not understand the wording of one of Duke John & Wellingtons tutorials. Obviously I am directing this question towards them but If anybody else knows that would be great too.

action
x0 y0 x1 y1 x2 y2 angle=157 degrees
x0 y0 x1 y1 x2 y2 angle=112 degrees
x0 y0 x1 y1 x2 y2 angle=67 degrees
x0 y0 x1 y1 x2 y2 angle=22 degrees

In the creation of the Action Page Coordinates I understand
the x1 y1 x2 y2 but am unclear on how to get the 0x 0y coordinates for a mount type. I've been looking at Ehorse to try to come up with x0 y0 but do not see how they came up with those numbers.

Here is the quote I do not understand fully:
"The x0 and y0 coordinates equal the distance between the topleft corner, O0, of the image-rectangle and an imaginary point somewhere between the feet of the soldier (the red plus-sign). This point will from now on be called the image-origin. The image-origin can be found by drawing a straight line down the spine of the soldier and intersect with a line between the soldiers feet. These coordinates are relative, to calculate the values you must subtract x1 en y1 from the absolute image-origin coordinates."

What is the absolute image-origin coordinates? Do you meant the Image Origin?

If so, my math may be in wrong so I will explain how I understand this.
"To calculate the values you must subtract x1 en y1 from the absolute image-origin coordinates."
Since I don't know the absolute image-Origin I simply reverse it and add the numbers x0 y0 to the x1 y1 to find the image origin. On the Ehourse this number is outside of the Image Box (x1 y1 x2 y2). http://www.totalwar.org/forum/non-cgi/emoticons/confused.gif http://www.totalwar.org/forum/non-cgi/emoticons/dizzy.gif

So I am all confused and hope sombody can explain how to get the x0 y0 numbers from x1 y1 and x2 y2. Thanks http://www.totalwar.org/forum/non-cgi/emoticons/dizzy.gif

Duke John
11-06-2003, 08:33
It may be my fault, I've followed quite a few math courses at the university, and I tend to write at my level. Here are the images again:
http://chronicles.metw.net/images/guide/frame.jpg
http://chronicles.metw.net/images/guide/rectangle.jpg

Absolute coordinates: the full deal, for example, 240,120 measured from the topleft of the image..
Relative numbers: the coordinates are now viewed from another origin point, for example when the new origin has the absolute coordinates 130,70, then the former coordinates become 240-130=110, 120-70=50.

With the Rohan model (assumed numbers):
Image-rectangle: absolute coordinates measured from O
x1=50
y1=45
x2=62
y2=81

A temporary origin for determining the image-origin:
x1,y1=50,45

The image-origin:
When making new models, it's convenient to always put them in the same place, ie between the feet, at eye-level you pick.
When viewing other models, this image-orginin can lie everywhere. Just see it as a handle.
In this case I want the origin between the feet (see image 2):
x0 absolute = 55
y0 absolute = 64
But I need relative coordinates:
x0=55-x1=5
y0=64-y1=19

Mounted models
The mount, ie horse, has a image-origin somewhere at ground level below the saddle. The image-rectangle of the rider doesn't go that far since he sits on top of the horse, but still the image-origin of the rider is placed directly over the image-origin of the horse. That's why you need the image-origin to be out of the image-rectangle. It doesn't matter, it's just a handle.

If you still don't get it, read it again, look closely at the pictures and do the math yourself. What numbers am I taking and why? It's a tough subject, but you need to think logically and try to tackle the problem of displaying units a bit mathematically. You can only have numbers how you do it?

- Cheers, Duke John

Metal Storm
11-06-2003, 16:22
Thanks DJ,
I made a copy of your notes here. I appreciate you doing that. I'm going to recalculate and see if it sinks in this time. Thanks again. http://www.totalwar.org/forum/non-cgi/emoticons/wave.gif

Also on a related topic,

---Can I create a Custom mount folder for the elephant? To test it I had to replace one of the existing MOUNT type horses. Do I need to define a new folder somewhere?

---How can I scale it to be 2x as large as a horse?
The MOUNT types do not have any Height, Radius or Scale numbers. I made a new unit with the elephant mount and scaled the units number up but MTW crashed out when I went into 3d battle.