Wednesday, January 26, 2011

Convex Hull Dilemma

As i haven't found any good function in 3D Studio Max to generate a convex hull, i had to do it on my own if i really wanted it. So i did do some research and stumbled over a nice java applet demonstrating various convex hull algorithms. Excellent!

I at least understand the java source code, so all i have to do is port da shit. It wasn't all too easy, as it needed quite some rewriting thanks to the OOP-unfriendly MaxScript, but finally i got it working.

And that way i found a problem with the algorithm implemented like this: The moment where four outside vertices are on the same plane and part of the hull, you run into the following problem: When you test one vertice against the other three wether he is "outside" and therefore part of the hull, he tests positive. Yet all the other four vertices do that too! So the code ends up looping through the edges of those four vertices for ever...

As the applet only creates random vertices to test and doesn't try geometrical primitives like for example boxes, this problem pretty much never occures. And the moment i shake up those quad-vertices, the algorithm works excellent.

I only tried gift-wrapping so far, so maybe the other algorithms don't have this problem, but my feeling is they do too... At least in some or the other way...

That means i have to adapt the algorithm for a more rigorous edge-filtering.

Friday, January 14, 2011

You are the Sony of my life...

Brilliant. Now i got this beautyful ID-tag for my Playstation Online account additional to my XBox Live account tag here on my blog. But what do my patriotic eyes have to see? The german flag next to my nick! Blasphemy! "This witchcraft can't go on!" i said to myself naively believing in the power of online support. Alas, Sony once again disappointed me, the online support is pretty shitty. I couldn't find any way to email them my sorrow and i had a hard time finding the support forums on the site. I didn't expect to find anything flag-related there, but at least there was a thread about ID-tags... Great! Lets post there! And again Sony managed to drown all my hopes, the moment i tried to post, the "Sony Network integrity indicator" changed from "fully working" to "not really doing all too much"... ARG!

Sorry, Sony, i hate to break this to you as i loved the PSOne and the PS2, but seriously: MICROSOFT KICKS YOUR SORRY ASS AT GAME CONSOLE BUSINESS!!! And thats a shame.

Wednesday, January 05, 2011

FBX Exporter, Quo Vadis?!

I'm trying to script the 3D Studio Max intern FBX exporter. The Manual seems to be pretty straight forward. And also when i set and query various values of the exporter, everything seems fine. So i thought i'd be cool writing my own little toolchain around it, as the unit system in 3DSMax can surely be a major pain in the ass. Oh naive me, of course nothing ever works in 3DSMax as described for sure. Take a look:


units.SystemType
#centimeters
FBXExporterGetParam "ConvertUnit"
#cm
exportFile fbxfile #noPrompt selectedOnly:true
true


Typing this, my object is exported with a scale of 100.0. Why? I don't know. Maybe the exporter assumes for some unknown reason that the scene system unit is meter? Well, lets put it to a test:


FBXExporterSetParam "ConvertUnit" "m"
OK
FBXExporterGetParam "ConvertUnit"
#m
exportFile fbxfile #noPrompt selectedOnly:true
true
FBXExporterGetParam "ConvertUnit"
#cm


Aha! Exporting the file resets the exporters settings to default even though stated otherwise in the manual:

Note When you export or import files in MAXScript, use the command #noPrompt to prevent the FBX Exporter/Importer user interface from appearing during the process. For example: ImportFile “C:\test.fbx” #noPrompt. If the UI appears before an export or import command executed through MAXScript, the last used preset is chosen, and effectively ignores any recent scripted changes.

Now this is simply brilliant! With other words i have no fucking influence on that exporter! Lets try a workaround:


units.SystemType
#centimeters
units.SystemType=#meters
#meters
units.SystemType
#meters
exportFile fbxfile #noPrompt selectedOnly:true
true
units.SystemType
#meters


That must do it, right? No. No change at all. Really? Not even the system units are influencing that thing?!

Final word: I solved it by just scaling the object down before exporting. This way it works. Dumbfuckstupid Autodesk shit, seriously...

Wednesday, December 08, 2010

Harms Way, Baby!

YES! The first XBLA-game i worked on is finally online!

Harms Way

And the best thing: It's free! Yes, as in "just get it, no strings attached, go and play it now"-free! And if you don't own an X-Box, go get one. Or read all about it here:

Joystiq: Harms Way goes from dream to screens, trailer

And then come over again and tell me how good it looks to boost my self esteem a little ;)

Monday, October 25, 2010

Bongfish

Now i am an official employee of Bongfish, the only game developer in Graz, Austria. This is great, because my flat is only 10 mins from the company by feet and the path goes pretty much through the city center, so the whole walk feels like a little shopping stroll each morning. Plus i work on a super secret game for a major console. Lets see how much other work i might get done next to that...

Thursday, October 21, 2010

18 / 6 = 3...

There will be 18 games at the Kinect launch. But wait! Some games cover the same topic. Actually pretty much all games cover the same 3 topics:

- Snowboard (Konami, Sega)
- Various sport mix (MS, Ubi, Konami)
- Fitness (Ubi, EA and two other nonames)
- "Party" (2 titles by MS, one by Warner)
- Dance (Harmonix, Mindscape, Konami)

Beside of those, unique titles are Kinectimals, Harry Potter and Fighters Uncaged. I guess i pass on Kinect for now...

Monday, July 05, 2010

Excel, quo vadis?

Excel in Deutsch ist eine Zumutung. Und nachdem sich alle Office-Pakete daran orientieren, sind auch diese eine Zumutung. Natürlich komme ich mit dieser Erkenntnis gefühlte 20 Jahre zu spät, egal. Ich erledige meine Finanz damit, habe ich mich deshalb mit dem Formelgenerator rumgeschlagen und bin komplett sprachlos ob des Wahnsinns, der da herrscht. Hier ein paar Beispiele:

- Sämtliche Bestandteile der Scriptsprache zum Erstellen von Formeln sind übersetzt. Das macht mir als zumindest Scripting-Erfahrenen das Leben ordentlich schwer, wenn ich mal den Syntax einer Funktion suche... "WENN()" statt "IF()"? WTF?!

- Es gibt eine Funktion, die einen Text in eine Währung umwandelt. Diese Funktion heisst "DM('text')", also von Deutsche Mark... WTF?! Man nimmt einfach die Abkürzung EINER Währung, um eine ganze Funktion zu benennen?! Wir Österreicher sollen gefälligst in D-Mark arbeiten? Und dass die Währung mal geändert werden könnte war bei der Entwicklung der Programme komplett plunzn, oder?! Dementsprechend dämlich liefert die DM-Funktion auch EURO...

- Es gibt zwei Funktionen, um einen String (also Text) zu durchsuchen. Die eine heisst "SUCHEN()", die andere "FINDEN()". Aus dem entlehnten deutschen Wort der jeweiligen Funktion lässt sich zumindest dessen Wirkungsweise einigermaßen erahnen. Was den Unterschied zwischen den beiden ausmacht, liefert gottseidank die Hilfe zu "SUCHEN()": Die Groß-/Kleinschreibung spielt hier keine Rolle. Soweit zu deskriptiven Funktionsnamen. Natürlich benimmt sich keine der beiden Funktionen gut, beide liefern zwar brav die Position des gefundenen Textblocks bei einem positiven Suchlauf, ansonsten eine Fehlermeldung. Insofern muss man beide Funktionen in eine zusätzliche "ISTFEHLER()"-Funktion einfassen, um sie zu einer klaglosen Mitarbeit zu bewegen.

Dieses Programm steckt so voller Relikte, dass es einem die Fussnägel aufrollt!!!