Inside3D!
     

Tutorial: Rotating Brush Models for QuakeWorld
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Programming Tutorials
View previous topic :: View next topic  
Author Message
avirox



Joined: 16 Aug 2006
Posts: 109

PostPosted: Fri Jan 15, 2010 12:36 pm    Post subject: Reply with quote

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]
Back to top
View user's profile Send private message
Urre



Joined: 05 Nov 2004
Posts: 1073
Location: Sweden

PostPosted: Fri Jan 15, 2010 1:07 pm    Post subject: Reply with quote

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 Razz 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 Smile I actually miss it lots.
_________________
Look out for Twigboy
Back to top
View user's profile Send private message Visit poster's website
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Fri Jan 15, 2010 1:50 pm    Post subject: Reply with quote

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.
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...
Back to top
View user's profile Send private message
goldenboy



Joined: 05 Sep 2008
Posts: 310
Location: Kiel

PostPosted: Fri Jan 15, 2010 2:19 pm    Post subject: Reply with quote

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...?
_________________
ReMakeQuake
The Realm of Blog Magic
Back to top
View user's profile Send private message
LordHavoc



Joined: 05 Nov 2004
Posts: 243
Location: western Oregon, USA

PostPosted: Fri Jan 15, 2010 2:39 pm    Post subject: Reply with quote

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 quakec code are you using for it?

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.
Back to top
View user's profile Send private message Visit poster's website
goldenboy



Joined: 05 Sep 2008
Posts: 310
Location: Kiel

PostPosted: Fri Jan 15, 2010 3:07 pm    Post subject: Reply with quote

Nevermind, I was testing it with the RMQ progs, which contains the hipnotic code...

Anyway, this:

Quote:
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"


is not user friendly. Either targetting a point entity or origin brushes would be much preferred.

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).
_________________
ReMakeQuake
The Realm of Blog Magic
Back to top
View user's profile Send private message
LordHavoc



Joined: 05 Nov 2004
Posts: 243
Location: western Oregon, USA

PostPosted: Fri Jan 15, 2010 3:11 pm    Post subject: Reply with quote

goldenboy wrote:
Nevermind, I was testing it with the RMQ progs, which contains the hipnotic code...

Anyway, this:

Quote:
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"


is not user friendly. Either targetting a point entity or origin brushes would be much preferred.

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.

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 Razz
Back to top
View user's profile Send private message Visit poster's website
goldenboy



Joined: 05 Sep 2008
Posts: 310
Location: Kiel

PostPosted: Fri Jan 15, 2010 4:18 pm    Post subject: Reply with quote

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...

Quote:
only supported if the entity's name starts with rotate_


Why? That sounds like you're exploting some existing stuff in a hacky way. Can't we take this instead

http://www.quake-1.com/docs/quakesrc.org/129.html

including the QC example, and make it work?
_________________
ReMakeQuake
The Realm of Blog Magic


Last edited by goldenboy on Fri Jan 15, 2010 4:25 pm; edited 1 time in total
Back to top
View user's profile Send private message
LordHavoc



Joined: 05 Nov 2004
Posts: 243
Location: western Oregon, USA

PostPosted: Fri Jan 15, 2010 4:24 pm    Post subject: Reply with quote

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...


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.

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 Smile
Back to top
View user's profile Send private message Visit poster's website
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Fri Jan 15, 2010 4:27 pm    Post subject: Reply with quote

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):

Code:
{
"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
}
}

_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...


Last edited by Baker on Fri Jan 15, 2010 4:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
goldenboy



Joined: 05 Sep 2008
Posts: 310
Location: Kiel

PostPosted: Fri Jan 15, 2010 4:32 pm    Post subject: Reply with quote

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.
_________________
ReMakeQuake
The Realm of Blog Magic
Back to top
View user's profile Send private message
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Fri Jan 15, 2010 4:52 pm    Post subject: Reply with quote

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.
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...


Last edited by Baker on Mon Jan 18, 2010 1:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
r00k



Joined: 13 Nov 2004
Posts: 483

PostPosted: Fri Jan 15, 2010 6:28 pm    Post subject: Reply with quote

i dont have time atm, but
void() rotator =
{
set a touch trigger,
update the nexthink,
check angle,
reset nexthink,
reset direction,
reset touch function.
}
Back to top
View user's profile Send private message
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Mon Jan 18, 2010 1:36 am    Post subject: Reply with quote

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".
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...
Back to top
View user's profile Send private message
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Mon Jan 18, 2010 1:24 pm    Post subject: Reply with quote

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
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Programming Tutorials All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 3 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group