Forum

origin brush and qc

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

origin brush and qc

Postby Nahuel » Sun Apr 08, 2018 7:13 pm

hello forum, I'm using darkplaces and the easiest way to rotate a solid brush is to create a solid bsp func_wall and assign it some avelocity. this is very simple in q3bsp because i can use a brush origin inside the func_wall with the shader commonly called common/origin. AFAIK in q1bsp there is no way to create a origin brush (i don't intend to use hmap to compile the q1bsp). i have seen the q3bsp compiled and apparently the common/origin changes the place of the func_wall brush in the bsp but assigns it a different "origin" value. What is the way to do this with only qc? My idea is to assign a pivot manually ( or info_pivot) if the pivot is not present to assign the origin of the func_ to the middle of it (absmin + absmax * 0.5). Thank you very much :)
hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 483
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: origin brush and qc

Postby Baker » Sun Apr 08, 2018 10:03 pm

Nahuel wrote:hello forum, I'm using darkplaces and the easiest way to rotate a solid brush is to create a solid bsp func_wall and assign it some avelocity. this is very simple in q3bsp because i can use a brush origin inside the func_wall with the shader commonly called common/origin. AFAIK in q1bsp there is no way to create a origin brush (i don't intend to use hmap to compile the q1bsp). i have seen the q3bsp compiled and apparently the common/origin changes the place of the func_wall brush in the bsp but assigns it a different "origin" value. What is the way to do this with only qc? My idea is to assign a pivot manually ( or info_pivot) if the pivot is not present to assign the origin of the func_ to the middle of it (absmin + absmax * 0.5). Thank you very much :)


Suggested alternative place to post this:

http://celephais.net/board/view_thread.php?id=61542

Reason: To do this in Q1 you will need a supporting map compiler that supports rotation. ericw's tools do support rotation. You can't even consider doing this without the right tools first. Brushes in Q1 use one of the corners as the origin, this is hostile to rotation --- you must use a map compiler that will set the origin to the middle of the brush for brush model entities that you wish to be able to rotate.
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 ..
User avatar
Baker
 
Posts: 3659
Joined: Tue Mar 14, 2006 5:15 am

Re: origin brush and qc

Postby Spike » Mon Apr 09, 2018 9:44 am

ewicw's tools should support origin brushes. you'll still need a wad that provides an otherwise-useless texture in order to place them in your editor though.
make sure your origin brush is axially aligned etc, just in case.

you can then set avelocity and a nice big nextthink, and the brush entity should start spinning.

when it comes to rotation, anything regarding corners is mod-specific and stupid, and thus completely irrelevant for anyone targeting anything other than hipnotic. anyone sane will pretend that nightmare never happened (at least from a technical perspective anyway). this stuff has nothing to do with the engine and everything to do with outdated+shit map compilers.
yes, I'm aware that func_train aligns path nodes to the corners. this makes sense only when there's no random rotation stuff, where you can't change the actual pivot, and where the train is expected to be just a axial cuboid anyway, basically where the corner is better defined than the 'pivot'.
Spike
 
Posts: 2872
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: origin brush and qc

Postby frag.machine » Mon Apr 09, 2018 11:27 am

Hello Nahuel,
If you are using a custom qc an easy way is to add support for a func_bsp entity in your code and then set the model property to an external bsp model. With a separate bsp besides the obvious greater control you have over the bsp origin you can also handle light better and reuse the same model across different areas and maps (rotating doors come to mind). And of course you don't need specially modified tools (a map editor that allows you to add new keys to the entities is enough).
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2052
Joined: Sat Nov 25, 2006 1:49 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest