Hard Light Productions Forums

Off-Topic Discussion => Arts & Talents => Topic started by: bizzybody on January 08, 2009, 04:03:56 am

Title: Anyone want to UV map a not so simple, but well known, Cube?
Post by: bizzybody on January 08, 2009, 04:03:56 am
I've extracted the model and texture for the Weighted Storage/Companion Cube from Portal.

Software tools required.

VTFEdit to extract the largest mipmap level of the textures.

GCFScape to extract the .mdl file and other files required for mdldecompiler, which required hunting down the correct version of vstdlib.dll because Valve has changed it a bit and broke compatibility, and tier0.dll from Portal.

Decompiled the metal_box.mdl file to get metal_box_reference.smd plus several LOD .smd files for it and the other files that're compiled into a .mdl

Then I had to get Blender and a Python script to import the .smd Since .cob import/export has been removed from Blender and the old truespace scripts don't work with Blender 2.48a I exported it as an .obj

Finally! A Cube I can import into trueSpace 6.6! Yikes! It's 2,334 vertices and 4,664 faces. :eek2: A boolean subtract quickly lops a bunch off that, but there's some edges removed that need to stay and some that need to go which are left.

So since the UV is borked anyway, I cut it down to a single corner, cleaned up anything out of place then mirror/mirror/mirror to get back to a full cube, which then needed the mirror 'seam' edges deleted plus some fixing to the ends of the lighted slots in the round panels. Slapped a basic cubical UV map on the whole thing and here it is with only 2,184 vertices and 1,834 faces.

One thing I have figured out about the texture is the narrow stripe along the bottom edge wraps around the edge of the round projections on each side.

Currently my "free time" is used up casting reproduction plastic parts for classic cars, doing custom graphics and sounds for "Portal Box"- a PC dedicated solely to running Portal for a convention*, I have to replace the broken transfer case in a 1992 S-10 Blazer, and EVERYTHING gets pushed to the bottom of the stack when it snows and I get to spend all day with Mr. Snowblower and Mr. Snowshovel. (Getting a lot of snow this winter.)

*Custom modded BIOS with Aperture Laboratories logo fullscreen boot image, Windows wallpaper, screensaver (not started yet) for arcade style "attract mode", sounds for both edited from the Portal game sounds. I'm also planning on doing fancy graphics for the case, taking pics of the insides and putting 'portals' on the outside to show the inside. Windowless case windows. ;) I'm also planning on converting at least one box of Whoppers candy to a box of Aperture Science Volatile Malted Milk Impoundments. The three tablespoons rhubarb, on fire, won't be making an appearance... I have until the second weekend of August, 2009 to do all this.

Just remember, the cake is a lie! We do what we must, because we can.

[attachment stolen by Slimey Goober]
Title: Re: Anyone want to UV map a not so simple, but well known, Cube?
Post by: Galemp on January 08, 2009, 12:09:35 pm
Fish-shaped dirt?
Title: Re: Anyone want to UV map a not so simple, but well known, Cube?
Post by: bizzybody on January 09, 2009, 06:36:26 am
I prefer the fish shaped solid waste and polyester surface resins on my cake. ;)

Here's the cube with all the various parts in unique colors. (Just doing this took me almost 3 hours.)

I drew some numbers on the skin so when I loaded the 3DS version (exported from Blender) I could tell which corners and edges mapped to where. I also made notes of the positions of those numbers when looking at each face- numbered skin and notes and multi-colored cube included in the attached zip.

The light bars and the odd shaped bits between the corners and edges, I just made those all the same positions on all six faces. Shouldn't matter which is mapped to where since the light bars are all the same and the odd shaped bits are two different shapes but there's eight of them in the skin. I could've numbered them too but only the most annoyingly nitpicky fans of Portal would ever notice a bit of texture out of position.

The way the original Weighted Companion Cube has the hearts is all the same way up on four panels and the other two in opposite directions. Thus when setting on the proper side, all the hearts around the sides are right side up.

[attachment stolen by Slimey Goober]