Wednesday, September 19, 2012

Lining up LODs

This is a prime example of why a public jira is a VERY GOOD THING.  I would have been thoroughly perplexed by the entire problem AND would have taken much longer (if ever) finding the solution without the ability to browse preexisting jiras for this problem.  (I made an assumption that was incorrect, because it made logical sense to work that way, and no logical sense to work the way it does.  And computers are all about logic, right?)

The problem: you can upload multiple separate mesh objects at once into one linked object (this is great for, say, everything already being in the right place instead of having to line shit up!  Hooray!).  HOWEVER, when one does this and attempts to also upload your own custom LODs and physics shapes, the objects do not always line up!  This leads to lower LODs being wacky shapes, or just plain saying "nope, not doing it" if you don't have the same material setup on them all (texture faces).  So....you can upload multiple items and have them all in the right places in respect to each other OR you can have control over your LODs.  Not both.  (As an aside, the auto generated LODs seem to trim off the objects semi randomly- sometimes one object will get the LOD jacked down a lot, and the other will be barely touched, it doesn't seem to do it evenly.)

The Real problem: the collada exporters just randomly decide on an order for your objects in the file, not based on order selected or any other criteria over which you have control.  This definitely holds true for the blender 2.62 exporter- but it is not alone, other programs also have this issue.

The solution: reorder your collada file by hand.  First step, in your modeling program, before exporting, name all your objects useful names.  You need to be able to distinguish what is the same object in different LODs by name only, so keep that nice and consistent!  Export your collada file now that everything is named and easy to tell apart blind.  Use a basic basic text editor (WordPad works perfectly), open up your dae file.  It's a bunch of xml code in there, nested <type> <subtype>.  Now, you're on your own here a bit, because collada files vary WILDLY in what they call things and how they're ordered.

There's going to be material data in there (probably), which you can just skip by.  You're looking for geometry or something similar.  In my current exporter, I'm looking for <geometry id="object_name" name="object_name"> (Note: those names don't have to be the same, and they are things you set, so you should know what names you're looking for).  There will be a bunch of nested attributes, and then a close geometry tag, and then another open tag with a new name for the next data block.  Find out what order your data blocks are in there!  Then open up another LOD file, scroll down to the same geometry blocks, and reorder each entire block into the same order as the first file- repeat for all LODs (the ENTIRE block needs to be moved, from start to end tag for an object).  Save the newly reordered files (just as text, don't let it do anything fancy, don't rename from .dae).  Now they should line up so the objects agree across LODs instead of randomly assigning!

Saturday, September 15, 2012

The Arcade



It's been forever since I've posted anything here, and even longer since a tourism update.  I want to do those more often (I've been preoccupied with moving and a broken thumb and too many events and an occasional fashiony blog- I haven't BEEN much of anywhere a lot lately).



This time, I'm cheating.  Because, you see, I got in early because I'm a participant, so I have pictures that aren't crammed full of eleven jillion people (or, you know...30.  whatever the avatar limit is).  The Arcade!

Archie

Aside from the actual, you know, the spendy money on awesome things reason to go, the venue is amazing.  It's an enclosed skydome, with an entire planned environment separate from everything else.



It is, as you can probably tell from looking, pretty much 100% mesh.  Mesh really does open up possibilities that were unavailable previously- sculpts helped (a LOT!), but mesh is much more flexible with efficiency and texture management.  (I'm also lucky/spoiled and can run with shadows on all the time on this computer, so I do, oh, how I do.)






sit here, trust me!

You super duper want to sit on a donation kiosk, whether you toss any money their way or not. Make sure you've got default camera (hit escape a couple of times).