SketchUcation Plugin Store

 

 

SketchUp game exporter (Source)

Re: SketchUp game exporter (Source)

Postby oalexis » Wed Apr 01, 2009 9:33 am

thanks so much zapwizard! :) i'm going to put this to use for sure. Just imported a little pagoda into the sandbox :)
Please, register (free) to access all the attachments on the forums.
oalexis
 
Posts: 66
Joined: Thu Dec 04, 2008 1:53 am

Re: SketchUp game exporter (Source)

Postby kwistenbiebel » Sat Apr 18, 2009 6:21 pm

It seems that the PlayUptools are now updated and you can import a Sketchup model with textures and all straight into the sandbox 2 editor. :thumb: ---> http://playuptools.blogspot.com/2009/03/cryengine-mini-update.html

Did anyone try to use it for realtime VIZ yet? Preferably on an architectural model? (screenshots?)
Since I left my copy of Crysis in Belgium when coming to Australia, I would love to know if it is worth to buy a new copy....
kwistenbiebel
 
Posts: 2681
Joined: Thu Nov 22, 2007 6:13 pm

Re: SketchUp game exporter (Source)

Postby Pixero » Sat Apr 18, 2009 9:06 pm

I've just done small test nothing to show yet but its interesting now if SU import is easier. Will test this when time gives...
User avatar
Pixero
Premium Member
Premium Member
 
Posts: 1301
Joined: Wed Nov 14, 2007 2:58 pm
Location: Halmstad, Sweden
Name: Jan Sandström
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: SketchUp game exporter (Source)

Postby Richard » Sun Apr 19, 2009 1:45 am

kwistenbiebel wrote:It seems that the PlayUptools are now updated and you can import a Sketchup model with textures and all straight into the sandbox 2 editor. :thumb: ---> http://playuptools.blogspot.com/2009/03/cryengine-mini-update.html

Did anyone try to use it for realtime VIZ yet? Preferably on an architectural model? (screenshots?)
Since I left my copy of Crysis in Belgium when coming to Australia, I would love to know if it is worth to buy a new copy....


Mate are you really in Australia? We should organise a PPB meeting, though where in Aust?
User avatar
Richard
 
Posts: 1301
Joined: Sun May 04, 2008 3:01 pm
Location: Sydney, Australia
Name: Richard
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: SketchUp game exporter (Source)

Postby kwistenbiebel » Sun Apr 19, 2009 9:22 am

Richard wrote:Mate are you really in Australia? We should organise a PPB meeting, though where in Aust?


[OT]: Yes King, half a year now :enlight: . WA is just wonderful....although you guys probably like to convince me to go East, right?
A PPB OZ gathering would be great.
kwistenbiebel
 
Posts: 2681
Joined: Thu Nov 22, 2007 6:13 pm

Re: SketchUp game exporter (Source)

Postby Richard » Fri Apr 24, 2009 1:50 am

kwistenbiebel wrote:
Richard wrote:Mate are you really in Australia? We should organise a PPB meeting, though where in Aust?


[OT]: Yes King, half a year now :enlight: . WA is just wonderful....although you guys probably like to convince me to go East, right?
A PPB OZ gathering would be great.


Well mate the east has Sydney and Melb! Great to hear you enjoy WA - Aust is a pretty cool place! If you are making to the east any time soon please keep in touch! The drinks are on me to repay in only part for all your inspiration!
User avatar
Richard
 
Posts: 1301
Joined: Sun May 04, 2008 3:01 pm
Location: Sydney, Australia
Name: Richard
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: SketchUp game exporter (Source)

Postby Richard » Fri Apr 24, 2009 1:55 am

BTW I hope your having a shot at learning to surf while here! WA has some great beaches?

Actually funny I say that - haven't been on a board myself for about 20years!


So back on topic! Yes has anyone had success in arch vis with crysis yet?
User avatar
Richard
 
Posts: 1301
Joined: Sun May 04, 2008 3:01 pm
Location: Sydney, Australia
Name: Richard
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: SketchUp game exporter (Source)

Postby Chris Fullmer » Fri Apr 24, 2009 2:17 am

I keep thinking about sitting down and working it out.....but I still have not just done it. I was so excited about it that I went out and bought Crysis and everything. Oh well, maybe someday I'll get to it :)
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6760
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: SketchUp game exporter (Source)

Postby Staatsfeind » Wed Jun 17, 2009 12:37 pm

cadmunkey wrote:Did anyone else on these forums manage to produce anything with the Crysis engine from sketchup models?


yes sure,

last year i did it via dwg-export -> 3dsmax -> sandbox
result: picture1

by now i use zapwizzards way by the use of the collada converter.
result: picture2


still i wish sketchup would support better exports in different formats
or a tool that helps optimizing export for cryengine more easily.
collada is still not meant to be a su->ce2 converter...

cheers
Please, register (free) to access all the attachments on the forums.
Staatsfeind
 
Posts: 11
Joined: Wed Jun 17, 2009 11:43 am
Location: Germany

Re: SketchUp game exporter (Source)

Postby zapwizard » Thu Jul 23, 2009 9:51 pm

Hey, update here:
Valve has released two offical SketchUp plug-ins along with their Left4Dead SDK.
The plugins also work for other Source games, but you have to own L4D.

One plugin lets you export 3D Models, the other world brushes.
It also lets you assign in-game textures and objects if you simple name them properly.

Here are some tips off the top of my head:
1: To make a hammer-style brush in SketchUp group together a block, or group of polygons (if convex) together. If you make a simple 6-sided block as a group or component you can further edit it in hammer the same as any native hammer brush.

2: Use the texture naming schemes given out by Valve. I have even gone as far as to import all the textures and proper names into the SketchUp library so I can apply them easily.

3: Models are much more flexible, but also require more work depending on your texture use. Models can have single-sided faces, and concave surfaces.
Collision models are easy enough to make, but using a grouping of convex blocks, all with default materials and all 100% smoothed.

4: Ensure you don't have any errors in your model, that is lines that don't meet at a corner, stray lines that don't meet another line, or reversed faces. There are some ruby scripts to help clean this stuff up automatically. I will try to find the links.

5: SketchUp defaults all curves to 12 sides, and all circles to 24. You can change this default number by selecting the tool and typing a number in either right before or after you place your curve. This is the NUMBER one reason for high-poly models in SketchUp.

6: Know the limitations. For example the value brush importer doesn't have any UV or texture scaling numbers, so you have to tweak these in hammer. It however does work well for models.

--------------------------

The followings is all part of a campaign I am working on:
http://www.l4dmods.com/forums/viewtopic.php?f=80&t=3097

Here is a model I made in about an hour using SketchUp and only the native materials inside Left4Dead. The model is 100% brush work with some props added.

Reference photo:


Inside sketchup, and also properly geo-positioned


Inside the game engine, with a few quick props added.


-------------

This is a much larger building, which currently only exists as a model, and will be converted into 90% brush work, and 10% model detail. Again this model uses only textures that were already in L4D.

Here is a photo of the real building:
http://www.flickr.com/photos/mcgervey/3299027241/in/set-72157613789552413/







zapwizard
 
Posts: 52
Joined: Tue Aug 05, 2008 10:22 pm
Location: Austin, TX
Name: Joshua Driggs

Re: SketchUp game exporter (Source)

Postby Chris Fullmer » Fri Jul 24, 2009 4:26 am

Thats very cool, thanks for posting it zapwizard. I still have not had a chance to play with these tools :( It looks very promising though! I am excited and I think I have a basic model that I might be able to use with it later, when I get some time.

Thanks for posting this,

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6760
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: SketchUp game exporter (Source)

Postby Richard » Wed Jul 29, 2009 12:26 am

Staatsfeind wrote:
cadmunkey wrote:Did anyone else on these forums manage to produce anything with the Crysis engine from sketchup models?


yes sure,

last year i did it via dwg-export -> 3dsmax -> sandbox
result: picture1

by now i use zapwizzards way by the use of the collada converter.
result: picture2


still i wish sketchup would support better exports in different formats
or a tool that helps optimizing export for cryengine more easily.
collada is still not meant to be a su->ce2 converter...

cheers


Mate are you saying in those last two scenes the models could be exported from SU via collada to ce2?

I'll have to read through zap's method again - I really have a problem with too much tech talk, I'll have to try and dumb it down!
User avatar
Richard
 
Posts: 1301
Joined: Sun May 04, 2008 3:01 pm
Location: Sydney, Australia
Name: Richard
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: SketchUp game exporter (Source)

Postby Gardentwine » Fri Jul 31, 2009 5:32 pm

hi iam new here at this forum and i ve been trying to find all thing to do with sketchup and the source engine, no luck in finding good source of info, but i have looked at what you have done and iam impressed all i wish is there was tools/plugins that can make it easeir to import to hammer with out errors lol

if there is plugins out there that can help in this i would be very greatfull
for instance

a cube tool made by mouse movements that groups when made < could help make Rooms easier

a hollow function or something would be great that groups and offset each side < this would be better than the Cube tool

i hope this didnt sound noobish i was trying to make my own plugins but failed every time i have errors lol :(
Gardentwine
 
Posts: 19
Joined: Fri Jul 31, 2009 4:52 pm
Location: Uckfield
Name: Graeme

Re: SketchUp game exporter (Source)

Postby Chris Fullmer » Fri Jul 31, 2009 5:43 pm

There is a beta version of some SketchUp plugins, but you have to own Left 4 Dead to be able to download them at this point. I have not even had a chance to test them to see how well they work, but it looks like they work pretty well. So go buy left 4 dead and try them out :)

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6760
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: SketchUp game exporter (Source)

Postby Gardentwine » Fri Jul 31, 2009 8:38 pm

hi, thanks for you response, i already have them plugins form valve but there not that stable yet the vmf exported is ok but you need to make blocks and each one has to be grouped for hammer to understand sketchup only has single sides so it become alot harder all iam after is a plugin that are very much or close to what hammer is like or have i miss understood how to make maps with sketchup

skechup bushes are Double sided but on same line

hammer bushes are Double side but are blocks
Gardentwine
 
Posts: 19
Joined: Fri Jul 31, 2009 4:52 pm
Location: Uckfield
Name: Graeme

Re: SketchUp game exporter (Source)

Postby zapwizard » Fri Jul 31, 2009 9:16 pm

According to this page:
http://developer.valvesoftware.com/wiki ... urce_Tools
the SketchUp plugins are now included with the SourceSDK and L4D SDK. They are for sure included with the Left4Dead SDK, all you need to do is own a copy of L4D.

Documentation on the general use of the plugins comes with the SDK.
I don't know programming but it seems like there should be some ruby scripts that could be written to aid with making brush objects for hammer. Specifically making objects into convex groups, and checking for errors. Something I with the exporter could do on its own.

The simplest way for me to model for hammer is to model as normal in SketchUp, clean up the model for any stray lines, revered faces, or broken lines (that don't meet two other lines).
I have explained a lot of this on page three of this thread:
http://forums.steampowered.com/forums/s ... 563&page=3

I am working on some tutorials right now. Once you know the exact process and what to look for making these models is very quick.

In the mean time here are some more 100% brush models I have been able to bring into SketchUp in a short time. Most of them taking just one evening from concept to in-game. All these models use

[img]http://farm4.static.flickr.com/3467/3771577728_5cf96da78d.jpg[/i





More photos here:
http://www.flickr.com/photos/zapwizard/ ... 140531291/


Exporting models instead of brush work is much easier. You can use just about any shape and method you want in SketchUp. The game also preserves the UV for models, but not for VMFs.

The trick comes with physics objects, you basically make a new group that is all convex brushes, 100% smoothed and export that as your collision model.

I made this sleeping cot in less then 30 minutes and had it working in game with physics and all.
I don't have a in-game screenshot though. I re-used a sleeping bag texture from the game so I didn't have to make my own.
zapwizard
 
Posts: 52
Joined: Tue Aug 05, 2008 10:22 pm
Location: Austin, TX
Name: Joshua Driggs

Re: SketchUp game exporter (Source)

Postby Gardentwine » Fri Jul 31, 2009 11:24 pm

Thats really nice model, i just suck, iam a noob when it comes to modding ive can make maps in hammer no problems it just takes alot of time trying to make good looking maps.

pluging idea to make it easier in sketchup would be to use the Examples that came with sketchup, the linetool for instance has mouse options to make the shape in 3d but i tried to make it work by creating a cube but i keep getting errors like its not constant or something.

The other idea was to select an obeject and it will add offsets to each side with a prompt and then groups them all as seperate groups and delete the original entity < this would be like the hollow tool in hammer.

is there any good tutorials in understanding Ruby cause i stuck :(

Just so you all know i own L4d and the tools that come with it, it only allow export SMD and VMF and there very unstable :(
i have made a smd but i cant get it too work it could be that i need to change the script cause i use vista64 and i think the routes dir in the script say Programfiles instead of Programfiles (x86) ive change this but it still only makes the SMD and that it even though the script ment to do it for you!


Thanks for listen i hope iam not to dense and missunderstood the hole thing if i have please explain
Gardentwine
 
Posts: 19
Joined: Fri Jul 31, 2009 4:52 pm
Location: Uckfield
Name: Graeme

Re: SketchUp game exporter (Source)

Postby Chris Fullmer » Sat Aug 01, 2009 1:31 am

so many acronyms and jargon, I have no idea what smd, and vfx, and brush model are. I need to sit down and try this out now that its released more widely. I would be intersted in trying to write some rubies to help with making good models for source.

But to model in sketchup, you don't need to know any ruby. And sketchup is a very easy 3d modeling software, you just have to learn to think like sketchup. Which is easy. Try watching some videos on youtube. It can be very helpful to see how other people use the software in real time.

Chris
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6760
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: SketchUp game exporter (Source)

Postby Gardentwine » Sat Aug 01, 2009 3:32 am

thanks for the reply and sorry for not explaining the formats:

this site explains what the formats mean

http://developer.valvesoftware.com/wiki ... urce_Tools

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 it

but 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
Gardentwine
 
Posts: 19
Joined: Fri Jul 31, 2009 4:52 pm
Location: Uckfield
Name: Graeme

Re: SketchUp game exporter (Source)

Postby Gardentwine » Sat Aug 01, 2009 11:44 am

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 ... urce_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 :(
Gardentwine
 
Posts: 19
Joined: Fri Jul 31, 2009 4:52 pm
Location: Uckfield
Name: Graeme

Re: SketchUp game exporter (Source)

Postby Chris Fullmer » Sat Aug 01, 2009 3:43 pm

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
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6760
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: SketchUp game exporter (Source)

Postby Gardentwine » Sat Aug 01, 2009 7:20 pm

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 nothing

Plugins
(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 textures

Tools
(Crafty) very usefull if you wish to mod the source engine, can convert vmf to obj with textures

here 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)
Gardentwine
 
Posts: 19
Joined: Fri Jul 31, 2009 4:52 pm
Location: Uckfield
Name: Graeme

Re: SketchUp game exporter (Source)

Postby zapwizard » Tue Aug 04, 2009 3:29 pm

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/Concave

The 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/StrayLines

2: 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.
zapwizard
 
Posts: 52
Joined: Tue Aug 05, 2008 10:22 pm
Location: Austin, TX
Name: Joshua Driggs

Re: SketchUp game exporter (Source)

Postby Chris Fullmer » Tue Aug 04, 2009 4:26 pm

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
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6760
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: SketchUp game exporter (Source)

Postby Gardentwine » Wed Aug 05, 2009 11:53 am

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...
Gardentwine
 
Posts: 19
Joined: Fri Jul 31, 2009 4:52 pm
Location: Uckfield
Name: Graeme

Re: SketchUp game exporter (Source)

Postby zapwizard » Wed Aug 05, 2009 3:15 pm

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.
zapwizard
 
Posts: 52
Joined: Tue Aug 05, 2008 10:22 pm
Location: Austin, TX
Name: Joshua Driggs

Re: SketchUp game exporter (Source)

Postby Chris Fullmer » Wed Aug 05, 2009 5:17 pm

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
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6760
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

Re: SketchUp game exporter (Source)

Postby zapwizard » Wed Aug 05, 2009 6:31 pm

That sounds great Chris.

I found this nice bit of code on the SketchUp API blog:
http://sketchupapi.blogspot.com/2009/03 ... 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.
zapwizard
 
Posts: 52
Joined: Tue Aug 05, 2008 10:22 pm
Location: Austin, TX
Name: Joshua Driggs

Re: SketchUp game exporter (Source)

Postby zapwizard » Thu Aug 06, 2009 4:27 am

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.
zapwizard
 
Posts: 52
Joined: Tue Aug 05, 2008 10:22 pm
Location: Austin, TX
Name: Joshua Driggs

Re: SketchUp game exporter (Source)

Postby Chris Fullmer » Thu Aug 06, 2009 7:05 am

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
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer
SketchUp Team
 
Posts: 6760
Joined: Wed Nov 21, 2007 3:21 am
Location: Davis, CA
Name: Chris Fullmer
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: landscape architecture
Level of SketchUp: Advanced

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Not a Premium Member yet? Check out the great time-limited deal we are offering.

Ad Machine
Robot
 
Posts: 2012

PreviousNext

Return to Extensions & Applications Discussions

Who is online

Users browsing this forum: No registered users and 6 guests