Jump to content
Sign in to follow this  
hcpookie

Importing Models from Blender and SketchUp

Recommended Posts

Per the Sketchup EULA, those who upload their models agree that they can be downloaded and used by others as they see fit (so long as not for commercial or other money-making purposes). That is a huge resource for addon makers that can't be beat! Do we as addon makers have any restrictions on what can/cannot be imported? If it is "public" is it OK for us to import? I have a few questions about the mechanics of this import process at the bottom of this LONG post...

You can save Sketchup models as .SKP files on your drive. Often the models are available to save as a Google Earth format, and sometimes as a Collada .DAE file. Note that the Google Earth format uses .DAE files. The Google Earth file is actually an archive… change the file type to .ZIP and you should be able to open the .ZIP to find the .DAE file. Save that .DAE file…

But I know you're saying, "Hey Pook, Oxygen can't directly import .DAE files!" You are correct. It CAN however import .OBJ files! So you need to convert those .DAE files into .OBJ files. Note that Oxygen can also read .3DS files… but you must have all the .3DS support files present, otherwise it will error.

======================

Exporting models

======================

The Free version of the Sketchup software will allow you to export .OBJ models during the "free" period which (I think) is the first 600 minutes. After that period, I have read that the Export option is disabled, although you can continue to use Sketchup's normal features. OK Fine, whatever… I have surfed around the web and found a very nice little plugin tool that is not time-crippled and allows the Free version of the Sketchup software to export to .OBJ model format that can be read from Blender and (sometimes) from Oxygen. Note that you must create a free account at this site to access the plugin! … there are also some other goodies at that site so it seems worth it. Installation instructions are right there where the "click to download" link is located… just copy need to copy the file to the right location:

http://sketchucation.com/forums/viewtopic.php?f=323&t=33448

I have tried this plugin and it works! It makes the .SKP files into .OBJ files. There isn't really anything else to say about it. I have successfully imported several models directly into Blender (and sometimes Oxygen) using this method.

Once exported, you MAY have a Sketchup model that may be directly importable into Oxygen with no additional smoothing required. Then again you may not! When you can't import an .OBJ model directly via Oxygen, it may be due to a non-readable section such as an animation, etc. that is a part of the model. BLENDER TO THE RESCUE! The trick I have found is that you can remove those layers in Blender, then export the model again.

======================

Converting models in Blender

======================

Let's assume Oxygen gives a "cannot import" error of some sort. What next? Load up Blender...

Choose File > Import… > Collada .DAE

- or -

Choose File > Import… > .OBJ

… depending on the model type.

You should now have a 3D model in blender. You can save it as a .BLEND file for further work… often the scale and placement is WAY off! Meaning the model is so large it appears to not be present. It is probably there, just need to zoom out or "select all" and rescale. When you're ready to convert it:

Choose File > Export .OBJ

To save the newly exported .OBJ file again. This can strip away much of the un-readable junk you won't be needing. The goal is to get it into Oxygen anyway.

Try importing in Oxygen. Still have an error? Go into Blender again and export as a .DAE format. To do that, choose File > New (very important!) and then try to import the new .DAE model. Then file > export to a NEW .OBJ file. Again, the trick is that this import/export process can strip away some of the non-essential layers you won't be needing. I have been able to achieve success for every model with an issue via this layer remove/export/re-import/re-export process. So far… :)

======================

Importing models

======================

In Oxygen, choose File > Import .OBJ

If you don't get any errors, you now have an imported .OBJ file you can save as a .P3D file - success! :cool:

OK. Now what? The TYPICAL thing you'll find is that the models are just too detailed to even work in Oxygen. Lots of cleanup to do. Save often! Save different versions! You may go off on a poly reduction process and find you screwed up the model. Instead of restarting the entire process, if you save a 2nd copy of the model you can save yourself a ton of headaches! Ask me how I know :)

Poly reduction

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

This is the first thing I do to fix it in Oxygen:

1. Select a component in the model.. e.g. a wheel or other individual part.

2. Points > Merge Near…

3. Select a good value to use and merge!

4. Repeat for the other components in the model.

CTRL+Z will be your friend because you'll quickly find you cannot merge without losing some of the structure. There's a happy medium between merging and preserving the model shapes! That is why you MUST do this component by component. Do it all-at-once and your model will quickly start to look like something else. Have fun with this part...

Reversed Polygons

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

The imported polygons are almost always reversed… you'll need to use Oxygen's reverse faces feature - the "W" key - to reverse those to be facing outward. Some models were obviously half-built and then mirrored along the Z-axis to save time. So you'll have "half" the model facing the wrong way in Oxygen. Tedious to fix that with the "W" key… I have found it is sometimes easier to do this BEFORE you reduce the poly count depending on the condition of the model. Tweaking in Blender may help this process depending on the condition of the model.

When you are done with the tedious merge process, you'll hopefully have a model with as few polygons as you can manage to keep the shape. Remember the more triangles the engine must render, the more your game will stutter, so this is a worthwhile endeavor.

Extra texture mappings

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

You'll often have textures mapped to the imported model that can't render in Oxygen, and while you can edit the model, you'll never be able to load it in Buldozer. Here's what I do to remove that data:

- Open a 2nd instance of Oxygen.

- ALT+TAB back to your model.

- "Select all"

- Copy

- ALT_TAB to the 2nd instance of Oxygen.

- Paste.

- "Save As" a copy of the model.

You will now have a model with no extra texture/material mappings.

======================

Issues / Questions

======================

1. You lose the texture mapping during this import process. Has not been a problem for me… yet. Still I would like to know how to import the textures along with the 3D model itself. Blender doesn't seem to recognize the textures but I'm sure there's a way to do it… ???

2. There are polygons that get imported as double-sided polygons. According to all the Blender tutorials, technically there is no such thing as a single-sided polygon; the "missing" side is actually "just" a transparent side. OK… the problem is that in Oxygen it brings in both sides as a polygon. You can select face-by-face to remove these polygons… is there a batch process or some way in Blender to render all internal-facing polygons as transparent? Or assign them to a specific texture???

Edited by hcpookie

Share this post


Link to post
Share on other sites
Per the Sketchup EULA, those who upload their models agree that they can be downloaded and used by others as they see fit (so long as not for commercial or other money-making purposes). That is a huge resource for addon makers that can't be beat! Do we as addon makers have any restrictions on what can/cannot be imported? If it is "public" is it OK for us to import? I have a few questions about the mechanics of this import process at the bottom of this LONG post...

1. I do disagree about google warehouse being the place to go for mesh resources. Sketchup as a software is intended for a different purpose (quick and easy 3d model creation), but NOT for game ready 3d meshes. I will always prefer to model something from scratch rather than try and get up to specs somebody's elses mesh. Your best resource is your own personal modelling skill. (even for retopo jobs, sketchup meshes can actually be out of size or proportion to worth the time).

2. please try to use "I" instead of "us" or "we".

3. there is no restriction on those meshes afaik, as long as the IP tree is respected. After all, the meshes are still their own intellectual property

4. understand that none of those meshes were created with a real time engine in mind. ArchViz at most that is. Sketchup models have no UVWs, and most of the time (as you explained the issues with importing in O2, the meshes contain lots of ngons and improper topology).

======================

Exporting models

======================

======================

Converting models in Blender

======================

======================

Importing models

======================

Your workflow is a bit...long winded if you ask me. Blender should be able to import kmz files and dae files afaik. Why the need for a 3rd party plugin i wonder?

Poly reduction

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

You are better of using blender reducing tools. Doing it manually in Oxygen can be frustrating to say the least

Reversed Polygons

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

Depends on the exported options.

Remember the more triangles the engine must render, the more your game will stutter, so this is a worthwhile endeavor.

False. There is more important things such as sections that affect the so called "stutter".

Oxygen supports only 32k vertices normals (dx9 hardcoded). You cannot have more (not unless you proxy those, or until a3 tools are released - which is a maybe)

======================

Issues / Questions

======================

1. You lose the texture mapping during this import process. Has not been a problem for me… yet. Still I would like to know how to import the textures along with the 3D model itself. Blender doesn't seem to recognize the textures but I'm sure there's a way to do it… ???

2. There are polygons that get imported as double-sided polygons. According to all the Blender tutorials, technically there is no such thing as a single-sided polygon; the "missing" side is actually "just" a transparent side. OK… the problem is that in Oxygen it brings in both sides as a polygon. You can select face-by-face to remove these polygons… is there a batch process or some way in Blender to render all internal-facing polygons as transparent? Or assign them to a specific texture???

1. The mapping in sketchup is projected only. The meshes (as you can check in blender) have no UVW (or improper ones anyways).

2. You are talking about backface culling. The vertices normals or face normals in this particular case dictate the direction of the face. It can show both ways. Because in this wonderful polygon world, there is no such thing as double sided polygons (if you were to give a plus for the "outside" face and a "minus" for the inside face, then all polygons will always have a + and a - There is no +/+ faces, not -/- faces -render engines can be told to treat a single polygon as double sided though, and afaik sketchup has this feature "always on" which is one of the reasons it exports that way). d

x9, as well as rv engine (although you can have polygons as set to double sided) you will always have backface cull on. By briefly checking the net, you cannot have backface cull on in blender's viewport

In oxygen, say you want to make a piece of paper, or any other object where you can disregard the thickness of it . You will have to duplicate the polygon, then reverse it in order to have it double sided. Hope that makes sense.

Share this post


Link to post
Share on other sites

Thanks for the additional info! Helps me understand things better. I freely admit I'm not that good with the tools so the reduction actions within Blender are something I've yet to experience. I personally find it incredibly difficult (boring?) to make a model from scratch vs. importing a pre-existing model. Granted it takes about the same time to do either! LOL Hopefully my sharing of the conversion stuff will be helpful to others...

Share this post


Link to post
Share on other sites

I used to save the sketchup file and pass it to modo or blender I can't remember off the top of my head, import then hold shift + t and it converts polygons to triangles then export as .obj so then it will go in oxygen but a few faces will have to be reversed and you have to resize the model I have used a few sketchup models as place holders here and there. Quick and easy to do.

Share this post


Link to post
Share on other sites

I've watched models being constructed in sketchup.And I must admit,it does seem quite intuitive.

The trade-off for this though is a lack of concern for the layout of the underlying mesh.As Pufu

mentioned,this is fine in a purely visual sense.But if you need to edit it again,later on,it can be a

real pain.

If you are already using Blender for exporting,then consider investing a bit more time in it.

Tools already exist to create models for current generation games.Unwrapping,texture painting,

poly reduction,convex hull creation,sculpting,baking and rigging.And of course addons and scripts

already exist for P3d export.

I will always prefer to model something from scratch rather than try and get up to specs somebody's elses mesh

I would encourage anyone to make their own models from scratch.The benefits outweigh time spent.

You have less to worry about in terms of IP.And you're learning something new.Although everybody

has their own skill level,I've yet to meet someone who couldn't create something interesting.

It just needs some patience and practice. :)

Share this post


Link to post
Share on other sites

Sorry to bump this very old thread.

But I`ve seen quite a few new people, just like me.

Ive wanted to comment that Ive been using SketchUp to make 3d models of buildings and is pretty simple and easy. And this tutorial from cookie, helped me get anything Ive built in SketchUp into O2.

Ive tried Blender, 3dsMax and O2, but couldnt get the gripp on them. SketchUp is simple and easy to learn.

Only issue that I have found is that it creates too many triangles (it could be me, being a beginner...) and that the textures do not get exported/imported into the game.

Any idea how I can make sure the textures goes with it, or at least a way to reapply the texture on the blender with the Sketchup Textures?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×