SketchUp game exporter (Source)
-
thanks for the reply and sorry for not explaining the formats:
this site explains what the formats mean
if you are interested in making tools for sketchup for making maps or models that be great
alot of people would be very happing
most of the tools needed atm are for mapping, cause theres alot of messing around grouping every single block, just like i said in the post above we need a tool that can do all this on the fly for example:
linetoWall tool: < would be handy if it made group by each line not a continuous wall
slabtool tool < this one has come in handy this is not bad for making floors and ceilings but crashes after you make one so you have to restart itbut my request if you are doing them, would be a hollow tool what i mean is you select a shape and run a pluging that creates offsets by prompt and make all of the offsets different groups and deletes the shape you have selected
i hope i explain myself better and thank for all you reply so far Chris
-
oh just so you know, Chris you dont have to buy L4d to get the plugins, you only need to own one game that has the source sdk software here the link it says it here http://developer.valvesoftware.com/wiki/SketchUp_Source_Tools
it also has the links to install it, just click on the Source SDK if you dont have it installed.
once install goto your (Dir) where it was installed: and there should be a sketchup folder in there
i hope that helps you save some money so many people think you need L4d to get them
-
When they first released them, you did need to Left 4 dead to get them. I had a nice email exchange with the developers a couple of months ago and they said it was only released to the Left 4 Dead folks at first. But they gave me a copy, which I have not tries yet Perhaps today is the day...
I am curious to find out what the toolset does.
Chris
-
hi again i been searching for plugins that would help me out in making maps and models for Source engine
so far i have found a few that are use full to a point still very slow but better then nothingPlugins
(slabtool.ru)<usefull for making floors and ceilings but crashes after one use
(wallGrouptool.ru) is very limited but works
(obj importer.ru) this is usefull but cant import texturesTools
(Crafty) very usefull if you wish to mod the source engine, can convert vmf to obj with textureshere what i have manage so far its not alot but for a noob at sketchup i didnt do to bad and this is a (brush) not a (mesh)
Sketchup
Hammer
i hope you enjoy what i made, i am hoping a few good plugins will improve speed in source (modding) and (Mapping)
-
I am currently working on some tutorials an modified scripts to make this stuff easier on others.
However to use ANY 3D modeling program with ANY game, you need to read to documentation on both and learn both. I already knew a ton about SketchUp but nothing about hammer when I started. I constantly read tutorials and look at their developer wiki site. You can't just jump in and hope you did stuff right.
Right now I still spend a good amount of time correcting my own mistakes. But the tutorials will come soon. I have already modified the masstexture importing ruby script to properly name materials imported from L4D. Below are some tips I posted on the steam forums for working in SketchUp for export to hammer.However answer to exporting VMFs is that SketchUp has two types of ways to group faces: Groups, and Components.
Groups are single-instances, you can make a copy of a group, but editing one group won't affect others.
Components are MUCH more powerful. Components are copies of each other, if you edit one component in a model ALL other components of the same name are also edited. Plus you can flip and mirror components. So for example in my buildings shown so far, most are symmetrical. I only have to model half the building. All the windows are components, so I only have to model one and the rest will follow.When you export a VMF to Source it only looks for one type of object: A block or brush. A block of brush in Hammer is a convex object consisting of several faces.
See here on what is convex and what is concave:
http://developer.valvesoftware.com/wiki/ConcaveThe simplest type if convex object is a six-sided block. So in SketchUp that is a grouping or component consisting of six single faces.
There are four things that can break exporting a proper brush object:
1: Un-connected or broken lines. These are lines that either go nowhere, or don't meet at two other lines. There is ruby scipt here that can help to fix broken lines:
http://www.crai.archi.fr/RubyLibrary...roken_lines.rb
And one here that can help to remove lines that go nowhere:
http://www.smustard.com/script/StrayLines2: Lines that split up a face. These can be hidden, or visible (Show hidden geometry reveals these) Erase these lines that split a single flat face in two.
3: Reversed faces. All faces in SketchUp have two sides, a front and back. You can use the Style editor to make the back faces show up as a different color. I choose magenta similar to the error texture in Hammer.
A VMF model can't have any reversed faces visible.4: Textures on a reversed face. SketchUp allows you to apply textures to a reversed face. So even if you can't see them, you may have accidentally applied a texture to the back-side of a face. This can happen for example if a texture is applied to a face before extruding. The only good way to check for this is to remove a face and look inside the block. This can be time consuming, and caught me bad on one of my models. Tips: When extruding always extrude forwards to prevent this issue.
You can group multiple groups or components into larger and more complex groups and components. When you export these into hammer the groupings are preserved, you can un-group and re-group the items as needed in hammer.
As mentioned before, there isn't any UV mapping when exporting VMF models. All textures get reset to standard scaling upon export. So cleanup is often needed in Hammer. I have sent valve feedback on this, there is also a e-mail address on the wiki if you want to send your own feedback.
If you are exporting models and not brushes, you can do lots more, such as single floating faces, concave objects, proper UV mapping, etc...
Finally a WARNING about the 3DWarehouse.
1: Most models in the 3DWarehouse still have copyright protection the same as most user created content. Ask for permission before use.2: Many of the models in the 3DWarehouse are NOT game quality. They will often be built in a messy fashion with too many polygons, unconnected lines, massive textures, improper scale, etc... Often the model rating will help to guide you to well made models. Some even not built to scale.
3: The 3DWarehouse however IS a great place to get references for making your own models.
-
There is room for a few scripts to help with some of those common problems. I doubt I'll have time, but perhaps I'll get around to writing a small suite of simple rubies that help do error checking on a model before export.
What I have not seen (in my few hours of playing around) is if Hammer supports a terrain map at all? I really like games like Battlefield series and Crysis and their editors because they are terrain oriented. Does Hammer have any real terrain support?
And as a small side note, I seriously take issue with them calling geometry a "brush". In no world should it be called a brush.
I was able to finally make a level though and play it the other day. It was interesting for sure. I would love to try and get one of my city models from work into a game. That would be fun!
Chris
-
i think displacement is the tool you after, to make terrain /smooth walls etc, though i would search for a tutorial, not the easiest thing to master...
-
Displacements is their terrain system. It actually works very similar to the sandbox tool in SketchUp.
You take a block, pick one face and convert it to a displacement. You tell it what power to split it into, then raise and lower the areas as needed. It isn't quite as flexible as the sandbox tool, but does work.
And yes, no where near as good as the terrain based systems like Crysis. But again each engine was designed for a different end-goal in mind.You do have some impressive plug-ins. I am just barely learning programming, and I am trying to build a library of tools for working with sketchup and hammer. So far I have a modified massmaterial importer, and the two plugins mentioned above for fixing lines.
I think the most useful plug-in would be one that you can select a face, right click, and tell it how much you want to extrude it. The plug-in would first try to detect if it is a convex shape, if true, it would then group it and clean-up any stray or broken lines, then extrude it to the number entered. This would allow someone to simply break up a single face into lots of smaller pieces, and then extrude each one as needed.
Another good clean-up script would remove any textures from back-side faces, and if possible check if any backside faces are facing outwards. These two would solve 90% of the problems. -
Yes, the backside face and materials issue is the first thing I was thinking of. Those would be fairly easy to write. Maybe I'll get a chance to knock a test version today for you to start playing with.
Chris
-
That sounds great Chris.
I found this nice bit of code on the SketchUp API blog:
http://sketchupapi.blogspot.com/2009/03/deleting-unnecessary-edges.html
It seem like exactly what is needed to clean up a model into solid faces.
If you can clean-up reversed faces and internal materials I think the last bit would be a way to detect if if a group was convex or not, and prompt the user to fix that group.
I would be happy to test any scripts you come up with, I will PM you my contact info. -
The code that I linked to was broken, or basically didn't work on as advertised.
I have made a clean-up script that uses a few different scripts I have found including the Google code which was the biggest key. It allows you to search the entire open model including inside groups and components.
I now have a script that does four things on one go:
1: Searches for any lines that don't connect to any other lines and delete them.
2: Searches for any lines that split a coplanar face where both faces have the same texture.
3: Searches for any faces that have a material applied to the back-side and removed the material.
4: Searches for any groups or components where a overall material was applied in an attempt to paint the whole model, and removes the overall material.It reports back how many lines were repaired, and how many bad materials were removed.
I will release the script along with a a larger tool set if Chris can help me a bit on getting it packaged into a nice menu. -
Oh cool, that was fast. PM me the script and I'll put it into a menu.
I'm working on making a script that attempts to correctly orient faces, and checks for holes in the shape. I thought I had a working plan, but keep running into problems. I know there are a few other scripts out there that do this already, so maybe I should track those down and try to get the authors permission to include them (specifically the face orientation - I've alreaedy written a script that does a quick check for holes and labels them, so I know I can get permission to include that one ).
Chris
-
It makes an smd file and you need to convert it to a model file. THat is what I read. I still have not figured out how to do that though. But I made a nice lattice .smd file that I wanted to import, but so far I have not got it to work.
So if you figure out how to convert it, or figure out how to get .smd's into a map, let me know
Chris
-
i thank, both of you for trying to get sketchup to be more userfriendly with the source engine, this could be the start in making some really great content for this engine for people that dont know the bigger apps like XSI and 3dmax which are more native to importing models
ps if you need me to test anything please send a pm
oh and if you have any tutorials send them too, could do with a modeling one cause i still cant get one working yet lol
ive made the model but it only makes a (SMD) thats the only file i get but i belive i should also have a (qc) file or do i need to make that myself, who know ive tried to follow Valve Tut with no luck...when i comes to using hammer i would say iam pritty good at it, i just found that sketchup has the chance of coming a 3rd party map editor its can be quicker with the right plugings to make maps with, so if you need any info on hammer just pm me
keep up the good work
-
you having the same luck as me then lol
-
i opened the file valve_sketchup_tools_config.rb and it says in here that build SMD file for import to the hammer engine is done for you but i tried to correct the Dir but it still dont work or perhaps valve release a duf plugin
-
@gardentwine said:
i opened the file valve_sketchup_tools_config.rb and it says in here that build SMD file for import to the hammer engine is done for you but i tried to correct the Dir but it still dont work or perhaps valve release a duf plugin
The code in the Ruby file to automatically compile the SMD is old and inactive.
I have actually been in contact with a employee at Valve who worked on this plug-in.
He said they probably will be supporting it more in the future but current it is more of a in-between project. Also that the automatic compile stuff didn't make it into the public release, probably due to stability and the fact that more data would have be written into the model for the QC to work.If you don't know a SMD file is the geometry for a model, similar to a Collada file. It has a paint-by-numbers style UV map that a compiler can then apply a material to.
A QC file is similar to the XML files packaged inside a KMZ. I describes the metadata for the geometry: Is this a static model? Physics model? Where do I find the textures? etc...
See this page on writing the .QC file. Search google for many tutorials and tools on compiling them. Once you know the work flow it isn't all that bad. Models in-game use a different material lighting scheme that isn't as complex as the brush work. This increases the game speed.SMD files are blocks that make up the game world. These are the walls of buildings, floors, ceilings, trim work etc... And the majority of the game world. Each block or brush exported into the SMD file must be a convex object, have no lines splitting up a face, or any 2D surfaces. This is the primary purpose of the scripts we are trying to write.
See here: http://developer.valvesoftware.com/wiki/VMFSo far most of the screenshots I have shown are SMD brushes. What makes sketchup so much more powerful to me is that I can create complex geometry models in SMD that mixes with the less complex brush work in VMF and have them meet seem lessly in the game world.
For example I made the greenhouse model below in SketchUp.
All the parts of the building are VMF blocks, along with all the glass.
The many beams that make up the ceiling though would be intensive on the game engine.
So they were made into a SMD model file, and compiled into a game model (.MDL)
The model uses 100% in-game materials, so I didn't have to make anything new.
Making this type of object in-game would be nearly impossible with all the angles. It would also take forever to tweak and modify. But SketchUp components and mirroring fixes all that.
For example I wanted the player go be able to crouch and squeeze though the windows along the side. I had to make the windows 8 inches taller. Well in sketchup that takes about 15 seconds including adjusting the matching glass. In-game that would mean modifying about 100 object each by hand.SketchUp:
In-game:
Real-world:
-
i managed to use the cannonfodder StudioCompiler to create my Mdl but now when i try and load hammer it come up with an error (failed to load default scheme) WTF is this, and is it cause of a bugged mdl or something
-
It should not be due to a MDL file.
See here: http://developer.valvesoftware.com/wiki/Failed_to_load_the_default_scheme_fileHere is an example of model work that you can do in SketchUp. Both of these models were made in a few hours today.
All the models used existing in-game model textures I imported into SketchUp.
The white smoothed model behind each is the collision model that sets up the object physics.Bonus:
The toolbox is very fun to play with as the tank, as it weighs quite a bit. -
your so good at making stuff i only wished i could get it to work, most of today i reinstalled cause my vista 64 system was so buggy dew to my part and alot of apps crash so hopefull now i have a fresh install i may have better luck
lets hope
Advertisement