Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 26/7/11 15:12

Lukas Kreator
Member
Registered: 7/5/10

Sketchup tutorials for making levels

Okay, EdT asked me to make a tutorial on making levels with Google SketchUp, and I liked the idea. Anyway, this tutorial couldn't be done if it wasn't for the help people gave me on making my own level. I'll be assuming you know some basic concepts of models, including "face" and "line".

Firstly, I'll be using Google SketchUp 8, the latest at the time of this tutorial, but not much should change if you have a different version. I will also be using the word "CTRL", but you should be able to find the equivalent key if you are using a Mac. For my tutorials, I will be using meters as my measure, just because that is what we use here, and I don't like to convert measurements XD

1 - Getting Started

First, you will want to download SketchUp from here. Installing it is pretty simple and fast.
When it starts up, choose the "Simple model - Meters" model.

Now, I will explain a bit about the basic tools you will need in SketchUp:

- Line / Rectangle / Circle - These are the tools you will mostly use. You draw stuff with them. BTW, circles are composed of 23 or 24 lines, I think.
- Push/pull - This is a cool guy some modellers know as "extrude". It is used to push and pull faces of things, and change the volume of objects.
- Move / Rotate - The move tool translates the position of any object (line, face or group, or a selection). The rotate tool rotates objects around an axis.

We can have precise measures with all tools: just type numbers and press ENTER. In the case of a rectangle of 1m by 1m, just start drawing a rectangle by clicking on the floor, type "1;1", and press ENTER.

We will now make a little level as example. I won't actually test it, for now, but I will give you all instructions you need if you are going to test it yourself.

2 - Making an arc

We will start by making an arc, not a completely monumental arc, but something people can walk under. Before starting, know that the measures can seem a bit weird, but you will know why.

Start by deleting the person figure SketchUp gives us as measure, because the measures here will be different. You can choose if you want some help from that help window on the right, or if you want more space, by closing it. Now make a floor with the rectangle tool (2.5x2.5 meters), like this:

tut1.jpg

You will find out that SketchUp helps us with a lot of "helper" lines and points, and that is great. You can easily find, for example, the exact point of origin on the axis, or the middle of any line of that rectangle. While drawing things, you should keep in mind that Konoko will have, more or less, 0.46 meters, after we do some conversion and stuff later.

Now, a floor is not just a rectangle, it has some height, or it would break (in real life). So let's make it a box by using the push/pull tool. Click on the rectangle with that tool selected, and type "0.1".

tut2.jpg

Now, go to another place, using the orbit and pan tools (shortcuts: Middle Mouse Button and SHIFT+Middle Mouse Button) and draw a smaller rectangle (0.1x0.5 meters). Then, pull it to an height of 0.68 meters.

tut3.jpg

Now, we will use some random tools, wich you can find easily in the toolbar.

Use the equidistance tool to draw another rectangle onto the side of the box you made (use 0.03 as distance). Draw an arc on it, using the arc tool, from the middle of one line of the smaller rectangle to the other side, to the middle of the other line (curvature/bend: 0.24). Calm down, we have images smile

tut4.jpg

Now, select the bottom line of the smaller rectangle and delete it. Draw two lines down, finishing the side lines of what was a rectangle.

Here's the cool part smile Use the push/pull tool on the rectangle with rounded top you made, and push it front the most you can. Now you have just the margin, and that makes an arc!

tut5.jpg
(The purple cilinder represents Konoko, more or less)

3 - Using the arc

Now, you will learn about how cool is SketchUp. Select all that arc and right-click on it -> Make component (could be a bit different for you). Name it anything you want. Now use the move tool and click on the bottom, right, front, of it (remember to have the arc selected first, when you do this). And move it to the floot platform we made.

tut6.jpg

Don't mind the extra lines in the arc. You can delete them if you want, but they will not be visible anyway.

Then start moving the arc just like you did before, and clicking on the same spot, but now press CTRL after you beggin moving it. It is copied! Place it exactly at the side of the first one. Now, before anything else, type "4x" and press ENTER. Now, wasn't that amazing? big_smile

tut7.jpg

Okay, so you want to make another set of arcs, connected to the first one? Like if you were making a rectangle? Let's do it.

Using the measure tape tool, click on the middle of any line of the floor, and draw to the middle of any other, except for the opposite side. You just have to move your mouse to the middle of the other line, because the guide line won't follow you. Now you have a guide line marking the middle of the floor. Just do the same with another side of it, except for the opposite.
If it is not drawing any guide lines, press CTRL to enable that.

tut8.jpg

Now, just as with the move tool, you will copy stuff using the rotate tool. First, select all arcs, then select the rotate tool and click on the intersection of those guide lines. Then, press CTRL and rotate everything exactly 90°. It may look weird at the interception of the arcs, but that won't be a problem in the game. Also, we could just have made a pillar to hold these arcs, but we didn't for the sake of simplicity (but you would make it by drawing a rectangle on the floor and pulling it, easy using helper lines).

That is what you got:

tut9.jpg

Before proceeding, you should do the last changes to the arc. You can do this by double-clicking any arc and editing the component. That will change all arcs. Now, components are not recommended in Oni level models. It is recommended that you select all arcs and right click -> Disassociate. After that, you won't have the chance to edit them anymore. You could also apply textures before doing that.

4 - Applying textures

Before applying textures to specific objects, you should ensure that you apply any texture, but to all objects at once (CTRL+A) so you don't get any face without textures.

Well, it is a pretty simple process and SketchUp gives us a nice number of resources to start with. Click on the paint bucket and take your time by messing with the texture libray.
You can also open an external texture by clicking the "Create material..." on the side. Just check "use texture image" and select it using the dialog. You can also tint it.

Here's what I got:

tut10.jpg

I know it is pretty shitty but it will do :3

Oh, wait! But what is that red circle marking? That is a back face. They will not be visible in Oni. Just right-click -> Invert face. However, do not do as me, I should have textured everything before applying individual textures. Also, I should only apply textures after modelling stuff completely and inverting back faces.

5 - Exporting

The most annoying part tongue

Well, first, disassociate all components and delete them from the components window (Window -> Components), also delete all textures wich you are not using. SketchUp may insist that you are using a texture you are not. If you are sure of that, delete it anyway. Then, select everything and right-click -> Make group. Now click on File -> Export -> 3D Model. SketchUp will convert the model to a Collada .Dae and will put all textures in a folder for you. You should import the textures manually as Rgb32. Well, before importing the level, also open it using any text editor and change this line: <unit meter="0.2536blablabla" name="inches" /> to this <unit meter="0.1" name="decimeter" />. That is important and will also make so that the measures we used work.

At this point, you should be able to put all textures, the level, and the required files as told by EdT in a package. You can take the Junkyard package as example (as I did smile).

Honestly, importing the level takes time. Until you find a good way, it will take some of your time and you will import/export/edit/convert a lot of times. Once it works, you just have to change things and export, for any changes you want to make after.

6 - Also

Also, I may have made mistakes and you might need more help. If that is the case, just post below.

Final result (with pillars at the corners):

tutFinal.jpg

This is the file: http://www.2shared.com/file/xtgpBkVM/ArcHouse.html

Thanks

Last edited by Lukas Kreator (26/7/11 18:27)

Offline

#2 26/7/11 16:39

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Sketchup tutorials for making levels

I'm assuming this is still a work in progress?  Because a lot of the images are currently broken.  Also, Macs have Shift keys or else how would we capitalize anything? tongue  And you wrote "decimiter" above, but I think you mean "decimeter".  Haven't taken the time to read the whole thing yet, but I wanted to point out those items.


byproducts are fine, but where's the beef?

Offline

#3 26/7/11 16:48

Lukas Kreator
Member
Registered: 7/5/10

Re: Sketchup tutorials for making levels

I changed what you pointed out and fixed the images.

Last edited by Lukas Kreator (26/7/11 17:07)

Offline

#4 26/7/11 17:14

TOCS
Member
From: Denmark
Registered: 4/4/07

Re: Sketchup tutorials for making levels

Great tutorial for those who are interested in creating levels! The program kinda reminds me of Autodesk Revit.

Offline

#5 26/7/11 17:21

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/07
Website

Re: Sketchup tutorials for making levels

Lukas: Thanks for the great tutorial.

Were you able to convert your model to an Oni level? A must point for a tutorial, it has to work smile

Offline

#6 26/7/11 18:07

Lukas Kreator
Member
Registered: 7/5/10

Re: Sketchup tutorials for making levels

Well, at least you know how to make levels, importing them is another thing XD

Just kidding, I'll make it work.

Offline

#7 26/7/11 18:17

Gumby
Member
From: Seattle, WA, USA
Registered: 30/8/07

Re: Sketchup tutorials for making levels

Lukas, you should be able to specify rgb32 in the command line.


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#8 26/7/11 18:24

Lukas Kreator
Member
Registered: 7/5/10

Re: Sketchup tutorials for making levels

Nevermind, there's wrong information there, I think.

EDIT: Argh, I couldn't make it into an actual level, but I can export and convert it, at least.
I did what I could but I was too tired because of yesterday.

Last edited by Lukas Kreator (26/7/11 19:08)

Offline

#9 26/7/11 22:26

Samer
Member
From: Lebanon
Registered: 4/9/09
Website

Re: Sketchup tutorials for making levels

mm big_smile i want to make a building where on each level it's decorated differently and on each level u fight a different custom character ^^


Join our Oni Facebook Group
Check My YouTube Channel for my Oni Videos.
Check My Wiki page for all my stuff

Offline

#10 26/7/11 22:28

Lithium
Member
From: Colorado
Registered: 17/10/08

Re: Sketchup tutorials for making levels

I say we make an OCF Building and design it like an evil corporation that won't let the game Oni die and just keep experimenting with it, the only known survivor is Yoriko who is locked up in a cell and must be rescued from the evil forces that lurk in there. ._.


Oni IRC | Kumite! Kumite! Kumite!

Offline

#11 26/7/11 23:22

Lukas Kreator
Member
Registered: 7/5/10

Re: Sketchup tutorials for making levels

@Oxe: lol

@Samer: you can make one level and copy it many times above, and then use "disassociate" and edit them singularly.

Everyone, keep in mind: even if I'm not fully aware of it, some things can break the .dae for some reason and make them appear in weird positions and angles.

Offline

#12 27/7/11 0:30

Mukade
Member
From: Ottawa, Ontario - Canada
Registered: 29/5/07

Re: Sketchup tutorials for making levels

What would be cool is if we could find an "office" type map, and get a team to tweak it to fit the Oni universe. Then it would simply be a matter of writing up a script to make us a brand new BGI level. I suppose we could even try actual layout from scratch, and place objects from the game, including other generic things that we may come across online. Obviously this would be months or years to finish, not to mention start.

I think with this seemingly elevated interest in map creation, a few people from the AE team should come up with maybe a floor plan of what this level may look like. I've already seen some planning and such, but this could be the next step. Actually creating it would come later, but it's something to consider.


"He looks mean enough to tear my arm off and beat me to death with it. In fact, he looks mean enough to tear his OWN arm off and beat me to death with it."

Offline

#13 27/7/11 1:53

Lukas Kreator
Member
Registered: 7/5/10

Re: Sketchup tutorials for making levels

Seems great, but I'm not particularly good when it comes to put furniture inside buildings tongue

However, a number of people could possibly help. I like the idea. We will need a BGI building sooner or later.

Offline

#14 27/7/11 2:10

Mukade
Member
From: Ottawa, Ontario - Canada
Registered: 29/5/07

Re: Sketchup tutorials for making levels

I didn't necessarily mean you, and it probably wouldn't be one person either. Probably get one person to do the building structure, another to do the essential objects in the game, and one or two more to add detail.


"He looks mean enough to tear my arm off and beat me to death with it. In fact, he looks mean enough to tear his OWN arm off and beat me to death with it."

Offline

#15 27/7/11 5:39

Dirk Gently
Member
From: Boston, MA
Registered: 12/6/09
Website

Re: Sketchup tutorials for making levels

Pretty awesome tutorial. So easy even I can do it.

Offline

#16 27/7/11 7:32

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Sketchup tutorials for making levels

Mukade wrote:

I think with this seemingly elevated interest in map creation, a few people from the AE team should come up with maybe a floor plan of what this level may look like. I've already seen some planning and such, but this could be the next step. Actually creating it would come later, but it's something to consider.

Since you mention it, let's just say that things are already in motion wink  There probably won't be an announcement for at least a couple weeks, but I will say that we are definitely interested in embarking on that project now that the tools are ready.


byproducts are fine, but where's the beef?

Offline

#17 27/7/11 8:45

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/07
Website

Re: Sketchup tutorials for making levels

Lukas: Since you enjoy programming, what about writing a cross-platform level importing tool?  It would be simple, just a few essential commands for levels and textures.

One feature would be to use levelx_Final folders directly, to speed up the testing phase. You install the files into that one level and build that one level.  That's my workflow, much faster than using a package and waiting for all the levels to be re-built  The open levels are 5, 7 and 16, well, open if you don't have the Arena or Maze levels installed smile

Also, the tool can assist with making pathfinding grids.  Not hard, just a couple more OniSplit commands.

What do you think?  If you are willing I can give you more details.

Update: This version of OniSplit should import Sketchup dae with no modifications: http://edt.oni2.net/OniSplit/OniSplit56.exe.zip

Offline

#18 27/7/11 10:49

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Sketchup tutorials for making levels

EdT wrote:

Lukas: Since you enjoy programming, what about writing a cross-platform level importing tool?  It would be simple, just a few essential commands for levels and textures.

Yes, that might be helpful.  And we don't care what language you write it in as long as it's cross-platform wink

The open levels are 5, 7 and 16, well, open if you don't have the Arena or Maze levels installed.

16 is no longer free wink  Why is it again that we're using those level gaps?  Can we start using numbers higher than 19?


byproducts are fine, but where's the beef?

Offline

#19 27/7/11 11:28

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/07
Website

Re: Sketchup tutorials for making levels

Well those levels have ONLD files, so it is easy to test a level in those slots.

Levels 15, 17 and 20+ requires us to make an ONLD files, which I did for the Junkyard level which uses level15

16 is no longer free

  What we have to pay to use this level?  is it a patent issue? tongue

Offline

#20 27/7/11 12:14

Iritscen
Moderator
From: NC, USA
Registered: 22/10/07

Re: Sketchup tutorials for making levels

It just seems that we're asking for conflicts when people start really making levels, if we let them use those gaps.  New levels should have unique numbers just like the actual mod packages.  You ought to know what 16 is being reserved for, check the wiki's list of level names wink


byproducts are fine, but where's the beef?

Offline

#21 27/7/11 12:21

EdT
Moderator
From: Los Angeles, CA
Registered: 13/1/07
Website

Re: Sketchup tutorials for making levels

Iritscen wrote:

New levels should have unique numbers just like the actual mod packages.

I agree, we should start releasing new levels on 20+ Though it may require the persist.dat be modified to use higher levels and a custom ONLD needs to made for the package.

But for testing using the gaps levels is fine.

I know about level 16... tongue

Offline

#22 27/7/11 16:25

Samer
Member
From: Lebanon
Registered: 4/9/09
Website

Re: Sketchup tutorials for making levels

the BGI Hq level that's not a secret tongue the hexagon occupies that slot and uses that name ..


Join our Oni Facebook Group
Check My YouTube Channel for my Oni Videos.
Check My Wiki page for all my stuff

Offline

#23 27/7/11 16:32

Lukas Kreator
Member
Registered: 7/5/10

Re: Sketchup tutorials for making levels

My my, this thread is a hit smile

Firstly, a level importing tool? I'd need more information. You mean like replacing OniSplit or replacing Install? Or automating the process of converting the level and textures?
That would be complicated... For cross-platform, I'd probabily use RealBasic, but I don't remember of any .dae parsing library, so I'd have to kinda make my own, parsing the XML of the .dae myself.

And you can use the other levels. I just used 5 with partenon because... Not much people applied my patch and stuff...

But for that, I recommend some kind of tool wich counts the number of level packages you have, creates some files, and assigns each level to a number, counting up.

And thanks for that OniSplit, I'll give a try.

Last edited by Lukas Kreator (27/7/11 16:35)

Offline

#24 27/7/11 16:41

Dirk Gently
Member
From: Boston, MA
Registered: 12/6/09
Website

Re: Sketchup tutorials for making levels

or you can use C++ and use an open source library for parsing model files smile

Offline

#25 27/7/11 16:42

Lukas Kreator
Member
Registered: 7/5/10

Re: Sketchup tutorials for making levels

The problem is the "cross-platform". Would you compile it for me? :3

Offline

Board footer

Powered by FluxBB