Urban Terror Forums: Circular stairway tool - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
  • (5 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5
  • You cannot start a new topic
  • You cannot reply to this topic

Circular stairway tool Rate Topic: -----

Updated to also do: regular stairs and basic rails, arcs, and holes.

#21 User is offline   Rocket Icon

  • Account: rocket
  • Main tag: RS|
  • Country:
  • Joined: 28-February 10
  • Posts: 267

Posted 21 August 2010 - 02:58 AM

I agree null, but not everyone has the know-how to do that. I stuffed up so many times with gmax (shudder) that I actually built a handrail in gtk. Doesn't look too bad if I do say so myself (for a gtk handrail anyway xD).
Posted ImagePosted Image

#22 User is offline   johe Icon

  • Account: johe
  • Country:
  • Joined: 24-August 10
  • Posts: 1

Posted 24 August 2010 - 05:02 PM

View PostDrewfin, on 18 August 2010 - 04:04 PM, said:

I built a little app to create circular stairways for a map I was working on, and despite not being a programmer it seems to be pretty stable, so I figured I'd put it out there in case anyone else could find a use for it.

It's a single Windows executable that generates a .map file that can be imported, the only big pre-req should be having the .NET 2.0 framework installed.

Download

Posted Image


Hi there Drewfin, very thanks for the software, i very interesting in make my ouw software to create .map in .net, can you tel me how you do the stair generator, or how can i make a map generator in .net?
Sorry for my english, i'm from colombia.

#23 User is offline   Drewfin Icon

  • Account: drewfin
  • Country:
  • Joined: 26-April 10
  • Posts: 107

Posted 24 August 2010 - 07:32 PM

View Postjohe, on 24 August 2010 - 05:02 PM, said:

Hi there Drewfin, very thanks for the software, i very interesting in make my ouw software to create .map in .net, can you tel me how you do the stair generator, or how can i make a map generator in .net?
Sorry for my english, i'm from colombia.



The hardest part (at least for me) was understanding the .map file format, and how it defines a brush using planes. The only two places I found that had any kind of useful description are these:

http://www.gamers.or...P/qmapspec.html
http://www.modsonwik..._Format#Brushes

Once you know how to make a brush, you just have to figure out whatever math it takes to define the brushes you want to make, and build a plain text file to the .map format.

You (and anyone else) is welcome to use my source code if it help you get started, although I can't promise it's well commented or particularly well-formed code. I've uploaded it here:

Download Q3StairGen Source

I used SharpDevelop to write this code, but it should open fine in comperable versions of Visual Studio as well.

#24 User is offline   Drewfin Icon

  • Account: drewfin
  • Country:
  • Joined: 26-April 10
  • Posts: 107

Posted 24 August 2010 - 08:18 PM

Also, I am working on an updated version that will do both spiral and normal stairs plus some very basic handrail support. Most of the hard work is done, so I should be able to have that up in the next few days. I rewrote some things to make the code more modular, and built some room to grow into the interface in case we come up with any other useful structures to be added in the future.

Posted Image


bullet_loaderAdvertisement

#26 User is offline   Rylius Icon

  • Account: rylius
  • Main tag: CMM|
  • Country:
  • Joined: 28-February 10
  • Posts: 446

Posted 25 August 2010 - 11:28 AM

Thanks for posting the sources, I'm nearly finished porting it to Java. :p
I have some nasty bug tho, the brushes don't show up in Radiant. No parsing errors or the like, just invalid planes :/

Can't check with a map from the original executable, cause it throws some strange errors at me.
Those are Wine-related, somewhat it can't set the window icon. LOL.
So I'd appreciate it if somewhat could post a generated .map with the default settings. Thanks in adance :)

#27 User is offline   Drewfin Icon

  • Account: drewfin
  • Country:
  • Joined: 26-April 10
  • Posts: 107

Posted 25 August 2010 - 03:12 PM

View PostRylius, on 25 August 2010 - 11:28 AM, said:

So I'd appreciate it if somewhat could post a generated .map with the default settings. Thanks in adance :)


Here's the output without changing any settings:


// entity 0
{
"classname" "worldspawn"
// brush 0
{
( 98 237 16 ) ( 24 59 16 ) ( 0 256 16 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 98 237 16 ) ( 98 237 0 ) ( 24 59 16 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 98 237 16 ) ( 0 256 16 ) ( 98 237 0 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 0 64 0 ) ( 0 256 16 ) ( 0 64 16 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 0 64 0 ) ( 0 64 16 ) ( 24 59 0 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 0 64 0 ) ( 24 59 0 ) ( 0 256 0 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 24 59 16 ) ( 98 237 16 ) ( 0 64 0 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 0 256 0 ) ( 0 64 0 ) ( 98 237 16 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
}
// brush 1
{
( 181 181 32 ) ( 45 45 32 ) ( 98 237 32 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 181 181 32 ) ( 181 181 16 ) ( 45 45 32 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 181 181 32 ) ( 98 237 32 ) ( 181 181 16 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 24 59 16 ) ( 98 237 32 ) ( 24 59 32 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 24 59 16 ) ( 24 59 32 ) ( 45 45 16 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 24 59 16 ) ( 45 45 16 ) ( 98 237 16 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 45 45 32 ) ( 181 181 32 ) ( 24 59 16 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 98 237 16 ) ( 24 59 16 ) ( 181 181 32 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
}
// brush 2
{
( 237 98 48 ) ( 59 24 48 ) ( 181 181 48 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 237 98 48 ) ( 237 98 32 ) ( 59 24 48 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 237 98 48 ) ( 181 181 48 ) ( 237 98 32 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 45 45 32 ) ( 181 181 48 ) ( 45 45 48 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 45 45 32 ) ( 45 45 48 ) ( 59 24 32 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 45 45 32 ) ( 59 24 32 ) ( 181 181 32 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 59 24 48 ) ( 237 98 48 ) ( 45 45 32 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 181 181 32 ) ( 45 45 32 ) ( 237 98 48 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
}
// brush 3
{
( 256 0 64 ) ( 64 0 64 ) ( 237 98 64 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 256 0 64 ) ( 256 0 48 ) ( 64 0 64 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 256 0 64 ) ( 237 98 64 ) ( 256 0 48 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 59 24 48 ) ( 237 98 64 ) ( 59 24 64 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 59 24 48 ) ( 59 24 64 ) ( 64 0 48 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 59 24 48 ) ( 64 0 48 ) ( 237 98 48 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 64 0 64 ) ( 256 0 64 ) ( 59 24 48 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
( 237 98 48 ) ( 59 24 48 ) ( 256 0 64 ) common/caulk 0 0 0 0.5 0.5 134217728 0 0
}

}



#28 User is offline   Drewfin Icon

  • Account: drewfin
  • Country:
  • Joined: 26-April 10
  • Posts: 107

Posted 25 August 2010 - 05:17 PM

I have zipped up the new version and uploaded it in place of the old one (link in first post.) I've done a fair amount of testing with it, but I'd put it firmly in the 'beta' zone, as the additional complexity means there are almost certainly situations that will cause unplanned results. If you manage to crash it or find any combinations that turn out janky, try to reproduce the problem and let me know exactly what settings you used, and I'll see what I can do to fix it.

Known issues:

- Bannister type rails are super basic. I've done you the favor of positioning them, so if you want to replace them with something fancier, go for it, but I probably won't put in the effort of making super-specific parts. As mentioned earlier, if you want to get crazy, it's probably time to work in a modelling tool.

- Spiral Bannister uprights may not touch the underside of the rails at the back, particularaly when the stairs are very steep. I may try to fake in a better fit at some point, but then again maybe not. If it bugs you you can extend the uprights and do some cuts (CSG subtract might work.)

- Spiral Bannister uprights are not rotated to the angle of the step. I'm working mostly in integers, and since I'm using pure C# without a built-in vector class, my vector math is all manual. Again, I may address, but I also may not.


If anyone has any adiitional semi-primitive 'cookie cutter' type strutures that they would like added to the tool (and that isn't already covered by Rambetter's tool or Radiant/an existing plugin) let me know.

#29 User is offline   Drewfin Icon

  • Account: drewfin
  • Country:
  • Joined: 26-April 10
  • Posts: 107

Posted 29 August 2010 - 08:36 PM

Another minor update, primarily to streamline my own usage. I added an arc generator, and changed the default output file name depending on the structure being generated. I also changed the labels where I was incorrectly using 'diameter' instead of 'radius'.

#30 User is offline   Kolossus Icon

  • Account: kolossus
  • Joined: 28-September 10
  • Posts: 386

Posted 14 October 2010 - 02:04 PM

This tool is fantastic! :D A question: how come some bannisters/hand rails disappear? It's a minor problem though, thanks for this wonderful thing :D

  • (5 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 5
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942