True Rotation DP/TXQBSP

Discuss the construction of maps and the tools to create maps for 3D games.
Ghost_Fang
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

True Rotation DP/TXQBSP

Post by Ghost_Fang »

I've been reading around and I found that darkplaces does true rotation without any QC, and have tried it myself and alas it worked, but I can't see to figure out how to set the origin of the rotation, its defaulting to the world's origin. Is it an origin brush? point entity? a brush with a certain name? All i want is a continually rotating entity with collision, nothing fancy
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Re: True Rotation DP/TXQBSP

Post by qbism »

If it follows Hipnotic, a func_rotate_entity targets an info_rotate.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: True Rotation DP/TXQBSP

Post by Baker »

Make a func_wall entity in your favorite map editor.

Add a field to that entity "avelocity" "0 15 0" (0 degrees of X rotation, 15 degrees of Y rotation, 0 degrees of Z rotation)

Compile. Start the map in a rotation supporting engine like DarkPlaces.

The wall will rotate 15 degrees per second on the Y axis.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Ghost_Fang
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Re: True Rotation DP/TXQBSP

Post by Ghost_Fang »

I knew that much, but the object's center of rotation defaults to the map's center/origin.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: True Rotation DP/TXQBSP

Post by Baker »

Oops ...

Forgot to add: must use either LordHavoc's hmap2 compiler or MH's BSP2 map compiler.

I think bsp2 is based off txqbsp, but not sure if it can make a standard Quake .bsp (BSP 29). RemakeQuake uses some helper point entity and might not require special map compiling --- in fact I don't think it does. But the avelocity thing by itself won't work without special map compilation.

Hmmmm.

[Consider this response "incomplete" with some margin of error ...]
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: True Rotation DP/TXQBSP

Post by Baker »

Ok more info ... the bsp2 compiler makes note of specially named entities:
golden boy wrote:"You can use non-hmap2 qbsp compilers for certain things, such as when you insert external bsp models as a rotate_continuous_model into a treeqbsp-compiled map. The rotating cogs in e1m6rq are external bsps, compiled with hmap2, while the main map is compiled with treeqbsp, actually."
Well ... let's see if MH or one the Remake Quake guys comment, I've not compiled using their mapping tools yet but the read me seems to indicate only support for bsp2 format.

For certain, using hmap2 compiler instead of txqbsp would work: http://icculus.org/twilight/darkplaces/ ... 100113.zip
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Re: True Rotation DP/TXQBSP

Post by mh »

The RMQ version of Tx can only output a BSP2 format map, yes. This was a deliberate decision made to simplify the porting job. I have some info from LordHavoc on the changes made to the compiler to support true rotation, but it might take me some time to dig it up. Alternatively you could just do a diff with the original Tx source and find out what's needed (a lot of the results will also be BSP2 stuff but that's easily identifiable). If memory serves the two compilers had each diverged sufficiently from the original source that I needed to lift over fairly large chunks of code, rather than just doing a few tweaks here and there (the fact that QBSP code is incredibly alien to me didn't help - I expect that someone who knows their way around it would have done a much better job).

hmap2 would work just as well. gb was actually using hmap2 up until fairly late in the transition phase, when it started getting stack overflows due to too many recursions caused by map sizes. That normally won't be a problem unless you're doing stupidly huge maps that overflow 3, 4, 5 or more of the standard Quake limits.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Re: True Rotation DP/TXQBSP

Post by goldenboy »

You need to set the origin on your rotating bmodel-entity somehow. Doing this without QC is very hackish and I cannot help you with it. RemakeQuake provides proper QC to do this (rotate_door and rotate_continuous), if you don't want QC I can't really help you.

RMQ uses rotating entities whose name starts with "rotate_" and who target an info_null to get their origin. This method works in DP, FTE and RMQe and it also works with the normal version of hmap2 as well as the BSP2 compilers. Just tested it.

This works because of a hack that is present in all compilers since Scourge of Armagon. Hiprotate uses this very method to get a rotating entity's origin and RMQ uses it as a hook to do its own thing.

To make it very clear: The following compilers support true rotation of bmodels (using avelocity):

- hmap2
- hmap2BSP2
- TxQBSP2

The problem is that the compiler hack to set the origin via target doesn't work for func_wall or anything that's not called rotate_something (and here is where you would want to use QC).

Maybe Spike or LH can tell you how to do it with a func_wall without QC. ISTR that it came up on this forum before, and I remember I had it working myself once, so using the search function might actually result in something useful.
Ghost_Fang
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Re: True Rotation DP/TXQBSP

Post by Ghost_Fang »

Well It would have been nice to avoid QC, but if it the cleanest way of doing it is with QC then thats fine too. For some odd reason though LordHavoc's hmap2 makes my Worldcraft crash. I set hmap2 for CSG and BSP, did I do that wrong? Also is there a way to have the rotating object always push the player? It may be because of my compiler, but if I have a large rotating object, lets say for example the large fan in Zanzibar (halo2) or Last Resort (halo3) that kind of rotation, and if I stand under it the whole thing stops instead of pushing me. Is there a way to fix that? I want my rotating object to stop for nothing.
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Re: True Rotation DP/TXQBSP

Post by goldenboy »

Depends on how you achieve your rotation.

rotate_continuous in rmq does push the player and stops for nothing. It squishes the player if necessary (if player would otherwise block the movement). rotate_door reverses upon being blocked.

http://kneedeepinthedoomed.wordpress.com/downloads/

See under "rotating entities testmod".
Ghost_Fang
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Re: True Rotation DP/TXQBSP

Post by Ghost_Fang »

To do this properly, I know I'd have to do some QC, not sure why I would want to avoid that. My idea is a large fan as seen in Halo 2 and 3 Zanzibar/Last Resort. Insta-killing the player would ruin the gameplay just a bit in my opinion. The Halo fan blade always pushes the player and won't kill them. Is there some sort of map trick or QC method I could do to achieve this? I used rotate_continuous but took out the damage when blocked.
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Re: True Rotation DP/TXQBSP

Post by goldenboy »

Yeah, you can make the blocked behaviour dependant on a spawnflag I guess. if self.spawnflags & NOCRUSH self-blocked = rot_crush, or thereabouts. Just look how the other spawnflags are implemented.
Ghost_Fang
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Re: True Rotation DP/TXQBSP

Post by Ghost_Fang »

Well thats not my problem. I just didn't put a blocked function for it, my only problem is the player can block/stop the fan blade. I want to know if there is a way (im even content with a hacky one) that would ALWAYS push the player just like Halo 3's wheel. I might try to combine avelocity rotation in combination with Hipnotic's func_movewalls so theres that extra wall that will push the player, when the the fanblade fails to.
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Re: True Rotation DP/TXQBSP

Post by goldenboy »

rotate_continuous in RMQ *does* always push the player, unless they get caught between the rotating object and an immovable brush. In this case, the rotating object wins.
Ghost_Fang
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Re: True Rotation DP/TXQBSP

Post by Ghost_Fang »

Yea, thats just it, I don't want a winner/loser lol, I just want the fan to go "I not stopping for anyone! move along!" lol
Post Reply