Forum

Page 1 of 1

origin brush and qc

PostPosted: Sun Apr 08, 2018 7:13 pm
by Nahuel
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 :)

Re: origin brush and qc

PostPosted: Sun Apr 08, 2018 10:03 pm
by Baker
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.

Re: origin brush and qc

PostPosted: Mon Apr 09, 2018 9:44 am
by Spike
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'.

Re: origin brush and qc

PostPosted: Mon Apr 09, 2018 11:27 am
by frag.machine
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).