Page 1 of 2

I need help making a .AAS file on Mac.

Posted: Sun Oct 31, 2010 1:37 pm
by gooball :D
Hey, I am running MackBook Pro s.4 GHz Intel Core 2 Duo (lol i don't even know what that means)
and I need help making a .AAS file. Can someone please tell me a program that I can use THAT WORKS?

-Thanks :)


:q3:

Re: I need help making a .AAS file on Mac.

Posted: Sun Oct 31, 2010 4:54 pm
by obsidian
Install Windows on your Mac either through Boot Camp or some other type of virtual machine, like Parallels, VMware or VirtualBox.

You can also give NetRadiant a try, they have OS X binaries:
http://www.icculus.org/netradiant/files/

Re: I need help making a .AAS file on Mac.

Posted: Sun Oct 31, 2010 7:27 pm
by MKJ
gtkradiant 1.5 for macos
http://mac.rbytes.net/cat/mac/games/gtkradiant/#

would that help?

Re: I need help making a .AAS file on Mac.

Posted: Mon Nov 01, 2010 7:25 am
by Eraser
Well, all he really needs is a Mac version of bspc.exe, if such a thing exists. I guess it comes in the GtkRadiant for Mac bundle. So in that case, yea, that would help.

Re: I need help making a .AAS file on Mac.

Posted: Sat Nov 06, 2010 4:45 am
by VolumetricSteve
I tried working through the same problem, not only did I never get gtkradiant to work on any mac I owned, but NetRadiant (which I lovingly refer to as the "good" radiant) doesn't seem to come with any bspc type thing for mac.

As far as I can tell, no one cared to port it because of one error that came up when compiling BSPC in non-windows environments. I'd call them lazy, but I didn't fix it either so...whatevs...

what I did do, was take bspc.exe, and wrap it up tight in a WineSkin Wrapper, and very carefully monitored its log files while I forced it to run from the "run" prompt (no matter what they tell you, CMD does not run from wineskin)....it did work...it produced .aas files and I never had to boot into windows, but it was.......it sucked. Just map in windows, *all* of the tools work better in windows, and I do mean all of them. At least in my experience, anyway.

I wanted (so badly) to have an OS X quake 3 mapping workstation, but...all of the software is awful/or non-existant and not worth the trouble. I almost got to the point of making my own OSXradiant but....it was just so much easier to install windows..and...be done with it, as sad as that is.

If you want a step-by-step guide as to how I went totally nuts and forced bspc to work inside OS X, i'd be happy to post those steps here if you'd like. Until then, good luck.

Re: I need help making a .AAS file on Mac.

Posted: Sat Nov 06, 2010 10:22 am
by ^misantropia^
bspc compiles and runs on linux. Why wouldn't the same be true for OS X?

Re: I need help making a .AAS file on Mac.

Posted: Sat Nov 06, 2010 3:34 pm
by MKJ
^misantropia^ wrote:bspc compiles and runs on linux. Why wouldn't the same be true for OS X?
what i was thinking

Re: I need help making a .AAS file on Mac.

Posted: Sat Nov 06, 2010 5:19 pm
by VolumetricSteve
I thought the same thing too, but isn't it odd that it hasn't been done? I'm sure someone could do it, but I read somewhere that one person who tried got an error they seemed to think was insurmountable, and promptly gave up. So I thought "fine...whatever...wineskin it is" which worked...well enough I guess, I was able to release a bunch of my maps that way.

Re: I need help making a .AAS file on Mac.

Posted: Sat Nov 06, 2010 7:56 pm
by ^misantropia^
I'll see if I can get bspc to compile in standalone mode. Someone here with a Mac willing to give it a shot?

Re: I need help making a .AAS file on Mac.

Posted: Sat Nov 06, 2010 8:45 pm
by VolumetricSteve
Mac user standing by.

both PPC(10.4) and Intel(10.5 and 10.6)

Re: I need help making a .AAS file on Mac.

Posted: Sat Nov 06, 2010 9:03 pm
by ^misantropia^
https://github.com/bnoordhuis/bspc

You can either clone the repository with git or download the source tarball, then build it with `make`. Let me know if your run into issues.

Re: I need help making a .AAS file on Mac.

Posted: Sat Nov 06, 2010 9:12 pm
by VolumetricSteve
I used terminal to get into the directory of the tarball I downloaded

from there, i ran make..and this happened:

gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o _files.o -c _files.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o aas_areamerging.o -c aas_areamerging.c
In file included from aas_areamerging.c:23:
qbsp.h:27:20: error: malloc.h: No such file or directory
make: *** [aas_areamerging.o] Error 1

what did I do wrong?

Re: I need help making a .AAS file on Mac.

Posted: Sat Nov 06, 2010 9:30 pm
by ^misantropia^
Nothing, bspc did something non-standard. Fixed, could you try it again?

Re: I need help making a .AAS file on Mac.

Posted: Sat Nov 06, 2010 9:38 pm
by VolumetricSteve
make
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o _files.o -c _files.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o aas_areamerging.o -c aas_areamerging.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o aas_cfg.o -c aas_cfg.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o aas_create.o -c aas_create.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o aas_edgemelting.o -c aas_edgemelting.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o aas_facemerging.o -c aas_facemerging.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o aas_file.o -c aas_file.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o aas_gsubdiv.o -c aas_gsubdiv.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o aas_map.o -c aas_map.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o aas_prunenodes.o -c aas_prunenodes.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o aas_store.o -c aas_store.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o be_aas_bspc.o -c be_aas_bspc.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o deps/botlib/be_aas_bspq3.o -c deps/botlib/be_aas_bspq3.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o deps/botlib/be_aas_cluster.o -c deps/botlib/be_aas_cluster.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o deps/botlib/be_aas_move.o -c deps/botlib/be_aas_move.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o deps/botlib/be_aas_optimize.o -c deps/botlib/be_aas_optimize.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o deps/botlib/be_aas_reach.o -c deps/botlib/be_aas_reach.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o deps/botlib/be_aas_sample.o -c deps/botlib/be_aas_sample.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o brushbsp.o -c brushbsp.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o bspc.o -c bspc.c
gcc -Dstricmp=strcasecmp -DMAC_STATIC= -DQDECL= -DCom_Memcpy=memcpy -DCom_Memset=memset -I. -Ideps -O3 -ffast-math -DLINUX -DBSPC -o deps/qcommon/cm_load.o -c deps/qcommon/cm_load.c
deps/qcommon/cm_load.c:28:30: error: ../bspc/l_qfiles.h: No such file or directory
deps/qcommon/cm_load.c: In function ‘CM_LoadMap’:
deps/qcommon/cm_load.c:611: error: ‘quakefile_t’ undeclared (first use in this function)
deps/qcommon/cm_load.c:611: error: (Each undeclared identifier is reported only once
deps/qcommon/cm_load.c:611: error: for each function it appears in.)
deps/qcommon/cm_load.c:611: error: syntax error before ‘)’ token
make: *** [deps/qcommon/cm_load.o] Error 1

Re: I need help making a .AAS file on Mac.

Posted: Sat Nov 06, 2010 9:51 pm
by ^misantropia^
Fixed. One more try please?

Re: I need help making a .AAS file on Mac.

Posted: Sat Nov 06, 2010 10:09 pm
by VolumetricSteve
Call me a monkey's uncle....I think you've done it.


BSPC version 2.1h, Nov 6 2010 18:06:59
Usage: bspc [-<switch> [-<switch> ...]]
Example 1: bspc -bsp2aas /quake3/baseq3/maps/mymap?.bsp
Example 2: bspc -bsp2aas /quake3/baseq3/pak0.pk3/maps/q3dm*.bsp

Switches:
bsp2aas <[pakfilter/]filter.bsp> = convert BSP to AAS
reach <filter.bsp> = compute reachability & clusters
cluster <filter.aas> = compute clusters
aasopt <filter.aas> = optimize aas file
aasinfo <filter.aas> = show AAS file info
output <output path> = set output path
threads <X> = set number of threads to X
cfg <filename> = use this cfg file
optimize = enable optimization
noverbose = disable verbose output
breadthfirst = breadth first bsp building
nobrushmerge = don't merge brushes
noliquids = don't write liquids to map
freetree = free the bsp tree
nocsg = disables brush chopping
forcesidesvisible = force all sides to be visible
grapplereach = calculate grapple reachabilities

BSPC run time is 0 seconds
Closed log bspc.log



Get yourself a drink, you've earned it.

**edit

is the first version of bspc for os x...ever....running on my laptop?
(note the 6th of November, 2010 6:06:59 pm eastern standard time)
a mere 11 or so years after the game for which is was intended came out?

**re-edit

Can I mirror the latest tarball on my website? This code should really be circulated, I keep bumping into mac users that wanna put bots in their levels.

Until I get permission, I'll just link back to this thread.


**extra-re-edit

so I've been rebuilding the aas file from my bsp of razztazzmagoria, which, admittedly is a pretty complex map, but....

well, here's what bspc is doing so far:

Code: Select all

BSPC version 2.1h, Nov  6 2010 18:06:59
bsp2aas: razztazzmagoria.bsp to razztazzmagoria.aas
-- Q3_LoadMapFromBSP --
Loading map from razztazzmagoria.bsp...
100932 triangles
     0 patch tris
creating planar surface planes...
searching visible brush sides...
25405913rush sides
note how the number of brush sides got so big it covered the 'b'

how on earth do 100K triangles pump out 25,405,913 brush sides?

as of this writing, it's 27 million and rising.

have I created a beast that can not be fed or....is the bspc code just stuck in a loop it's not breaking out of?

******too many edits

it finally crashed, it spit out all of this:

Code: Select all

BSPC version 2.1h, Nov  6 2010 18:06:59
bsp2aas: razztazzmagoria.bsp to razztazzmagoria.aas
-- Q3_LoadMapFromBSP --
Loading map from razztazzmagoria.bsp...
100932 triangles
     0 patch tris
creating planar surface planes...
searching visible brush sides...
BSPC version 2.1h, Nov  6 2010 18:06:59
bsp2aas: razztazzmagoria.bsp to razztazzmagoria.aas
-- Q3_LoadMapFromBSP --
Loading map from razztazzmagoria.bsp...
100932 triangles
     0 patch tris
creating planar surface planes...
searching visible brush sides...
25011787rush sides
3594Segmentation fault
ventolins-macbook:bnoordhuis-bspc-f87db8e ventolin$ BSPC version 2.1h, Nov  6 2010 18:06:59
-bash: BSPC: command not found
ventolins-macbook:bnoordhuis-bspc-f87db8e ventolin$ bsp2aas: razztazzmagoria.bsp to razztazzmagoria.aas
-bash: bsp2aas:: command not found
ventolins-macbook:bnoordhuis-bspc-f87db8e ventolin$ -- Q3_LoadMapFromBSP --
-bash: --: command not found
ventolins-macbook:bnoordhuis-bspc-f87db8e ventolin$ Loading map from razztazzmagoria.bsp...
-bash: Loading: command not found
ventolins-macbook:bnoordhuis-bspc-f87db8e ventolin$ 100932 triangles
-bash: 100932: command not found
ventolins-macbook:bnoordhuis-bspc-f87db8e ventolin$      0 patch tris
-bash: 0: command not found
ventolins-macbook:bnoordhuis-bspc-f87db8e ventolin$ creating planar surface planes...
-bash: creating: command not found
ventolins-macbook:bnoordhuis-bspc-f87db8e ventolin$ searching visible brush sides...
-bash: searching: command not found
ventolins-macbook:bnoordhuis-bspc-f87db8e ventolin$ 25011787rush sides
-bash: 25011787rush: command not found
ventolins-macbook:bnoordhuis-bspc-f87db8e ventolin$ 
so, it almost got to 36 million brush sides and freaked the hell out. that was fun

trying alternative compile methods

Re: I need help making a .AAS file on Mac.

Posted: Sun Nov 07, 2010 12:05 pm
by MKJ
fucking hell misantropia owns it up again :up:

Re: I need help making a .AAS file on Mac.

Posted: Sun Nov 07, 2010 1:42 pm
by ^misantropia^
Can I mirror the latest tarball on my website? This code should really be circulated, I keep bumping into mac users that wanna put bots in their levels.
Sure, it's open source so do what you want with it. I'd appreciate it if you link back to the GitHub repo so people will know where to report issues.
how on earth do 100K triangles pump out 25,405,913 brush sides?
You probably need to add -forcesidesvisible when you compile the map with q3map2. In any case, is the .map file available somewhere? Should be an interesting test case.

Re: I need help making a .AAS file on Mac.

Posted: Sun Nov 07, 2010 1:59 pm
by obsidian
^mis: Maybe move to LEM?

Re: I need help making a .AAS file on Mac.

Posted: Sun Nov 07, 2010 3:48 pm
by ^misantropia^
Sure thing.

Re: I need help making a .AAS file on Mac.

Posted: Sun Nov 07, 2010 8:34 pm
by VolumetricSteve
^misantropia^ wrote:
Can I mirror the latest tarball on my website? This code should really be circulated, I keep bumping into mac users that wanna put bots in their levels.
Sure, it's open source so do what you want with it. I'd appreciate it if you link back to the GitHub repo so people will know where to report issues.
Absolutely.
how on earth do 100K triangles pump out 25,405,913 brush sides?
You probably need to add -forcesidesvisible when you compile the map with q3map2. In any case, is the .map file available somewhere? Should be an interesting test case.
I tried -forcesidesvisible, which as I recall is what I had to do in the windows version, but no dice in the mac version yet. I also tried -optimize and -nocsg in varying combinations, no success, I did however successfully build a much, much, much smaller map in no time at all, and without a hitch - so it can, and does work. It's just having a rough time with one of my more heinous maps.

if you're curious:

http://sirventolin.webs.com/razztazzmagoria.htm

I'm essentially on a campaign to push vanilla quake 3 as far as it can go.

Re: I need help making a .AAS file on Mac.

Posted: Mon Nov 08, 2010 12:43 am
by ^misantropia^
Just ran it on linux amd64 but it compiles without a hitch: 100932 triangles, 96367 brush sides.

I've committed a few patches. Any chance you could re-download the source and do a `make clean debug`, followed by this ->

Code: Select all

gdb --args ./bspc_g -forcesidesvisible -bsp2aas razztazzmagoria.bsp
run
# wait until it crashes
bt
...and post the backtrace?

Re: I need help making a .AAS file on Mac.

Posted: Mon Nov 08, 2010 12:48 am
by VolumetricSteve
Will do, I've got my hands filled at the moment though, might have to get to it tomorrow...I accidentally screwed up someone's install of net radiant. Got any experience with Snow Leopard and Net Radiant by chance?

*edit

got it sorted out, NetRadiant can work reliably in snow leopard!

I'm gounna go back and do a make clean debug on the first successful compile I did, now I'm in Snow Leopard (same machine, different partition) and I got it to compile successfully here to, but I had to do a simple 'make' (using your latest source tarball)....just doing 'make clean debug' didn't seem to produce an executable-type file, because I'd type in './bspc' like I did before, and it would give me a file not found kinda message....so I did a 'make' that seemed to fix it, should I run 'make clean debug' after 'make' has been allowed to run?

** re edit

never mind, I'm...I just woke up and some of this is new to me, we're good now.

I didn't know that another program acted as the debug environment - that's kinda neat.

I ran make, then make clean debug, and got gdb running with bspc and the proper parameters.

Will update when it flips its lid.


*** As promised. (these are snow leopard results)

Code: Select all


BSPC version 2.1h, Nov  8 2010 11:06:28
forcesidesvisible = true
bsp2aas: razztazzmagoria.bsp to razztazzmagoria.aas
-- Q3_LoadMapFromBSP --
Loading map from razztazzmagoria.bsp...
100932 triangles
     0 patch tris
creating planar surface planes...
searching visible brush sides...
 95969 brush sides
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x088d6008
0x00049231 in Q3_FindVisibleBrushSides () at l_bsp_q3.c:378
378			for (j = 0; j < brush->numSides; j++)
(gdb)  bt
#0  0x00049231 in Q3_FindVisibleBrushSides () at l_bsp_q3.c:378
#1  0x00049e2a in Q3_LoadBSPFile (qf=0x9002000) at l_bsp_q3.c:636
#2  0x00070204 in Q3_LoadMapFromBSP (qf=0x9002000) at map_q3.c:619
#3  0x00067340 in LoadMapFromBSP (qf=0x9002000) at map.c:1219
#4  0x0002edee in main (argc=4, argv=0xbffff4e0) at bspc.c:766
(gdb) 

There ya go.

**extra edit

(below are the Leopard results)

Code: Select all


gdb --args ./bspc_g -forcesidesvisible -bsp2aas razztazzmagoria.bsp
GNU gdb 6.3.50-20050815 (Apple version gdb-768) (Tue Oct  2 04:07:49 UTC 2007)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries ... done

(gdb) run
Starting program: /bnoordhuis-bspc-a2c66e9/bspc_g -forcesidesvisible -bsp2aas razztazzmagoria.bsp
Reading symbols for shared libraries ++. done
Opened log bspc.log
BSPC version 2.1h, Nov  8 2010 13:29:45
forcesidesvisible = true
bsp2aas: razztazzmagoria.bsp to razztazzmagoria.aas
-- Q3_LoadMapFromBSP --
Loading map from razztazzmagoria.bsp...
100932 triangles
     0 patch tris
creating planar surface planes...
searching visible brush sides...
35945376rush sides
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x32ab3000
0x000478ca in Q3_BrushSideWinding (brush=0x8b70034, baseside=0x32ab3000) at l_bsp_q3.c:330
330		baseplane = &q3_dplanes[baseside->planeNum];
(gdb) bt
#0  0x000478ca in Q3_BrushSideWinding (brush=0x8b70034, baseside=0x32ab3000) at l_bsp_q3.c:330
#1  0x00047b1c in Q3_FindVisibleBrushSides () at l_bsp_q3.c:383
#2  0x0004897b in Q3_LoadBSPFile (qf=0x9002000) at l_bsp_q3.c:636
#3  0x0006bd20 in Q3_LoadMapFromBSP (qf=0x9002000) at map_q3.c:619
#4  0x0006329e in LoadMapFromBSP (qf=0x9002000) at map.c:1219
#5  0x0002dfbe in main (argc=4, argv=0xbffff798) at bspc.c:766
(gdb) 
it took WAYYYYY longer to crash in leopard than it did in snow leopard.....weird..

Re: I need help making a .AAS file on Mac.

Posted: Thu Nov 11, 2010 4:16 pm
by VolumetricSteve
don't you die on me! I need this to live. Considering wrapping some books on C around my head and diving in...

Re: I need help making a .AAS file on Mac.

Posted: Thu Nov 11, 2010 10:56 pm
by ^misantropia^
Thanks for the bug report, Steve. I'd missed it so far because only new posts bump the topic, editing does not.