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.
Rotate
#6244 posted by Mike Woodham on 2007/08/05 13:30:59
"Now for a func_rotate_entity, you must give it a "rotate" key and set its value to three integers,
"0 -90 0" for example, which will make it roatate clockwise along the Z axis at 90 degrees/second. You
can set it to rotate around all the axis too, and to make it rotate the other way, just add/remove a -."
It's Only Wrong If...
#6245 posted by Mike Woodham on 2007/08/05 13:37:14
... you say "x,y,z". If you say "x,z,y", it's fine.
Again, from czg's tutorial, "...and 'angles' '0 90 -180' will make a door that rotates 90 degrees counterclockwise on the Z axis, and 180 degrees clockwise on the Y axis. Of course set it to whatever suits your needs."
#6246 posted by golden_boy on 2007/08/05 16:22:12
Yup. I thought it meant "x,y z axis."
My head hurts. I guess I'm more the trial-and-error type. I have a good idea how to make it behave like I want now.
Sadly a rotate_entity seems not to get lit by dynamic lights. Makes it look a bit funny. Oh well, just don't give the player rockets then... but then you have deathmatch, where people are going to want rockets... right now, my cool fan looks stupid when hit by a dynamic light (flashlight.) i.e. nothing happens... I'll just tell player to not ever point it upwards... :/
would a func_movewall (or whatever the collison detection thing was) fix the dynamic light issue?
No Dynamic Lighting
#6247 posted by ijed on 2007/08/05 16:46:05
The movewall works pretty crappy as well - and feels messy to use since you're making a bunch of clip brushes linked to the rotatable.
Having said that I doubt anyone will notice that the lighting is off if you set it up right.
The way I'd do it is to put a pointlight with delay 4 in the centre of the fan with a very low light factor, just higher than your minlight - assuming the fan isn't in a vertical shaft with sunlight coming down.
Delay 4 changes the attenuation of the light to be a local minlight - a delay of 2 could work as well since it increases the range of the light whilst making if fade more softly as well.
I'm not sure about this but you could also move the model away from the point entities and put it in it own little room (somewhere the player will never get to to) and light it there. Then, in theory, it will snap back to its target point (info_rotate) on map startup . . . I have no idea if that will work - maybe its asking too much (ie, a bone).
Just a case of messing with it until it works - even more trial and error ;)
|