Browsing all articles from February, 2010

Create a Room in Unrealed for IMVU

Posted Posted by Danny Jensen in IMVU Tutorials, Rooms     Comments 63 comments
Feb
1

Why yes, I am going to teach you how to make a room for IMVU using Unrealed. For this tutorial I’m going to be using good old classic Unreal G.O.T.Y. Also we are going to need some software that can convert unreal’s t3d brushes to obj file format.

UPDATE

I have actually recently written a t3d importer for my xmfrecovery program, which you can then export as 3ds. Download here http://www.vigilsoft.net/2010/07/31/xmf-recovery-tool/

You can also find converters here.

http://darendash.home.comcast.net/~darendash/Converter.html

Primarily we need the UnrealtoOBJ

http://darendash.home.comcast.net/~darendash/UnrealToObj.exe

also you may need the OCX files included here

http://darendash.home.comcast.net/~darendash/UnrealToObj.zip

Or you can download it directly from me here:

http://www.vigilsoft.net/UnrealToObj.rar

Alright now that we got the necessary files we need, we can go ahead and open unrealed.

unrealed

Now I won’t be making a big expensive room for this tutorial, something rather simple should be enough to get you started. I would highly recommend you use your own textures for this and not the textures built into unreal for copyright reasons. Also it makes the conversion process much easier if your textures are already on the map in unrealed when exporting.

So first thing is first i’m going to load in a few of my own textures i made for a ship room i was working. You can use them too if you wish.

http://www.vigilsoft.net/shiptex.zip

Once you have unrealed open go to the texture browser.

texbrowse

After the Texture Browser Window pops up, you’ll want to hit File >> Import. Your Imported Textures need to be in PCX format. So I’m going to go ahead and import a few textures of mine (you can import multiple at the same time by highlighting all the textures you want to import in the Open file dialog). When you hit OK a little dialog window comes up requesting information.

utxdialog

For Package just put whatever you want your texture pack to be named, For Group you can give this any name you want, basically it will organize all the textures by group which makes it easier to sort. Since i’m only importing a few textures i’m going to just group it under all. The Name area will be the name of the first texture you selected you can change it if you want to, the dialog box here will popup for every texture you imported. you can however just simply hit OK All and your done.

Alright now i have my textures loaded into Unrealed i’m gonna go ahead and save this as a utx file so i can easily use it later on. Just go File Save, it should have automatically filed out the filename for you and located you in the textures folder. So just go ahead and hit save and we will proceed to the next step.

Making the Geometry

You know i just love CSG (Constructive Solid Geometry) and BSP (Binary Space Partitioning). Basically the idea behind it is if your unfamiliar with it. Is to take one solid primitive shape and either use that to carve or add a shape out of another primitive shape making more complex geometry. Well, enough of me talking about it, let’s just get to it.

So first thing is first I’m going to create a square room to start it. So let’s go ahead and hit the Cube brush icon.

cube

When you click cube you should see it added a cube shaped brush into the field. This is great and all but we want to specify what dimensions the cube has. So go ahead and right click on the cube icon which should bring up an info box like so.

cubeinfo

go ahead and change the dimensions to whatever you want really since we are going to have to rescale the map anyways before it gets into imvu it really doesnt matter what size so long as you keep it concise.

I’m going to make it a rather wide and long room. i’ll just enter 700 for width and breadth and hit ok. You’ll notice your brush changes size. now we need to actually build some geometry. Since the default space in unrealed consists of pure mass we need to carve out empty space into the mass to create our room. To do this we are going to hit the subtract button.

subtract

which in turn carves out our room like so,

subtracted

Yay we made a room in unrealed haha. But perhaps we want a hall that goes to another room. so right click our cube brush button again this time make the brush’s width about the same as its height and make its breadth really long.

hall

If you notice in our other views the room we created is shown as a maize or dark yellow colored brush and our hall brush is shown as a red brush. Now we want to move our brush out to and edge of a wall and subtract again. To move the brush in any one of the views hold down control + the left mouse button and move the mouse.

I moved it to the edge of the room like this.

movehall

and then i hit subtract to carve the hall out of space and our bigger room.

subhall

Now we have a hallway. Now we just need to make another Room at the end of the hall. so go ahead and change the dimensions of your cube brush to that of a decent room then move it to the end of your hall.

smallroom

And then subtract it.

subsmallroom

This will work for our basic room, if you need to learn how to make much more complex rooms than this you could search for unrealed tutorials.

This here is a good place to start learning how to use unrealed.

http://unreal.gamedesign.net/tutorials/ued.shtml

Ok our next step is to texture the floors and celing and perhaps make a few walls different. So go ahead and click the texture browser icon and select one of the textures you imported. I’m going to select one of the floor textures i made.

floortex

Now we are going to use our 3D view and click on the floor using the left mouse button, which should have highlighted it like so.

floorsel

Then we want to right click on the selected floor and hit apply texture.

applytex

Which should change the texture. go ahead and re-texture the whole room until your satisfied. If you really want to get a feel for how it looks with lighting applied to it go ahead and right click in various areas and click add light. Then you can hit either build all or build lights to get a nice dynamically lit room.

build

Here is my room after re-texturing and adding lights.

room

The next step now is to export our geometry out of unrealed and into 3dsmax for further editing. So the next step now is we need to highlight all of our brushes in the scene. What we have to do is to create a gigantic cube that covers the entirety of the map. something like 2500x2500x2500 was big enough for me.

bigbrush

Now we want to click the intersect button on the left under Add.

intersect

this should have caused the brush to take the shape of the entire map.

Then we have to go to Brush >> Export, now go ahead and export your brush make a new folder if you can and stick your exported brush in there, because we will also have to export the utx file used in this map in that same folder with the brush.

Once you have your brush exported open the texture browser and make sure you are on your texture pack. then you want to go to File >> Export change the file type to all files and save it as a bmp instead of PCX. This can actually take a while to export all these one at a time. fortunately there is an easy way to batch export all the textures in a utx file using UCC.exe

To do this open command prompt and change the directory to your unreal tournament system folder. then in command prompt enter

ucc batchexport myutxfilename.utx TEXTURE BMP C:\path\to\my\unreal\brush

change the utx to your texturepack utx file and then change the directory on the end to where your exported brush is located.

This should export all your textures to the folder your brush file is located. Now we need to open the UnrealtoObj converter.

unrealtoobj

go ahead and select your t3d brush file. Then just hit Go if all your textures were present you should not have gotten any error messages.

Now a great way to size the room up and align it for imvu is to download and use IMVU’s example room mesh

http://avatars.imvu.com/Developers/example3droom.zip

Now let’s open the example room in 3ds max

exampleroom

Right now that we have the example room loaded let’s go ahead and delete that silly backdrop out of the scen and import our unrealed map. So go to File >> Import and select your OBJ file and hit ok.

unrealmap

Ok you should see just a big box, this was the cube we surrounded the entire map with. We don’t need this cube anymore so go ahead and go to edit mesh modifier  select element mode and on the map and highlight and delete each side of the cube.

delcube

Now you may have noticed the room is sitting at a 90 degree angle. so we need to go ahead and rotate it so the ceiling is facing up and scale it so the example avatars fit neatly into the room

I’d recommend then angle snap tool for rotating as it will help you rotate it exactly 90 degree counter clockwise.

rotatemap

Now we just need to Scale up and position the map.

scalemap

there we go that looks pretty good. Now we just need to add the textures back on to it. Go ahead and click from the menu Rendering >> Material editor.

Once you have the Material editor open we will want to select an empty material and then click the eyedropper tool to grab the material on the map we imported.

mated

Once you click the pick material eyedropper icon go ahead and click on our map, which should if we are lucky created a multisub object AND loaded all of our textures in all in one shot.

eyedropper

Pretty slick huh? this is why i said it would be easier to use your own textures in unrealed opposed to re-texturing it in 3ds max. Now all we have to do is rename the materials to follow imvus naming convention and make the materials visible.

materials

Well that was easy, and btw to make them visible in the viewport just click the Show map in viewport icon

showmap

Ok so if you wanna just cut to the chase and see it in IMVU go ahead and rig this map to the root node provided in the example room.

skinroom

Now just export the XSF skeleton file and the XMF mesh file along with your materials and your all set!

unrealimvu

And there you have it!

Just so you know the converter isn’t perfect so you may find a few polygons here and there with the wrong Mat id so you may want to keep an eye out for that.

Happy Meshing!