model editing & camera controls

Moderator: Slitherine Core

Post Reply
zachanscom
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 29
Joined: Sun Aug 30, 2009 3:46 am

model editing & camera controls

Post by zachanscom »

hi, i need help converting the gr2 files into a model format. i tried the "granny viewer" software but it can only view it, not convert it.

thanks.
Last edited by zachanscom on Sun Oct 25, 2009 2:08 am, edited 1 time in total.
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

Unfortunately editing models is not possible without Granny so all you are going to be able to do is modify the textures I'm afraid.
zachanscom
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 29
Joined: Sun Aug 30, 2009 3:46 am

Post by zachanscom »

edit:

i found the file to adjust camera angle and zoom. it's called "3ddata" in the data folder.

however i need help deciphering what each number represents:

440
3000
-0.1 0.9
-0.7 0.77
0.3

from my experimentation, it seems 440 controls the field of view.
3000 is the ceiling level.
the next 2 row of numbers i have no idea, the last one controls angle?

please help. thank you.
pipfromslitherine
Site Admin
Site Admin
Posts: 9700
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

The first two are the zoom levels, basically the distance back from the camera focus point at each zoom extreme.

The two pairs are x y values for a vector defining the look at vector, again at the two zoom extremes.

The final value is (I seem to remember) the default zoom value, but I don't know that we use that any more.

Cheers

Pip
zachanscom
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 29
Joined: Sun Aug 30, 2009 3:46 am

Post by zachanscom »

hi, could you explain the two "look at vectors"? are they like the camera angle? thanks.

i'm trying to change the settings so that when zoomed in, the camera position is lower, but the angle is higher. like this: (camera)< _____(map)_____
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

The best thing is to try some values out and see what happens.
zachanscom
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 29
Joined: Sun Aug 30, 2009 3:46 am

Post by zachanscom »

i did, i tried changing the vector values but still can't figure out what they do.

i increased and lower the increments on the first two vector numbers.

decreasing the first seems to lower the camera, increasing the second seems to raise the camera angle. so i decrease and raise further....but then the camera does something totally unexpected and contradictory to what had previously occurred.

could you describe in layman's terms what the first two vector numbers do? (-0.1 0.9 ), and do they have to be in conjuction with the second pair of vectors?

thanks

edit: i don't think any of them control camera elevation, just angle. so i added a third number for the z axis with the strange results.
pipfromslitherine
Site Admin
Site Admin
Posts: 9700
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

Adding more numbers will just confuse things, as they will be read as the first value for the next number :)

It defines the vector along which the camera looks. The vector will be normalised, so just changing one of the values by a small amount will not make a very large difference.

If you know the angle you can, then the two values would be basically the cos and sin of the angle respectively.

Cheers

Pip
zachanscom
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 29
Joined: Sun Aug 30, 2009 3:46 am

Post by zachanscom »

so by angle do you mean the camera angle as it relates to a flat horizontal plane? like pitch up and pitch down?

is there a number that adjusts the height of the camera itself? is that part of the vectors? because i'm lost on how to calculate the sin and cos. i understand that for a right angle, the sin is basically 2, so are the cameras field of view right angles? if so do i put .2 in the first box? that makes the camera pitch downward slightly when zoomed in.

sorry, but i can't seem to get the camera to lower itself.

edit:

by camera elevation i mean sinking the camera lower into the ground like in this screenshot(but just a little higher)...do you guys know how to recreate this angle?

Image
IainMcNeil
Site Admin
Site Admin
Posts: 13558
Joined: Fri Apr 01, 2005 10:19 am

Post by IainMcNeil »

Do you want to play at this angle or set up screenshots? We have a debug mode you can use to take screenshots from this angle but it is not possible to play at the same time.
pipfromslitherine
Site Admin
Site Admin
Posts: 9700
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

To move the camera down, you would want a vector which has a higher first value and a lower second value. For example, if you wanted the camera to be looking at 10 degrees, your values would be:

x = cos( 10 ) = 0.984
y = sin ( 10 ) = 0.173

This is a very low camera angle. If you need more info on vectors and how they work, google is your friend :)

The height of the camera is defined by the vector and then the distance (the first 2 numbers). Imagine the camera is placed on the ground - then it moves back along the vector by the distance. This is how it works out where it should be.

Pip
zachanscom
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 29
Joined: Sun Aug 30, 2009 3:46 am

Post by zachanscom »

alright, thanks.
Post Reply

Return to “HISTORY™ Great Battles Medieval : Modding”