Hi everyone,
I have noticed a few questions/converting requests on these boards for Google Sketchup files into Darkbasic. I helping model some worlds for TGC Heroes and am using exclusively Google Sketchup, yet unlike the regular method of using just Convseo, the models come out as .DBO files that load and appear good and normal. That's not to say there is absolutely no problems with them, but generally speaking, the models behave just like models rendered and exported using Blender or Wings 3D.
Why should I use Google Sketchup?
Simply because it's easy to use, quick, and generally considered to be fun to use. On top of that, it has a very shallow learning curve and is excellent for buildings/game maps. However, it was not created to be used as an organic modeler, so unless you are prepared to invest tons of time learning all about the curve functions be prepared to use it as a modeler for primarily static object. However, it can be used to make cars, may seem a bit random to you, but just take a look at 3D Warehouse, some of the cars created in sketchup are incredible.
Alright, so I made a model in Sketchup, can't I just use TGC's free Convseo plugin to load it?
In the perfect world, yes you could. However, I find Convseo annoying to use plus there are some obvious problems. First of all, the way the models load is terrible. As your player/camera moves through the game, the Convseo objects seem to "slide load" meaning that your model completely disappears as you back away from it. On top of that, in my opinion, Convseo ruins the original look of the textures and Convseo by itself cannot really be used to extract a single .DBO file that you can then offer to team members/ the community/ for sale.
Ok then, so is using Sketchup with Darkbasic Pro possible effectively possible?
Yes! That's what this tutorial is about, keep reading
Right, so first you will need the following applications before you can begin.
-Darkbasic Pro
-Sketchup (note you do not actually need version 5 which Convseo supports as you can save files in version 6 as version 5 files.
-Convseo (can be acquired through the main TGC site, look in plugins or the Convseo board(
-Underdue's Model Extractor
http://forum.thegamecreators.com/?m=forum_view&t=105941&b=31
-WinRAR (google it if you don't have it)
Ok so now, assuming you have made a model in sketchup, open it up. If you are using sketchup 6, make sure it is saved as a sketchup 5 file. In sketchup go to File>Export>Google Earth. Make sure you choose the Google Earth
4 (very important!) format. Ok, thats all the work you will need to do in sketchup, so close it.
Now, open up the Google Earth 4 file, which is a .kmz with WinRAR. You will find that WinRAR is able to extract the contents of the kmz just like any zip file. SImply unzip it to the directory of your choice.
Still following? Now open up Underdue's source code (the DBPro file) and change the necessary parameters (file location, location for .dbo file, and .dbo file name). The source code is really well commented so it should not be a problem. Then simply launch the source code and voila! You are finished! You will find the .DBO file in the directory you specified and you can view the DBO file in the model viewer that the source code includes.
But wait! When you view the model in the model viewer or load it into any other program that some areas of the texture appear grey or the texture is dull. This is NOT a problem with the file or the loading method, this is simply a lighting issue. Use the following code
set object light objnum,0
That will make the object unaffected by light and make all the textures appear nice and bright. Of course, if you want shadows and light then by all means use the light commands. However, be warned that the default light applied the the .dbo model is terrible!
Now you should have a good idea of how to import sketchup files! If you want further instructions take a look at my tutorial video
http://www.youtube.com/watch?v=IYkHAy08fH4 Be warned though! The tutorial recording program refused to record sound and I had no time to do a proper voice over, therefore, use the video only as a rough guide and read the written tutorial first!
Any questions, comments, concerns, or criticism please post!
Data