Go Back   Steam Users' Forums > Steam Tool Discussions > Source Level Design

Reply
 
Thread Tools Display Modes
Old 02-16-2008, 11:08 PM   #1
PsychoMuffin
 
Guest
Posts: n/a
DWG/SKP to VMF

Not a question, but an FYI for all of you.

I like to design and document using easier to use programs like AutoCAD or SketchUp. I've found a way to get the geometry from these programs into a VMF so it can be compiled into a BSP with hammer.

This is especially useful for my exploration of using the HL2 engine to give real-time walkthroughs (NOT recored flythroughs) of arcihtectural renderings. If anyone scoffs at this idea, please look at some of the work by Kasperg, especially his falling water map. Pictures of this great building don't do it justice nearly as much as this map does.

I and others have been looking for a way to convert these files; often explaining that we had to 'scour' the internet to find it. All I've found on the subject is other people looking.

So, here it is.

Do all of your work as normal in CAD or SU. If CAD is first, save as DWG and import into SketchUp. In SU turn all of your plans into 3d masses, but you need to make sure you group your items (or perhaps just insert planes) so that you have no convex geometry (this is geometry that exceeds 180 degrees, a 3D 'L' would have to be grouped into 2 parts). This is easy if you just group as you go.

From SU, save you file as an OBJ. You may need to use SU pro (which there is a free trial, I use the trial time only for opening and exporting).

Import the OBJ into Blender (www.blender.org), another free program. Then export this as a quake .MAP file.

Then open the MAP in another free one called Crafty (http://nemesis.thewavelength.net/index.php?p=46), from Nems tools. From there export as a VMF.

From here you can just open this VMF into Hammer, and do the rest of your mapping. Add texture, lighting, entities, whatever. But, the general massing of everything will already be done.

I know it is a circuitous way of doing it, but I haven't found an easier way yet. And once you do it a few times, it gets easier. I hope this will help anyone else out there that has been trying to do this, or if there is anyone else who knows of a simpler more efficient way, they could add more to this thread.


EDIT:
If you have seen this topic elsewhere, please feel free to link this thread at those sites. it might be helpful to start to bring this idea to one place (this thread being most current I would think)

Last edited by PsychoMuffin: 03-04-2008 at 09:06 PM. Reason: update
 
Reply With Quote
Old 02-17-2008, 12:15 AM   #2
plykkegaard
 
Guest
Posts: n/a
Just a few extra tips:

Sketchup can save as 3DS which can be imported in XSI Mod tool (XSI can import/export vmf) and can also be handled in GMax

The previos Hammer versions (for HL/Goldsrc mapping) supports the map format

Hmm why not write an article/tutorial on VDC/wiki on the subject, it would be great
http://developer.valvesoftware.com/wiki/Main_Page

I'll be more than happy to assist you in doing so, please give me a notice either here or on VDC
http://developer.valvesoftware.com/w...lk:Plykkegaard

rgds/Peter
  Reply With Quote
Old 02-17-2008, 11:13 AM   #3
PsychoMuffin
 
Guest
Posts: n/a
That's a good idea with the article. I'll probably do that sometime. But for now, I still have a lot of testing to do. The geometries for Sketchup and Hammer are very different, I'm trying to see what kinds of geometries transfer over well.

As for XSI, I was having a hard time with that one, and could find that option for import/export.

And as far as the other versions of Hammer, where could I get those? I've been wanting a way to open those .map files I find. All I have as far as hammer is what STEAM downloads for me.

But for the most part, still alot of testing to do.
  Reply With Quote
Old 02-17-2008, 11:23 AM   #4
plykkegaard
 
Guest
Posts: n/a
Latest Hammer for goldsrc
http://collective.valve-erc.com/inde...go=hammer_beta

As for XSI - from the documentation ...
Quote:
To import a 3DS file
1. Choose File > Import > Import 3ds from the main menu.
2. In the browser navigate to the folder that contains the 3DS file you want to import.
If your files are located within a specific project, you can click the Paths button and select the project location from the drop-down list.
3. Select the file to be imported. Its name appears in the File Name text box.
To select a 3DS file, make sure that the File Types text box is set to Autodesk .3ds files (*.3ds).
4. Click OK. The imported objects are added to the current scene under a 3ds scene root.
  Reply With Quote
Old 02-17-2008, 05:18 PM   #5
Chris528
 
 
 
Join Date: Jun 2007
Reputation: 13
Posts: 239
Quote:
Originally Posted by PsychoMuffin View Post
From SU, save you file as an OBJ. You may need to use SU pro (which there is a free trial, I use the trial time only for opening and exporting).

Import the OBJ into Blender (www.blender.org), another free program. Then export this as a quake .MAP file.

Then open the MAP in another free one called Crafty (http://nemesis.thewavelength.net/index.php?p=46), from Nems tools. From there export as a VMF.

From here you can just open this VMF into Hammer, and do the rest of your
mapping. Add texture, lighting, entities, whatever. But, the general massing of everything will already be done.
Thanks for the info, this makes things a lot easier. If you think your method is circuitous, I used to create level geometry in maya then export as .dxf. I then imported the .dxf into gmax and exported as a half-life .map with the game level builder 2.2 plugin. After that I opened the .map in hammer 3.4 and converted to .rmf which could then be opened in Hammer 4.1

Now all I have to do to create level geometry in Maya is export as .obj and convert to .vmf with crafty.

By the way you can skip using blender because crafty can import .obj files.
Chris528 is offline   Reply With Quote
Old 02-17-2008, 06:36 PM   #6
PsychoMuffin
 
Guest
Posts: n/a
I'm really dont like how tedious it is to construct in Hammer. But this process with sketchup is become more tedious. I have been testing how the geometry goes into hammer. I had a room with a bunch of stairs in SketchUp, but in hammer it looked more like a small orange star. Of all the different shapes I've tried so far, the only one that seems to work is a cube. Which needs to be made of continuous lines, without extraneous lines, and all faces facing inwards. Any change messes up the geometry. I can't understand how the SketchUp geometry is modified into the OBJ format.

Oh well.

Also, I think I tried skipping Blender, nothing shows up in Hammer I think.

My search for user friendly 3D building, and game engine walkthroughs still continues.
  Reply With Quote
Old 02-18-2008, 11:08 AM   #7
plykkegaard
 
Guest
Posts: n/a
Arghh one need the Sketchup Pro in order to save as 3DS
hmmm 355.- €
http://www.sketchup.com/cgi-bin/istore
  Reply With Quote
Old 02-29-2008, 06:22 PM   #8
PsychoMuffin
 
Guest
Posts: n/a
Update:

I've been playing with this option for a little while now. Getting tough. Here are a couple results I got:





The first is in SketchUp, the second in Crafty (if I don't use crafty as an intermideary, the geometry doesn't show in hammer).

As you can see, the most basic geometry works fine; the cube, one line pulled up, and one point pulled up. Extra lines screw it up, even creating more triangles and extra solids to compensate. Reversing faces dont result in anything. Planes are automatically extruded into solids.

I also tried one with cubes made at random decimal values (12.134", 10.314", 9.1351", etc) thinking that the mismatching grid could screw it up. Hasn't yet. Maybe the simplicity of a cube compensates. Hmmm.

Next I want to find out how SU and hammer saves its geometry. I don't know much about programming, but am willing to learn. Perhaps start a export/import for SU to Hammer.

Any ideas where I should start on this step? Am I missing anything with these geometries?

I'll update again sometime. Any other ideas, feel free to post.
  Reply With Quote
Old 03-03-2008, 01:15 PM   #9
PsychoMuffin
 
Guest
Posts: n/a
Update:

You can design in sketchup for hammer!

It's limited, but you can. Unfortuently, these limitations are similar to the construction of hammers brushes. The rules (for now):

the geometry must be in seperate groups.
6 planes in each group, they al must be facing the same direction
12 lines exactly. In SU, you can have a cube with more than 12 lines, and not notice. You could have several lines between two corners lined up. To know for sure, just click on one and it should extend from one corner to the next.

Like I said, this is pretty much the same as hammer brushes, but, I find I can form these much faster and more acuratly than in hammer because of the line and direction snaps, the push/pull tool, and the easier to use input vaules for lengths. Perhaps you can input easy lengths into hammer, but I dont know.

But for now, I made a rather large orthagonal model from SU, and it all got into hammer.

If perhaps there was a plugin to not triangulate but (for lack of better words) orthagonate, there would be a great impact. Something that instead of connecting all points into triangles, it connects everything in rectangles, and finds an effiecient way to make this geometry. I haven't done test on more complex geometry yet though.

More to come.
  Reply With Quote
Old 03-04-2008, 08:04 AM   #10
dreambill
 
Guest
Posts: n/a
i needed a big tanker(boat) in my map, im not enaught good in hammer to do all the curve a tanker have, so i went to sketchup models database and i find what i need, i open it with sketchup and export it to .xsi open the .xsi in mod tool, but its not working, open it back in sketchup and this time i exported it as .3ds, import the .3ds with mod tool, that time, it worked fine, i have the tanker in mod tool, but when im trying to export it as vmf, its not working, i got a message in the bottom of mod tool, that my model have concave curve.... i know hammer cannot handle concave.

my question is, how to get ride of these concaves?
  Reply With Quote
Old 03-04-2008, 12:25 PM   #11
Kalenzo53
 
Join Date: Nov 2007
Reputation: 2
Posts: 484
This seems like a really good idea. Google had to have known that this app would be wildly popular with game devs and I'm pretty sure even professional game devs use it.
Kalenzo53 is offline   Reply With Quote
Old 03-04-2008, 02:34 PM   #12
PsychoMuffin
 
Guest
Posts: n/a
The concave part is what I am still working on. In fact, there are many geometries that seem that they should come out ok, but dont. I'm still trying to figure out the peciluarities of it, but I think they are lots of work arounds that can be done. Perhaps just roughly model the hull with orthagonal groups and then in hammer, your have some refrences to work with. But yeah, still working on it.
  Reply With Quote
Old 03-04-2008, 08:59 PM   #13
PsychoMuffin
 
Guest
Posts: n/a
Just to show you how this little project is going, I'll show you a string of images from my raw, unaltered SketchUp file, to in game graphics.

First, the file, which was an extrapolation of a perhaps well know drawing (10pts if you know it)


then to 'orthogonalize' it into many boxes


then off as an .obj to Blender


from there, a .map to crafty


then the .vmf to Hammer


then finally as a .bsp for in game rendering.




All I did in hammer was apply a quick paint job. As you can see there is much to build off of, but all the designing was done in SketchUp.

Anyone see potential?
  Reply With Quote
Old 03-04-2008, 09:10 PM   #14
PsychoMuffin
 
Guest
Posts: n/a
Quote:
Originally Posted by Kalenzo53 View Post
This seems like a really good idea. Google had to have known that this app would be wildly popular with game devs and I'm pretty sure even professional game devs use it.
I'm not sure if @last Software knew how big SketchUp would have been, but I do agree Google, did, why else would they buy them out? As for the game devs, I'm sure by now they have gotten very good at working in the programs, we're just used to SU and are trying to make it fit. Round peg; meet square hole.
  Reply With Quote
Old 03-12-2008, 12:09 PM   #15
EllisGL
 
Guest
Posts: n/a
Questions

So I have to break all the stuff down into simpler poly's right? "orthogonalize"

What about grouping? Is it just grouping the peices, ie just the poly that make up the stairs in a single group (select, right click, group?)

Also what about sizes ratios? If were to design a house that had a 1:1 measurement ratio, would it be too big?

Last edited by EllisGL: 03-12-2008 at 12:11 PM.
  Reply With Quote
Reply

Go Back   Steam Users' Forums > Steam Tool Discussions > Source Level Design


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -7. The time now is 05:23 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site Content Copyright Valve Corporation 1998-2014, All Rights Reserved.