Gile[s]…Part One

i’m following you so far bazza, pirate

Part One
The link to the Gile site…
[img:jl02j0yb]http://www.frecle.net/index.php[/img:jl02j0yb]
<!– m –><a class="postlink" href="http://www.frecle.net/index.php">http://www.frecle.net/index.php</a>&lt;!– m –>

Click the Community tab and take a look at some of the screenshots.
The House of Dark is extreemly good.

You can download this Deck scene here as a Gile .gls file.
It will load into either the demo or full version of Gile
.
[img:jl02j0yb]http&#58;//www&#46;frecle&#46;net/tutorials/DeckScene&#46;zip[/img:jl02j0yb]
<!– m –><a class="postlink" href="http://www.frecle.net/tutorials/DeckScene.zip">http://www.frecle.net/tutorials/DeckScene.zip</a>&lt;!– m –>

Here’s a link to the download section of the Gile site.
[img]http://www.frecle.net:80/index.php?show=products-�ion=gilesandsub=download[/img]
<!– m –><a class="postlink" href="http://www.frecle.net:80/index.php?show=products-">http://www.frecle.net:80/index.php?show=products-</a>&lt;!– m –>�ion=gilesandsub=download

You’ll find some of Fredborg’s demo scenes here.
Worth downloading so you can get some idea of how to set stuff up.
There’s also a demo version of Giles here, Free!!!
But the save is disabled ( wouldn’t you know), however for anyone thats intersted but not to sure about it all it’s one way to check it out.
All the scenes should load into the demo version ok.

A basic overview of the Giles GUI.
I can’t cover everything here but I’ve covered enough to show how the Deck scene was lightmapped

I’ll try to do a basic tutorial on how I use Gile, it can be a bit confusing at first, not knowing exactly what it is you’re supposed to be doing. This could be a long tutorial so stay with me.
I’ve included it in the Mini Tutorials Hints and Tips section of the forum. It’s not really a 3DC tutorial but as I will be using the model used in the Extruding a Scene tutorial which was created with 3DC I thought this would be the best place for it.
No doubt Richard will move it if he thinks otherwise.

You need to have some idea of what Gile does, and how it does it, I’ll try to keep this as brief and as clear as possible. Any questions, please ask or use the Gile forums.

It’s main purpose is as a lighmapper ( although there are some basic modeling tools and primitives).
It allows you to position different types of lights within the scene ( spot,omni,directional), adjusting the colour, intensity, scale and range of each light.
When you have some lights set up you render the scene.
All the shadows and highlights created by the lights are generated onto what is called a lightmap ( think of it as another texture, stretched across all the faces of the model).
If you just want to just use Gile
to render your scenes/models thats ok, use it as such. It will do a great job.

If you want to export the scene to a 3D engine….
When you export the model from Gile
the lighmaps are exported with the model just like the textures, so when you load it into a 3D Engine you get all the nice shadows you created in Gile

There are some exceptions to this depending on the file format you use when you export the model.
The Blitz .b3d format you just need to export as a .b3d file and load it into Blitz3D
I’m not sure about the Dark Basic .dbo files …hopefully the same as Blitz
Exporting as a .x file needs extra work in the 3D Engine. When you export as a .x file, it creates two models, one carries the texture information the other the lightmap information and you need to blend these two models together in the 3D engine.
This isn’t a Gile
export problem, it’s the way the .x files work…crap really.

The thing I like most about Gile is how it renders the geometry of the models…. it’s texture/material based …ie
When the model is first loaded, you select each texure in turn and assign it to either a lighmap, No lighting or Vertex lighting.
For each texture/material you can adjust…
1) It’s colour
2) It’s Alpha level (1.0 fully transparent, 0.0 = invisible)
3) It’s Shininess
4) It’s Self Illumintion
5) It’s Blend Mode (Alpha, Multiply or Divide)
6) It’s Effects ( Fullbright, Flat/Smooth shaded, Vertex colour, Recieve Fog/ No fog, Vertex Alpha, Two Sided)

For each texture/materials lighting properties you can set it to…
1) Receive Back light
2) Cast Shadows
3) Receive Sahdows
4) Affect Global Illumination
5) Receive Global Illumintion

If thats not enough, each material has up to 7 differnt texture layers, 6 actually because one layer is reserved for the lightmap. so you could if you wish layer 6 differnt textures together on each material.

If the above looks a bit off putting don’t worry about it…I’ll try to run through each bit as I come to it.

But a quick example from the deck model in the Extruding a Scene tutorial…
The bright light texture was set to No Light and Fullbright to make it glow, No Light means it won’t recieve any shading from the lights within the scene.Cast shadows and Recieve Shadows was turned off
The wall panels were set to Fullbright, FlatShaded (because the walls are flat), Cast Shadows, Recieve Shadows, Affect and Receive Global Illumination were all turned on.
The pipe texture were the same as the above but Flat Shading was turned off ( Pipes ain’t flat, they’re round)

Again please don’t be put off by any of the above, once you get the hang of it, it becomes second nature.

The GUI…..
So you load your model into Gile and you should be looking at something like this.(Pic1)
To load a model. use the File Menu and select Open
If you’re background colour is grey and you want it black ( or any other colour) open the Windows menu click on Prefs (See pic2), in the bottom panel, select Viewport Background, click the colour swatch and choose your background colour.
I change this quite often as the scene progresses if things get difficult to see, especially true with a dimly lit scene.
I can start with black and end up with a light grey background.

I’ve loaded the model in as it was exported from 3DC as a .x file.
I don’t normally do this because of the way 3DC exports the material names in .x files. More on this later but for this tutorial the .x file will do.

You have the model in the center of the Gile 3D world just as in 3DC.
To navigate around the scene, click the Camera button if it isn’t allready selected. Top left ( Camera Mode)
Hold down both left and right mouse buttons to zoom in/out move forward/ backward
Hold down the Right Mouse Button to pan left/right/up/down
Hold down the Left Mouse Button to Rotate left/right/up/down.
You’ll find all this stuff in the help files.

If you click on the button next to the camera this puts you into Model Mode and allows you to perform things like Move/Rotate/Scale on the selected model just as you do in 3DC.
Go into Model Mode, left click your model, you will see it’s axis and bounding box appeare
You can also select a model in the Model panel on the right hand side of the GUI by clicking on it.
There is a keypress to get you into camera mode, hold down the Ctrl key in Model mode puts you into camera mode while the key is held down.
These keypresses are all listed in the prefs window.

The Model panel is a bit like the Hierarchy and properties windows in 3DC all rolled into one.
The top part is the scenes Hierarchy, you can drag and drop models here to make them children of other models, just like 3DC.
You can scroll all three panels (Model/Material and Paint) up and down by positioning the mouse pointer over a blank area of the panel till it changes to a hand, hold down the left mose button and drag back.forward, to move the panel up/down

To move your model around the scene, go into Model mode, hold down the Ctrl key, position the camera so that when you let go of the Ctrl key you can see all the axis.
Position the mose pointer over the red x axis arrow, hold down the Left Mouse Button and drag to move the model left or right. Same for the other axis.
You can also set the models Position/Rotation/Scale by scrolling down the Model panel on the right and entering the amounts you want. To reset the model back to it’s original position set everything back to 0 in the Position and Rotation boxes. Press the Enter Key as you input each amount here.
Or you can use the little arrows at the side of each of the boxes to nudge the model around.

[img:61t9p01l]http&#58;//img238&#46;imageshack&#46;us/img238/9383/giles1or9&#46;jpg[/img:61t9p01l]

[img:61t9p01l]http&#58;//img238&#46;imageshack&#46;us/img238/7531/giles2ou6&#46;jpg[/img:61t9p01l]

The Material Panel…
I’ve moved the camera inside the model and clicked on the material tab on the right of the GUI
This is where you can adjust the materials…
1) Basic Properties
2) Blend Mode
3) Effects
4) Lighting Properties
5) Texture layers

If you select one of the materials in the material panel (just click it with the left mouse button), this will activate the above panels for this material.
Some of the settings you will be familiar with as they are similar to 3DC.
You can scroll these panels into view as you did with the model panel (position the mouse pointer over a blank area of a panel, when the mouse pointer changes to a hand, hold down the left mouse button and drag back/forward)

The model looks very bright at this stage but the MipMap flag has been set for all the materials, all that nasty shimmering and the jaggies have gone.
This can vary depending on the info held in the original model file…sometimes you have to set the MipMap flag for each material, I’ll cover that later.

Check out the Help Files under materials for a full destcription of all the panels.
1) Basic properties…
This is a bit similar to the settings you can apply in 3DC but much easier to use
By clicking on the colour swatch you can change the OVERALL colour of the material. Try it, select a material, click the colour swatch and drag the curser over to the far right( full red). Click Ok.
To set it back to normal, click the colour swatch again and drag the curser back to the far left (full white), click ok.
You can also use the small arrows at the side of each of the boxes or input an amount.
Ajdusting the Alpha between 1 and 0 effects the transparency of the material
I’ll ignore Shininess and Self illumination for now but check the help file for a description.

2) Blend Mode…
This will nearly always be set to Alpha (the default setting)
Check the help file for how these blend modes effect the materials.

3) Effects
For now we are only interested in Fullbright and Flat Shade, but again check the help file for a full decription
You have Fullbright ticked for all materials assigned to a lighmap or vertex lighting.
Flat shade….. If the faces of a model, a material has been applied to are flat/angular (walls, floors etc), you have this flag ticked (Flat shaded) , if the faces are cuved as in the pipework in this scene, the Flat Shade box is left unticked for the pipe material( Smooth shaded)

4) Lighting properties
Default Lightmap…This is where you can assign materials to different lightmaps. With very large scenes you will need more than one lightmap, more on this later. As it is, when you first load a scne into Gile, all your materials will be assigned to a default lightmap.
If you click on the yellow LM button in the Lighting Properties panel you will be taken to the Lighting methods window.
If you left click on the Default lighmap in the Lightiong Properties window it brings up all the relevant details regarding the Default Lightmap…it looks confusing but it’s not…I’ll go into this in Part Two.
Recieve Back Light…this is very seldom used and by default is set to off. You can create thing like rice paper walls with this.
Cast Shadows… determines whether a material will cast a shadow onto another part of the scene
Receive Shadows…determines whether a material wil receive shadows cast by other parts of the scene.
Affect Global Illumintion…This just determines whether the material will effect the global illumination of the scene.
ie. When the light hits, say a wall material, do youi want it to bounce back off the wall and effect the rest of the scene.
Receive Global Illumination….Do you want the material to receive this indirect light that has bounced of another part of the scene.
In most cases you will have all these ticked apart from Receive Back Light, which is the Gile
default setting when a material is loaded.

5) Texture Layers…
Take a look at the help file for a full description.
In this case Layer 0 has the WallPanel1a.bmp texture applied to it, Layer 7 is reserved for the lightmap.( you can choose which layer you want the lightmap to be on in Prefs)
If you click on say Layer1, this will take you to the Texture Browser where you could select another texture, so you can have a material that has different texures on various layers, but don’t get into this just yet.

Thats about all we need for now, there’s loads more, I’ll try to cover things as I go along, so on to the intersting bit, setting up the lights, rendering the scene and adjusting the material settings.
See Part Two

[img:8r4x6bb3]http&#58;//img238&#46;imageshack&#46;us/img238/1955/giles3fo8&#46;jpg[/img:8r4x6bb3]

[img:8r4x6bb3]http&#58;//img238&#46;imageshack&#46;us/img238/917/giles4sh7&#46;jpg[/img:8r4x6bb3]

You must be logged in to reply in this thread.