|
Actually
#6219 posted by madfox on 2007/07/29 05:40:13
it was easier than I thought as the qmle grid measures are 32.
Aguire
#6220 posted by inertia on 2007/07/29 10:05:12
Since your tools compile the half life .map format into a q1 bsp, could they also just spit out a q1 .map from an hl .map?
Fixed Grid Size
#6221 posted by Preach on 2007/07/29 12:51:37
The thing about the quake model format is that it stores all of the coordinates of the verties as single bytes, in the range 0-255. The model then has an offset vector and a scale vector in floating point values. You may find if you save and reload your model in QMe then it will have developed inaccuracies. The grid in QMe works seperately to this rounding off, so it usually just makes things worse.
Of course, if you only have one frame, then the upper and lower boundaries of the model will always be correct, as they are stored as '0 0 0' and '255 255 255' as bytes, meaning one is the offset vector, and one is the offset plus the scale vector.
The easiest way of thinking of this in my opinion is that quake creates a grid with 256 gridlines in each direction, then scales it so that it exactly contains the model in all the frames. The vertices that are furthest out on each direction sit on the edge of the grid, and everything else is snapped to it.
The problems will arise once you make the model larger than that 64x64x64 box in some frames, in any direction. Then the scale and offset vectors get recalculated, and the box vertices get snapped to a new grid. One way to get round this is have a frame somewhere in the model larger than all the other frames, with two vertices placed very carefully. For instance, if you have one vertex at '-128 -128 -128' and one at '127 127 127', and nothing outside those ranges in any frame, then your grid will be in multiples of 1 quake unit. If this isn't a clear explanation, take a look at:
http://www.btinternet.com/~chapterhonour/pickup.zip
which shows it in practice.
The thing is, adding this weird sized frame is just tricking the tools into making the scale and offset into being correct. At some point, I plan to modify my export script for blender so that you can specify offset and scale manually, rather than have it calculated automatically. Of course, if you make the scale too small to accomodate the model then outlying vertices will get squashed, it'll need some thought.
Inertia
#6222 posted by aguirRe on 2007/07/29 13:04:52
No, they don't export map files. You should be able to convert using QuArK, though. I guess another way is to just use Hammer/WC3.3 for continued editing of a Valve 220 map.
I also heard something that one version of GtkRadiant could read Valve 220 maps and then save into Q2/Q3. This could then be edited directly in Gtk (possibly also exported to Q1) or further converted to Q1 by e.g. my ConvMap.
I Should Add
#6223 posted by aguirRe on 2007/07/29 13:09:34
that converting a Valve 220 map into plain Q1 might result in screwed up textures as some ETP stuff can't be represented properly.
Models
#6224 posted by madfox on 2007/07/29 22:47:04
Thanks Preach, for your explanation!
I just started at good luck, making a model base with one square stand position of 64x64x64. Then I imported it into Qme and took the output mdl to quark47. A quick vieuw in Quake, with a transposed e1m3 file and a cube 64x64x64, translated the stand position.
In this way I could manage to recalculate the measures until it became a regular fitting cube form. To my surprise it were the correct double 32 measures of Qme.
Another point appears with the texture. I took a_floor1 because of it clear square outfit. But as I had to diminish the texture to 79% for the model, they seem somehow flattened in game in opposite of the mapbox textures.
I think I have to live with it, because I see no other way. It looks as if the model, hidden in the map boxes, will reveal itselves in some way. Also models always have a lightened shape, as map boxes receive their lightning from the light.exe themselves.
Aguirre
#6225 posted by inertia on 2007/07/30 02:37:24
I've been snooping around and I think the map exporting functionality has been removed from gtkr. I might be wrong though..
Func_rotate_object
#6226 posted by golden_boy on 2007/08/04 15:50:24
Ok, I'm trying to make a ceiling fan that rotates in the normal way (around the vertical axis.)
Problem: No matter what I do, it rotates around the horizontal axis. It looks very stupid.
It's the first time I do this... I'm a bit unsure how to proceed.
I have my rotate_object, the fan. I have an info_rotate directly below it, on the axis of rotation. Below that is my func_rotate_entity. Rotation is working, so the targets etc. are OK.
1) Do the info_rotate and func_rotate_entity need to be on the _center_ of rotation, or is it enough to put them anywhere on the _axis_ of rotation?
2) For rotation around the vertical axis (Z axis I assume), what does my rotate key need to look like? I tried 0,0,90 and 0 0 90 but neither seems to be working. I also tried 0 90 0 but nothing changed...
I need a bit of help here. czg's tutorial isn't very specific and I think it contains errors.
Urgh
#6227 posted by golden_boy on 2007/08/04 16:16:43
Figured it out. I'm officially stupid. The vertical axis is the Y axis. ^^ I seem to have missed some geometry lessons.
Someone should make a clearer tutorial, or Kell could just put an example map into Quoth. I might make one and donate it.
:)
I Don't Know
#6228 posted by aguirRe on 2007/08/04 16:39:01
of any specifics regarding rotating stuff, but AFAIK the vertical axis is the Z-axis. Maybe your problem is related to the sometimes strange key formats; yaw/pitch/roll etc.
#6229 posted by ijed on 2007/08/04 18:40:38
Rotatings are a cunt to set up - czg's tutorial is fairly clear, but the idiotic way that the rotatings were coded makes it a process of trial and error to implement, since I believe that it does use both angles and pitch / yaw / roll.
I'd guess that this hacky code got past when the Hipnotic project leader was off with flu.
#6230 posted by golden_boy on 2007/08/04 19:17:09
I found out by trial and error that the Y axis is vertical. The Z axis is "depth" and thus one of the horizontal axis.
X and Z are horizontal, Y is vertical. In math, X goes left-right, Y goes bottom-top. Z is "depth" in three dimensional space.
The "mechanical" part was pretty simple actually. The rotating object itself is turned into, surprise, a rotate_object. It rotates around a corresponding info_rotate. Third we have the corresponding func_ entity, like func_rotate_entity and func_rotate_door. This point entity has all the information, mainly the "rotate" key. It holds the combined direction and speed information. "rotate" "0 45 0" gave me what I needed: Turn 45 degrees per second, around the Y axis.
Luckily I didn't have to set up collision detection. Player has no RL, so he shouldn't be able to reach the fan. :) Laziness!
:)
Don't Mix Up
#6231 posted by rudl on 2007/08/04 21:02:42
No Z is usually vertical
In quake for instance, z is vertical
IN Math it is relativ, because you can rotate the coordinate system.
but always the same is:
when you look through the z-axis in the positive way then, x is right and y is left
when you look through the x-axis in the positive way then, y is right and z is left
when you look through the y-axis in the positive way then, z is right and x is left
Had my final exams focused on geometry ;)
Hmm
#6232 posted by golden_boy on 2007/08/04 23:07:34
Then how do you explain that "rotate" (0 45 0) makes it turn around the vertical axis?
The key's format is (x y z) so in translation, that means "turn 45 degrees per second around the Y axis."
So either Y is vertical in Quake, or the func_rotate_* is buggy. Or the whole map is rotated and I didn't notice. :)
Anyway, it works :)
Heh
#6233 posted by ijed on 2007/08/05 00:06:48
3dsmax is the most common 3d tool for games because its cheaper - alot of people prefer maya (forget shitty softimage) but it does the same thing; changing z for y. And has alot of other problems for exportation.
Ballache.
Key Format
#6234 posted by aguirRe on 2007/08/05 00:07:53
Again, I don't know any specifics about func_rotates, but the key format pitch/yaw/roll is one of the used ones and then your example means 0 degrees vertical pitch, 45 degrees counter-clockwise around the z-axis and 0 degrees roll around that vector (possibly not used).
And you can look in any Q1 editor to verify that z-axis is indeed the vertical axis (i.e. up/down from the floor).
#6235 posted by golden_boy on 2007/08/05 00:34:43
ijed: Ballache is the right word :)
AguirRe: That is so far over my head, I might have to re-read that when I'm less tired to grasp what it means. It sounds reasonable though.
An Easy
#6236 posted by aguirRe on 2007/08/05 00:45:27
test is to load a map in FitzQuake or any of my engines and use the console command viewpos.
Then you'll get the xyz coordinates of your current map position and then three extra values that specifies how an intermission entity key should be specified to look in the same direction as you're currently looking. Move the view and check again to see how the values change.
This is one of the formats used when specifying a vector. Another is the more simple spot/sunlight key of TyrLite or my Light; pitch/yaw. See the readmes for more details on this.
Viewpos
#6237 posted by ijed on 2007/08/05 01:00:05
Didn't know that - should help alot; the intermissions in warp were shit, I just added a roll value to make them more interesting.
AguirRe
#6238 posted by golden_boy on 2007/08/05 01:15:56
I realize you're probably right. I will run some tests on this.
It would explain a few things.
So Now I Understand It:
#6239 posted by rudl on 2007/08/05 11:19:33
The "rotate" 0,0,0
does not mean x,y,z
It is not a kartesian coordinate system it is a Spherical one.
http://en.wikipedia.org/wiki/Spherical_coordinate_system
Spherical And Greeks
#6240 posted by Preach on 2007/08/05 12:42:09
It's basically like a spherical system, but with one important difference. In the wikipedia article the three coordinates are (ρ, φ, θ), and ρ is the radius, or distance from the origin. Quake angle components are more like (φ, θ, η), where φ and θ are as before. η is not the distance from the origin - instead it is the "roll" component. The easiest way to think about this is if φ is moving the mouse up and down and θ is moving the mouse left to right, then η is rotating your monitor about. Of course, you don't usually do that for a viewpoint, but for a model it might make sense to rotate it on that axis.
Arrgh, Not Greeks
#6241 posted by Preach on 2007/08/05 12:48:00
Clearly func doesn't like greek characters, lets do that again with letters
It's basically like a spherical system, but with one important difference. In the wikipedia article the three coordinates are (rho, phi, theta), and rho is the radius, or distance from the origin. Quake angle components are more like (phi, theta, eta), where phi and theta are as before. eta is not the distance from the origin - instead it is the "roll" component.
The easiest way to think about this is if phi is moving the mouse up and down and theta is moving the mouse left to right, then eta is rotating your monitor about. Of course, you don't usually do that for a viewpoint(unless you're an alien crawling on the ceiling or something), but for a model it might make sense to rotate it on that axis.
To Make
#6242 posted by aguirRe on 2007/08/05 12:54:36
it even more interesting, the pitch in the intermission mangle key is reversed to the sunmangle pitch. In intermission, a negative pitch is pointing upwards, while the same in sunmangle points downwards.
I don't remember now if the yaw is different as well in the two variants.
It wasn't meant to be easy ...
More On Q1 Entities
#6243 posted by aguirRe on 2007/08/05 13:09:00
can be found here: http://hosted.planetquake.gamespy.com/worldcraft/index2.shtm
The info_intermission seems correctly described, but I don't know about the rotate stuff. It might help to check it out, though.
|
|
You must be logged in to post in this thread.
|
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.
|
|