Author Topic: Figure Print Process [Arcanaville]  (Read 46908 times)

voodoogirl

  • Guest
Figure Print Process [Arcanaville]
« on: September 05, 2012, 06:10:47 PM »
From Arcanaville's: http://boards.cityofheroes.com/showthread.php?t=296033

I am going to copy and paste as much of Arcana's posts on this process.

voodoogirl

  • Guest
Re: Figure Print Process [Arcanaville]
« Reply #1 on: September 05, 2012, 06:12:36 PM »
Quote from: Arcanaville
So I was up last night looking over the moving pieces for this, and rather than try to write one big document for it all, I'm going to just post what I can as I can in the thread.

First: I have a dropbox link to OGLE for those that can't find it on the internet, which is probably all of you at this point because the thing seems to be in witness protection.


Also, this guys seems really interested in my google searches now

https://www.dropbox.com/sh/ysy9hon4f3mf4pe/SA_LZrs-1L

That link should have two things in it: a copy of GLintercept (source and exec) and OGLE.  GLintercept is basically the OpenGL shim driver.  Running and installing that just makes a directory in Program Files with all its jazz, it doesn't really "install" anything per se.  The OGLE binary distribution also creates a directory that puts its stuff in there. 

Here's how the magic happens.  You take the OpenGL32.DLL file from the GLintercept directory and copy that into your City of Heroes game client directory.  Then you take the OGLE binary distribution directory - all of it - and copy that into the plugins subdirectory of where ever GLintercept installed itself.  The directory should be renamed to be called OGLE if it isn't already (or you will need to make more config file edits).  Finally, you take the gliConfig_OGLE.ini file from the OGLE directory and copy that into your game directory, but you rename it gliconfig.ini and you edit it with what you want.

Here's what's important in that file:

1.  Directories.  There will be some references to the GLintercept directory created when you installed that above.  If you didn't change it, the main thing that you might need to fix is on a 64-bt OS it was probably installed into "Program Files (x86)" and the config file just says "Program Files".  You'll need to fix that, depending on what OS you run on.

2.  There's a line in the config file called "FrameStartKeys.  Its the set of keys you have to press simultaneously to "capture" a frame.  By default I think its CTRL+SHIFT+F.  Change that if you want that (especially since on most people's default keymaps that will cause you character to start sprinting forward at the same time).

3.  In the plugin section there's a setting called FileInFrameDir.  I like to set that to True.  More on what that does in a minute.

For the technically minded, there is a README for OGLE in its distribution directory under \docs.


All this cannot be done while the client is running.  You do all this, and then launch the client.  You should see more or less no change, although its possible the shim driver might slow down the client a little.  I haven't noticed myself.  I have seen the rare occasional crash while the plug in is installed so I don't leave it there all the time.  To disable OGLE once you set this all up, just rename the OpenGL32.DLL you copied into the client directory to something like OpenGL32.DLL.DISABLED.  When you want it, rename again.

When ready, hit your hotkey combination.  The game will freeze.  This is normal.  Upon hitting that key, the next frame the game tries to render will have all of its OpenGL commands being sent to the video adapter intercepted, processed by OGLE, and then spit out into a set of files.  That will of course take time.  On my system, a zippy Core i7-860 this takes about two to six seconds depending on geometry complexity, but I've seen it take as long as ten seconds.  When your client starts moving again, you have captured that frame.

What you get is a directory called something like Frame_006827 in your game client directory.  Within that directory is everything GLintercept and OGLE decided to log.  You should have a directory called DisplayLists which I suppose contain display list information but I've never really looked at carefully.  There should be another directory called Images that actually should contain little bitmap images of all the textures being sent to the renderers.  So those things are actually in there.

Some of it is real obvious:




Some are not obvious textures, but I can guess what might be used for:



But character textures use some projections I should probably recognize but don't:



Head, hands, and boobs.  According to Rob Liefeld, I've listed those in ascending order by mass.

And of course, sometimes there's:



There's... uh... Wait.  I'm sorry, but W-T-F is that, Art Team?  Did you guys actually sneak an x-rated x-ray image into the game?  Holy ****.


Anyway, the last two things should be two text files: gliInterceptLog.txt and ogle.obj.  gliInterceptLog.txt is some light reading.  ogle.obj is the money shot (hey, I wasn't the one that put dick textures into the game).  Its a waveform-compatible .OBJ of the entire scene.

Now all you have to do is find you character (or whatever you want to capture) in there somewhere, and get that into something you can print, or alternatively import that into the 3D program of your choice and do whatever you want with it.  People who know how to use 3D modelling software correctly, as opposed to the random flailing around technique I use can take it from there mostly: the .OBJ format is supported by basically every 3D modelling software not made in North Korea.

For everyone else, I'll cover that next.


PS: I know you guys think I'm making up the dick texture, but I'm not.  Do the capture yourself, its so far shown up in every 3D capture I've done.  Whatever it is, its burned into the DNA of the game.

voodoogirl

  • Guest
Re: Figure Print Process [Arcanaville]
« Reply #2 on: September 05, 2012, 06:13:16 PM »
Quote from: Arcanaville
The "my character is exploded into disconnected pieces" issue is something I now recall I fixed a while back.  I don't remember precisely how, so I'm taking a look at my configs and notes to see.  Stay tuned, but in the meantime here's some things to try:

1.  Turn off ultramode and reduce graphics settings to low values.  Since we're trying to extract the models, it doesn't matter how well the client renders them.

2.  Uncomment out the following lines near the bottom of the gliConfig.ini file:

//      ExtensionOverride = ("GLExtOverride/GLExtOverride.dll")
//      {
//    RemoveExtensions = (GL_ARB_vertex_program, GL_ARB_fragment_program);
//      }

What you are seeing are almost certainly the result of the game client using vertex programs, and OGLE doesn't capture them, so objects that are processed by vertex programs to deform and position themselves will end up basically at the origin and "straightened out."  Which is basically what a lot of people are seeing.

I remember sometimes the devs would release a build of the game, and this would break for me, and then the next build would fix it.  The current test client works for me, so I believe it should work or at least can work with the current client.

There are a couple of other issues that I will describe in more detail when I write up my processing post, but I notice in Blender I basically see the scene, albeit often rotated and offset oddly.  In Art of Illusion I see what looks like a giant inverted gemstone shape which is I believe the bounding boxes for the scene, and unless you delete those it will be very difficult to see the scene inside.  Again: not a 3D modeller, so not sure why the difference in the two apps.

So there's no confusion, when I do this on my test client and import the .OBJ into Blender, I get this:



Zooming out, I get this:



FYI, I'm standing in the parking lot in Talos: my character is standing with arms crossed to the right of center.  To the far right in the second image you can see the Freakshow that have been trying to steal a car from the hospital parking lot for the last eight years.

voodoogirl

  • Guest
Re: Figure Print Process [Arcanaville]
« Reply #3 on: September 05, 2012, 06:13:42 PM »
Quote from: Arcanaville
I have a potential fix for the problems of characters being fragmented and then squished onto the origin.  If you're having trouble with capturing .OBJ files, try this:

1.  Add this command line switch to City of Heroes: -useTexEnvCombine

You can add that within the NC Launcher under Properties for the game, at the bottom, in the "Extra Command Line Parameters (Advanced) box.  If you are running demorecords, you can add that to the command line for however you do that.  For now, I've been skipping demolaunchers and just using a shortcut, but any way to inject that command line switch should work.

2.  At the bottom of gliConfig.ini, uncomment out these lines:

//      ExtensionOverride = ("GLExtOverride/GLExtOverride.dll")
//      {
//    RemoveExtensions = (GL_ARB_vertex_program, GL_ARB_fragment_program);
//      }

But change the RemoveExtensions line to read this:

RemoveExtensions = (GL_ARB_vertex_program, GL_ARB_fragment_program, GL_ARB_vertex_buffer_object)


Bottom line it should look like this:

          ExtensionOverride = ("GLExtOverride/GLExtOverride.dll")
          {
    RemoveExtensions = (GL_ARB_vertex_program, GL_ARB_fragment_program, GL_ARB_vertex_buffer_object)
    }



Apparently if you try to disable those extensions without the -useTexEnvCombine flag the client doesn't autodetect they are gone and tries to use them anyway, causing a crash.  If you add that flag, the client shouldn't use them either way, but I disabled them in the config anyway just to be on the safe side.

The net result is the game client doesn't attempt to use vertex programs anymore, which are OpenGL programs that can adjust the shape and location of meshes on the fly.  Without them, everything ends up captured in their default positions, which is why everything is scrunched up and in pieces.  In effect, this switch reverts the client to the pre-Ultra mode days of being stuck at OpenGL 1.1.  But interestingly, even when Ultra mode is disabled in settings, the client still uses higher 2.x constructs, just with less enhanced detail.

Anyway, try that everyone, and please report on your progress and whether it works or not.

Also, I'm still working on some documentation for what to do with these OBJ files, but a cautionary for those not knowledgeable about what's going on.  You can capture something that you think is wrong, but is actually right, if you don't understand how the game works.  For example:



This just looks like another failure.  A cape, floating in a blob of triangles.  But:



Notice the model is actually perfectly intact and assembled.  Its just surrounded by a cloud of geometry that is being used by the FX engine to paint the auras and power effects surrounding the model.  Just delete those, and the model will be there inside.

Just because you don't see it in-game, doesn't mean its not there.  There are all sorts of invisible geometry floating around that is used to "paint" power effects in the air.  Be careful that you didn't get a good capture, but it just didn't look like it.

And FYI, that capture is from in-game, from the Live client, thirty minutes ago, using the recommendations I posted above.


A couple of other caveats:

1.  Capture in small enclosed spaces when you can to reduce the size of the OBJ export.  I notice many 32-bit 3D apps choke on outdoor busy exports.  64-bit Blender seems to do much better.

2.  Turn off auras and powers when capturing unless that's really what you want and are looking to experiment with texture mapping.  It'll just make the capture busier and add work.

3.  Captures work from demorecords, and demorecords can run standalone without the servers.  So if nothing else, demorecord what you want to keep.  Later, you might be able to 3d capture from those demorecords and export to other programs or a 3D printer even if the servers are gone.

voodoogirl

  • Guest
Re: Figure Print Process [Arcanaville]
« Reply #4 on: September 05, 2012, 06:14:35 PM »
Quote from: Primantiss
2 immediate problems with using Subsurf;

1) The models rip with all tris, gotta get rid of the tris and clean up the edgeflow, or Subsurf looks like crap. This is because Subsurf uses Edge loops, if it cant make clean edge loops it doesn't work so well.

2) The polys aren't 'melded' together. Each one is separate, easy fix for this in blender is select all the vertices, and click the "remove doubles" option in the mesh toolbar. At least this was the case for me.

Here's a little experiment I did last night really quick, tried to up the poly quality of the Incarnate Boots, because they are ever so smexy;

(Thumbnail, click for full version.. dunno why, but my image embeds aren't working)


Now I did a sloppy job, and it took the whole of 10 minutes, but its possible.


Also, ripping it in the T-Pose is your best bet if you want to pose it yourself, makes setting up a skeleton and rigging it so much easier. It's possible to do it without it, but you cant rely on great stuff like mirroring the weight paints.

voodoogirl

  • Guest
Re: Figure Print Process [Arcanaville]
« Reply #5 on: December 01, 2012, 08:42:23 AM »
Just bring this up afresh to remind anyone who wants to do Figure Printing with their demos.

Queen of Eels

  • Underling
  • *
  • Posts: 17
Re: Figure Print Process [Arcanaville]
« Reply #6 on: December 11, 2012, 11:52:29 PM »
Thanks SO SO much for posting this.  I have it up and running and am eagerly awaiting my first batch of 3d printouts :)

Has anyone had any success getting this to work with the new Icon tool?  I'd love to try and yank the models direct form the costume selector.  Icon crashes for me when I have  GLintercept and OGLE running.

Samuel Tow

  • Elite Boss
  • *****
  • Posts: 511
Re: Figure Print Process [Arcanaville]
« Reply #7 on: December 13, 2012, 12:20:36 PM »
What new Icon tool?
Of all the things I've lost,
I think I miss my mind the most.

Queen of Eels

  • Underling
  • *
  • Posts: 17
Re: Figure Print Process [Arcanaville]
« Reply #8 on: December 13, 2012, 12:24:03 PM »

The Fifth Horseman

  • Elite Boss
  • *****
  • Posts: 961
  • Outside known realities.
Re: Figure Print Process [Arcanaville]
« Reply #9 on: December 13, 2012, 01:02:54 PM »
It's a launcher that gets the game client into costume creator mode without requiring login or connection to a server.
We were heroes. We were villains. At the end of the world we all fought as one. It's what we did that defines us.
The end occurred pretty much as we predicted: all servers redlining until midnight... and then no servers to go around.

Somewhere beyond time and space, if you look hard you might find a flash of silver trailing crimson: a lone lost Spartan on his way home.

ducklorange

  • Lieutenant
  • ***
  • Posts: 69
    • Epic Duck Studios
Re: Figure Print Process [Arcanaville]
« Reply #10 on: December 13, 2012, 01:53:02 PM »
Thanks SO SO much for posting this.  I have it up and running and am eagerly awaiting my first batch of 3d printouts :)

Has anyone had any success getting this to work with the new Icon tool?  I'd love to try and yank the models direct form the costume selector.  Icon crashes for me when I have  GLintercept and OGLE running.

I know I sound like I keep plugging this, but...

Try saving the .Costume from the character creator, loading it into DEMOlition (http://demolition.mcuznz.ca) and then running GLIntercept/OGLE while playing back the .demorecord file instead.
Build demorecord files from your CoH Costume & Titan XML files! [http://demolition.mcuznz.ca]

Queen of Eels

  • Underling
  • *
  • Posts: 17
Re: Figure Print Process [Arcanaville]
« Reply #11 on: December 13, 2012, 01:58:32 PM »
Sweet. I totally missed that elsewhere.

wei yau

  • Boss
  • ****
  • Posts: 102
Re: Figure Print Process [Arcanaville]
« Reply #12 on: December 13, 2012, 06:34:18 PM »
I know I sound like I keep plugging this, but...

Try saving the .Costume from the character creator, loading it into DEMOlition (http://demolition.mcuznz.ca) and then running GLIntercept/OGLE while playing back the .demorecord file instead.

Plug away, my friend.

That tool is a lifesaver, as far as I'm concerned.

themamboman

  • Lieutenant
  • ***
  • Posts: 56
Re: Figure Print Process [Arcanaville]
« Reply #13 on: December 13, 2012, 06:41:19 PM »
So, are there any recommended printing services on the web to do this (for those of us that don't have a 3d printer?)  Also, any chance of color printing of model with textures in place?

I would have loved to do this for my gf for Christmas.  We met on this game 6 years ago.  We were there the final night with our original characters.

Queen of Eels

  • Underling
  • *
  • Posts: 17
Re: Figure Print Process [Arcanaville]
« Reply #14 on: December 13, 2012, 06:50:39 PM »
I've used Shapeways.com, but they seem to be swamped with orders-- I don't think anything ordered today would get out in time for Christmas.    Two other big ones are Ponoko.Com and Kraftwurx.com.

If by chance you are in the Boston area, Artisan Asylum has 3d printing classes on Sundays, then you can use their printer.

voodoogirl

  • Guest
Re: Figure Print Process [Arcanaville]
« Reply #15 on: December 13, 2012, 10:30:40 PM »
I had trouble trying to order from Shapeways too.

Queen of Eels

  • Underling
  • *
  • Posts: 17
Re: Figure Print Process [Arcanaville]
« Reply #16 on: December 19, 2012, 11:11:49 PM »
I got the Shapeways version of my Warshade back today.  So pleased!  It came out much better than expected. I can even see his little teeth.

Arachnion

  • Elite Boss
  • *****
  • Posts: 642
  • Professional Cynic
Re: Figure Print Process [Arcanaville]
« Reply #17 on: December 19, 2012, 11:34:53 PM »
Wow, that looks fantastic!

Congrats!
I'm all dressed up with nowhere to go
Walkin' with a dead man over my shoulder

Waiting for an invitation to arrive
Goin' to a party where no one's still alive

JaguarX

  • Elite Boss
  • *****
  • Posts: 2,393
Re: Figure Print Process [Arcanaville]
« Reply #18 on: December 20, 2012, 12:14:29 AM »
I got the Shapeways version of my Warshade back today.  So pleased!  It came out much better than expected. I can even see his little teeth.

Wow that is nice.

Kistulot

  • Elite Boss
  • *****
  • Posts: 540
  • Argentum Weritas Est!
Re: Figure Print Process [Arcanaville]
« Reply #19 on: December 20, 2012, 12:37:22 AM »
I got the Shapeways version of my Warshade back today.  So pleased!  It came out much better than expected. I can even see his little teeth.

This might be one of the coolest things I have ever seen.

I am tempted to get one of my toon, even if it'd just be a solid color mass of awesomeness.  Would look good on the shelf next to my heroclix statesman and recluse :)

Of course I'm also tempted to get a purple dark nova and a white dwarf just because that sounds really cool >.>
Woo! - Argent Girl