Tutorial: Rotating Brush Models for QuakeWorld
Much as pointer entities do work essentially the same way, I kind of see it the way goldenboy does in that origin brushes really are an established standard for mappers these days. Even source engine games still rely on them, and many other engines as well. Either choice "works", but I think we should give mappers the option to choose at the very least.
[/my 2 cents]
[/my 2 cents]
I'm with you on this now, only because it's actually broken in its current form. If a compiler dev fixes their compiler to support solid rotating brushes, they might as well add origin brush support while they're at it. But that's the only reason really
Mappers need to be able to adapt as well, considering a very similar way to do things exists already. LordHavoc's compiler letting you manually specify an origin also seems a very cool way to do it, in my opinion. Remember, I'm also a mapper, that's where I started my modding career. Not only do I know how it works, I know how it feels to map
I actually miss it lots.
I was once a Quake modder
Does someone have a compiled bsp from this that works in DarkPlaces that supports this? And if so, can they post a download link?
Such a map would be a good testing tool for others to ensure proper engine support.
Such a map would be a good testing tool for others to ensure proper engine support.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
What quakec code are you using for it?goldenboy wrote:OK, when I compile my testmap (hiprot_3 with the rotate_object and info_rotate) with the new hmap2, the brush doesn't rotate and is nonsolid in DP...?
What I did was change it to a func_wall and remove the info_rotate, then I set the origin manually in the func_wall (matching the info_rotate I removed), then I set these fields:
"nextthink" "999999999"
"avelocity" "0 0 90"
And it rotates, such that I can jump onto it and ride on it a bit before falling off the other side.
Nevermind, I was testing it with the RMQ progs, which contains the hipnotic code...
Anyway, this:
Can you give me a QuakeC example entity like for example a func_rotate or something similar? Ideally, what we would end up with is an example mod (progs.dat, source, .def file and example map).
Anyway, this:
is not user friendly. Either targetting a point entity or origin brushes would be much preferred.What I did was change it to a func_wall and remove the info_rotate, then I set the origin manually in the func_wall (matching the info_rotate I removed), then I set these fields:
"nextthink" "999999999"
"avelocity" "0 0 90"
Can you give me a QuakeC example entity like for example a func_rotate or something similar? Ideally, what we would end up with is an example mod (progs.dat, source, .def file and example map).
I can not, because the hipnotic rotate code isn't solid, and you have to provide a spawn function for an entity for it to appear in the game at all, and I do not have the same spawn function here, I only tested what I could.goldenboy wrote:Nevermind, I was testing it with the RMQ progs, which contains the hipnotic code...
Anyway, this:
is not user friendly. Either targetting a point entity or origin brushes would be much preferred.What I did was change it to a func_wall and remove the info_rotate, then I set the origin manually in the func_wall (matching the info_rotate I removed), then I set these fields:
"nextthink" "999999999"
"avelocity" "0 0 90"
Can you give me a QuakeC example entity like for example a func_rotate or something similar? Ideally, what we would end up with is an example mod (progs.dat, source, .def file and example map).
The target origin retrieval is only supported if the entity's name starts with rotate_ (for example rotate_object) so it can not work without a spawn function for that custom entity, and I can't easily test that.
I test with func_wall with an origin set manually for a reason
OK. I don't really understand all this anymore, you guys might as well be speaking Suaheli. I want something that I can do in my map editor (in a painless way hopefully) that will give me a rotating door.
If you need me to do anything, just say so...
sigh...
http://www.quake-1.com/docs/quakesrc.org/129.html
including the QC example, and make it work?
If you need me to do anything, just say so...
sigh...
Why? That sounds like you're exploting some existing stuff in a hacky way. Can't we take this insteadonly supported if the entity's name starts with rotate_
http://www.quake-1.com/docs/quakesrc.org/129.html
including the QC example, and make it work?
Last edited by goldenboy on Fri Jan 15, 2010 4:25 pm, edited 1 time in total.
I was only clarifying that my test cases are different from your test cases, because you have a mod running and I do not, my test cases are to make sure that rotating brushes work, not that rotating doors work or any other higher-level concept.goldenboy wrote:OK. I don't really understand all this anymore, you guys might as well be speaking Suaheli. I want something that I can do in my map editor (in a painless way hopefully) that will give me a rotating door.
If you need me to do anything, just say so...
sigh...
Whether higher level stuff works is a matter of the QuakeC code, not the engine, and I'm judging purely on the engine side here, where I have confirmed the collisions work properly with an hmap2-compiled map.
I was saying that any further bugs need the assistance of a qc coder, not an engine debugging effort
I have a 2 YouTube videos uploading showing the object rotating in DarkPlaces and I'll upload the source example of the map and the compiled bsp.
It rotates very nicely. I can stand on it.
Map source (220 version ... need to locate Scrama's 220 version --> standard .map converter):
It rotates very nicely. I can stand on it.
Map source (220 version ... need to locate Scrama's 220 version --> standard .map converter):
Code: Select all
{
"classname" "worldspawn"
"classname" "worldspawn"
"sounds" "1"
"mapversion" "220"
"wad" "id_base.wad"
{
( -384 -384 320 ) ( -384 448 320 ) ( 384 448 320 ) plat_top3 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -384 448 288 ) ( -384 448 320 ) ( -384 -384 320 ) plat_top3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 384 -384 288 ) ( 384 -384 320 ) ( 384 448 320 ) plat_top3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 384 448 288 ) ( 384 448 320 ) ( -384 448 320 ) plat_top3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -384 -384 288 ) ( -384 -384 320 ) ( 384 -384 320 ) plat_top3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -384 448 288 ) ( -384 -384 288 ) ( 384 -384 288 ) plat_top3 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
}
{
( -384 448 -320 ) ( -384 -384 -320 ) ( 384 -384 -320 ) plat_top3 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -384 -384 -288 ) ( -384 -384 -320 ) ( -384 448 -320 ) plat_top3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 384 448 -288 ) ( 384 448 -320 ) ( 384 -384 -320 ) plat_top3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -384 448 -288 ) ( -384 448 -320 ) ( 384 448 -320 ) plat_top3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 384 -384 -288 ) ( 384 -384 -320 ) ( -384 -384 -320 ) plat_top3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -384 -384 -288 ) ( -384 448 -288 ) ( 384 448 -288 ) plat_top3 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
}
{
( -384 -384 288 ) ( -384 -384 -288 ) ( -384 448 -288 ) plat_top3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -384 448 288 ) ( -384 448 -288 ) ( -352 448 -288 ) plat_top3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -352 -384 -288 ) ( -384 -384 -288 ) ( -384 -384 288 ) plat_top3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -384 -384 288 ) ( -384 448 288 ) ( -352 448 288 ) plat_top3 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -384 448 -288 ) ( -384 -384 -288 ) ( -352 -384 -288 ) plat_top3 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -352 448 288 ) ( -352 448 -288 ) ( -352 -384 -288 ) plat_top3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
{
( 384 448 288 ) ( 384 448 -288 ) ( 384 -384 -288 ) plat_top3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 352 448 -288 ) ( 384 448 -288 ) ( 384 448 288 ) plat_top3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 384 -384 288 ) ( 384 -384 -288 ) ( 352 -384 -288 ) plat_top3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 352 448 288 ) ( 384 448 288 ) ( 384 -384 288 ) plat_top3 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( 352 -384 -288 ) ( 384 -384 -288 ) ( 384 448 -288 ) plat_top3 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( 352 -384 288 ) ( 352 -384 -288 ) ( 352 448 -288 ) plat_top3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
{
( -352 448 -288 ) ( 352 448 -288 ) ( 352 448 288 ) plat_top3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -352 416 288 ) ( -352 448 288 ) ( 352 448 288 ) plat_top3 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( 352 448 -288 ) ( -352 448 -288 ) ( -352 416 -288 ) plat_top3 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -352 416 -288 ) ( -352 448 -288 ) ( -352 448 288 ) plat_top3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 352 448 288 ) ( 352 448 -288 ) ( 352 416 -288 ) plat_top3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 352 416 -288 ) ( -352 416 -288 ) ( -352 416 288 ) plat_top3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
{
( 352 -384 -288 ) ( -352 -384 -288 ) ( -352 -384 288 ) plat_top3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 352 -384 288 ) ( -352 -384 288 ) ( -352 -352 288 ) plat_top3 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -352 -352 -288 ) ( -352 -384 -288 ) ( 352 -384 -288 ) plat_top3 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -352 -384 288 ) ( -352 -384 -288 ) ( -352 -352 -288 ) plat_top3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 352 -352 -288 ) ( 352 -384 -288 ) ( 352 -384 288 ) plat_top3 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( -352 -352 -288 ) ( 352 -352 -288 ) ( 352 -352 288 ) plat_top3 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
}
{
"classname" "info_player_start"
"origin" "-256 -224 -192"
}
{
"classname" "func_wall"
"targetname" "rotator"
"nextthink" "999999999"
"avelocity" "0 90 0"
"origin" "0 0 0"
{
( -128 32 64 ) ( 128 32 64 ) ( 128 -32 64 ) cliff2_8 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -128 -32 -64 ) ( 128 -32 -64 ) ( 128 32 -64 ) cliff2_8 [ 1 0 0 0 ] [ 0 -1 0 0 ] 0 1 1
( -128 32 64 ) ( -128 -32 64 ) ( -128 -32 -64 ) cliff2_8 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 128 32 -64 ) ( 128 -32 -64 ) ( 128 -32 64 ) cliff2_8 [ 0 1 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 128 32 64 ) ( -128 32 64 ) ( -128 32 -64 ) cliff2_8 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
( 128 -32 -64 ) ( -128 -32 -64 ) ( -128 -32 64 ) cliff2_8 [ 1 0 0 0 ] [ 0 0 -1 0 ] 0 1 1
}
}
Last edited by Baker on Fri Jan 15, 2010 4:32 pm, edited 1 time in total.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Lord Havoc, I don't have to test using the RMQ mod. I accidentally did that out of habit. xavior, do you have some QC that I could plug into a mod to get rotating brushes working using a point entity to get the origin? Because that seems closest to what I need.
Baker: That is basically what LordHavoc said just more complicated, and I know that brushes rotate in DP in principle. I have a vid, too.
Baker: That is basically what LordHavoc said just more complicated, and I know that brushes rotate in DP in principle. I have a vid, too.
YouTube video (It's only 4 seconds long):
http://www.youtube.com/watch?v=Bke3wPWsH38
rotate.map + hmap2.exe + rotate.bsp: download (Works with a current version of DarkPlaces)
@gb: I hear you. I'm just doing what I can to help advance this. I'm not Mr. QuakeC. Note: from the video you'll see the brush is quite solid, in an older version of DP it wasn't solid.
http://www.youtube.com/watch?v=Bke3wPWsH38
rotate.map + hmap2.exe + rotate.bsp: download (Works with a current version of DarkPlaces)
@gb: I hear you. I'm just doing what I can to help advance this. I'm not Mr. QuakeC. Note: from the video you'll see the brush is quite solid, in an older version of DP it wasn't solid.
Last edited by Baker on Mon Jan 18, 2010 1:19 pm, edited 1 time in total.
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Origin brush support is essentially having a brush in the world with the special name "origin" and then upon compile, that brush gets removed from the world and any entities targetted that entity get the center of that brush as an "origin" field.
Correct?
So LordHavoc sort of bypassed everything and went straight to the end result. Am I right so far?
Am thinking about taking a crack at adding this to aguirRe's txqbsp tomorrow if the time required is under 2 hours. I've done past homework on this, but maybe the difference might be this time is that I know more than before (I hope) and things are "sinking in".
Correct?
So LordHavoc sort of bypassed everything and went straight to the end result. Am I right so far?
Am thinking about taking a crack at adding this to aguirRe's txqbsp tomorrow if the time required is under 2 hours. I've done past homework on this, but maybe the difference might be this time is that I know more than before (I hope) and things are "sinking in".
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
FitzQuake085 with rotating brush support: download
Sample rotating object (rotate.bsp and rotate.map compiled with LordHavoc's new version of hmap2): download
Rotation support (avelocity) added from this tutorial:
http://www.quake-1.com/docs/quakesrc.org/129.html
Sample rotating object (rotate.bsp and rotate.map compiled with LordHavoc's new version of hmap2): download
Rotation support (avelocity) added from this tutorial:
http://www.quake-1.com/docs/quakesrc.org/129.html
The night is young. How else can I annoy the world before sunsrise?
Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..