A few questions about Sketchup and Unity/iPhone

Im in the planning-stage for making an fps for the iphone using unity, and apparently sketchup can be used to make geometry.

The game will have a very dark ambience with deep shadows, and my question is if sketchup is good enough for making a game like this for the iPhone.

Im particualarly concerned with:

a) The overall estethics of models. Can high enough quality be achieved?

b) Optimization. Apparently sketchup exports a lot of unnecessary geometry which can limit performance. Is this true? Is it enough to be a problem? If so, can you “clean” you sketchup exports from unnecessary geometry?

c) Lightning and shadows. Since Ive been doing mostly 2D (flash) projects previously, this is pretty new stuff for me. Will I be able to achieve the dark, deep-shadow ambience that my budding game warrants? The reason Im asking is that Ive just read this tutorial on sketchup for unity (http://zante.myzen.co.uk/blog/blog1.php/2009/08/28/tutorial-1-let-s-get-started-making-virt) which utilizes a technique called lightmapping. Apparently this means you put “fake” lightning on your geometry BEFORE exporting it to unity. Now, is this really necessary? Doesnt unity have its own shading/lighting-system?

Thanks
/Daniel

I don’t know much about Sketchup, but to answer this question: baked lighting is much faster than real-time lighting, since it’s computed once, beforehand, instead of every frame. Also real-time lighting illuminates every object individually with no regard to any other objects–i.e., no shadows. You can use various techniques to add real-time shadows, but they are all going to be impossible or far too slow to use for an entire scene on the iPhone.

So lightmaps are much faster than realtime lighting and can result in a much higher quality of lighting, but on the other hand are static, and use more memory because of the extra textures you need.

–Eric

I can help with the modelling part.
Sketchup is not a good software for modelling if you don’t later optimize the mesh with a ore pro tool.

There is a difference between dynamic (real-time) lighting and the one which you bake into your textures/geometry.

If you have static (or semi) static environment, then it is always better to bake lighting into textures/geometry - with offline lighting system (provided with most geometry modeling packages) you can simulate lighting more accurately (GlobalIllumination) and relieve device GPU from additional work at run-time.

Don’t know what an ore pro tool is.

I use SketchUp for Unity Indie models and LightUp to create lightmaps in SketchUp to export to Unity. LightUp includes an excellent .fbx exporter so you do not need to buy SketchUp Pro. I get good moody lighting this way.

I do not know how well this will work in Unity iphone as I do not have it yet but I will probably look into it soon. You can download the free demos and give it a try.

Thanks for you input, guys.

I had just read a tutorial on lightmapping using sketchup and lightup when posting the c)-part of my question, and what I didnt really understand was the reason for lightmapping inside sketchup BEFORE exporting it to unity. Since Ive posted last Ive been trying out the first part of the unity-tutorials at learnmesilly.com (excellent tuts, btw), and apparently you lightmap your scenes INSIDE unity. So why the double lightmapping?

Perhaps LightUp is doing a better job? But if not, then couldnt you just export your un-lighted sketchup-file in collada-format, import it to blender, export it in .fbx-format, and then do the lightmapping in unity?

Your model is great! Unfortunately I dont have the iphone-extension yet letting me try models on my iphone, but I will definitely try yours out and let you know of my experience if I get it before you do :slight_smile:

Thanks for the offer - I might just need the help if my artsy childhood-friend falls trough (yes, child-hood friends are by definition untrustworthy when it comes to delivering…but what can you do? :P). Do you have any samples?

I also googled “ore pro tool” but found nothing related. You wouldnt happen to have a link?

Eric5h5 ReJ: Thanks for you explanations - they really made the concepts trickle trough my skull :slight_smile:

/ Daniel

As far as I’m aware, and I only have Indie, Unity only lightmaps on the terrain. Plus it doesn’t do the trees, Plus I couldn’t get it to work when I tried but maybe because at the time I was expecting it to do the trees.
There’s an update coming soon but I don’t know if affects this at all.

You create your architecture in SketchUp and apply your textures. Then you fire up LightUp and light your model. Then, when you have it how you want it, you export to Unity from LightUp.
This creates lightmaps for your model which are effectively painted on in Unity. You can still add lights in Unity for effects and you need them for bumpmaps and specular effects to work but lights in Unity are expensive performance wise so you want to keep them for best.

Blender might be better for lightmapping, I’ve never tried lightmapping in it but it does most things. I’m just used to SketchUp and find it way faster.

You can probably do this much better in things like Maya and Max but £3000 plus major learning curve.

Learnmesilly are the best tutorials I’ve seen for anything (You Suck at Photoshop on Youtube are very funny though) and I recommend Will Goldstones new book too.

Thats no problem on the iphone, as the iphone has no terrain support at all.

For other objects you can use the lightmap script from the wiki though.

My personal bet on a powerfull app to lightmap stuff would be PureLight, currently sold at $350 per seat which support for collada.

I hadn’t spotted the lightmap script on the Wiki, I shall look into that,
Thanks!

Wow, this must also mean that working with lightmaps takes up a LOT of development-time, since you need to export each object in the direction of you light. So if you decide to rotate an object, you need to make another lightmap of that object in sketchup/lightup, and (god forbid!) you decide to rotate your whole directional light in unity, ALL the objects need to be updated. phew Im guessing lightmapping objects is very high on the wish-list for unity.

Yep, getting the book as soon as it comes out in paper :slight_smile: If its anything as good as his tutorials, its got to be great!

Oh, really? Well, it wont affect the project that Im currently planning, since it’s indoors-environment all the way, but it certainly limits the creativity of future projects :confused: I suppose they are working on it, though? Any confirmation from the developers?

I only found this resource on “lightmap script” (http://www.unifycommunity.com/wiki/index.php?title=Terrain_tutorial&printable=yes&printable=yes) and its a bit over my head I feel at the moment.

Am I right in assuming that with lightmap scripts you can export an object, say, 4 times, each with a different lightmapping (left, right, front, back), and then when they are all imported into unity, you can use a script to link the scene’s light with which object (with its individual lightmap) to use at any given direction of the directional light?

That way you could even simulate a daycycle, with enough copies of the same objects, of course.

Im assuming no, though, since that would mean HUGE amount of resources needed, and then whats the use of lightmapping? :stuck_out_tongue:

I’m afraid I can’t find a lightmap script on the Wiki.

There is only one reference to “lightmap script” in this document:
http://www.unifycommunity.com/wiki/index.php?title=Terrain_tutorial&printable=yes&printable=yes

Somewhere in the bottom half, under “Bake tree shadows”.

Btw, when watching the tutorials on learnmesilly.com, a LOT of artifacts ocassionally obscure the video. Is it only my setup, or is the source corrupt? Shame on such good videos, if the latter is the case…

I just watched the demo movie on the iphone publishing site (Unity - Manual: Getting started with iOS), and it contains an open space that I assumed was terrain. But since terrain isnt supported, Im guessing its simply a squared mesh acting as the ground?

sorry mates, ore stands for “other” pro tool, like Maya, 3D max, even Blender.
Sketchup generates many useless faces and don’t weld many vertex. That is what I have been told, and what I have experienced.

Oh right.
Thanks for clearing that up!

OK so how do you optimize in Blender?