Gile[s]…Part two

Part 2
So to set up some lights and get things moving.
I’ll try to make as many ‘beginners’ mistakes as possible as I work through this part, I’ve just got to cast my mind back a couple of years to when I started using Gile
First though, I want to scale the model up in XYZ…I’ll go into why later and hope Fredborg, who wrote Gile
ain’t reading this. We differ on this point.
Open the Model panel, I’ve renamed the model ‘ Deck’ in the basic properties panel, select the deck model, just click on the name in the Model Panel. Scroll down to the scale panel and set XYZ to 2.0

This deck scene has four light fittings along it’s length.
Rather than creating all four lights at once and adjusting the settings for each light in turn, I’m just going to set up one light, adjust it’s settings and do some test renders.
When I get this light looking more or less right I can just clone it to create the other lights.

To create a light…Click on the Create Menu, Click Light and select Omni.
An omni light works like a light bulb, sending light in all directions, the light fades the further it is away from it’s center.
A yellow ball will appeare at a world position of 0,0,0 ( everything you create or merge into the scene will be at this position to start with)

If you now check out the Model Panel the light will be listed as Omni 00, clicking on it will bring up all the adjustements you can make to this light in the lower panels.
I positioned this omni light just below one of the light fittings in the scene…it’s not that easy to see at the moment as I haven’t rendered the scene. you can just make it out in this pic

I needed to adjust the Far range of the light, I wanted the illumination from this light to just reach the walls and floor. By default the Far range is set to 1000….much to large for this scene.
So by selecting the omni light you can scroll down the lower panels to the Light Attenuation section and adjust the Far range…I set it to 10.
You can see the Far range indicated by the black wireframe surrounding the light
This won’t be large enough, as you can see from the pic, the far range doesn’t reach the walls or floor.

[img:2h8xrxdv]http://img238.imageshack.us/img238/3482/giles5oh7.jpg[/img:2h8xrxdv]

I increased the Far range to 25 and did a test render, you’ll end up doing loads of these test renders before you get things looking as you want them, especially with large scenes.

To render the scene Click Render in the Render menu, this brings up the Render window. Leave all the settings as they are, I’ll cover all this later.
For now just click the Render Button at the bottom of the window.
Gile will render the scene and this pic is what I got.

Hmmmm…not quite what I’d hoped for, the far range still needs to be increased to get the lighting effect I want.
Also the yellow material used for the light fitting is still assigned ( by default) to the lightmap and it’s set to cast and receive shadows.
You’ve got to think of this material as the VISUAL light scource in the scene, it needs to be very bright and it wouldn’t be receiving any shadows.
The way I do this, is to just re-assign the material to No Light, which also takes it out of the lightmap.
Lightmap space is precious….just like poly counts on models…don’t waste it.

[img:3pvvg6sk]http://img238.imageshack.us/img238/3796/giles6ix1.jpg[/img:3pvvg6sk]

Fig 1
I opened the Material Panel, selected the Light material, scrolled down to Lighting Method, click on the little arrow next to Default lightmap and selected No Lighting from the menu.
I increased the Far range for the Omni light to 30 and did a test render.
This is more what I was looking for…the range of the light is about right but it needs to be brighter.
I didn’t want to increase the far range any further, so I just selected the omni light and increased it’s intensity to 1.5
and did another test render (Fig 2)

This is better…you see how easy it is to get some ‘atmosphere’ into a scene with just a single light scource.
If this were the basement of a haunted castle you can just imagine some ghostly apperition appearing out of the gloom at the end of the passage.
Looking a bit like me after a long sesssion on the PC. <!– s:D –><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" /><!– s:D –>

Still much to do though, notice the dark blotches on the door and behind the pipework.

[img:28qurp3h]http&#58;//img511&#46;imageshack&#46;us/img511/2726/giles7ku1&#46;jpg[/img:28qurp3h]

The next job is to clone this single light and positioning each clone under a light fitting.
Select the Omni 00 in the Model panel go to the Edit menu and select Clone.
A new Omni light will be created at the same position as the Omni 00 light and will appeare in the model hiearchy panel as ‘ Omni 00 clone 00’, you can rename these if you wish
You can’t see this new Omni in the scene yet because it occupies the same space as the original light.
So go into Model mode, select the new omni clone in the Hierarchy panel, left click on one of it’s axis, hold down the mouse button and drag the new clone away from the original….position it as required.
I did this three time to create the extra lights needed, did a test render and the scene now looks like this.

Notice the horrible blotchy dark marks and streaks are still present, you can see a big one on the floor so I’ll sort that next.

[img:1rx6fxfy]http&#58;//img511&#46;imageshack&#46;us/img511/2273/giles8pr8&#46;jpg[/img:1rx6fxfy]

If you open the material panel, click any of the materials then click the small yellow LM button this will open the Lighting Methods window.
If you then click on the Default Lightmap in the Lighting methods window, it will open up the panels, with the details/settings for this lightmap.
On the left you see the material for the light fitting is assigned to No Lighting, all the other materials are assigned to the Default lightmap.

What you need to remember here, is that the lighmap is ‘streched’ across all the faces of the model and the shadows are drawn onto this map.
If the map is to small and the model quite large Gile just can’t fit everything onto the map as it should be.
This is one of the reasons why you get these dark streaks, blotches and jaggied edges to the shadows etc.

To correct it you need to increase the size of the lightmap.
With large scenes you will need to have more than one lightmap.
You can create new lightmaps in this Lighting methods window and drag materials between lighmaps.
Alternitvly you can just create the new lightmap here and re-assign your materials in the Material panel window as I did for the light fitting material.
You can also re-name your lighmaps here.

So I renamed the map to DeckLtMap1.
I changed the size of the map to 1024×1024 and don’t forget to click the Resize button.
When the little window pops up asking if you want to keep the original lighting , click yes.
It will take a few seconds for Gile
to resize the map, when the small window disappears click Ok at the bottom of the Lighting methods window.
You won’t notice any difference to the scene yet, you need to render it again.

[img:y37s5e3t]http&#58;//img511&#46;imageshack&#46;us/img511/8675/giles9ho4&#46;jpg[/img:y37s5e3t]

When you render the scene again you will notice it takes a while longer.
The render times are governed by quite a few things, the number and size of the lightmaps, and the number of lights in the scene seem to be the two main factors.
The original renders with a the lightmap at 256×256 were around 10 seconds, these new renders are now up to 50 seconds.

To keep these test render times down, I wouldn’t normally take the lightmap size up to 1024×1024 untill I had made all my adjustments to lights, materials etc.
I can live with the blotches and streaks, increasing the lighmap sizes as I go along, it speeds things up a lot.

Anyway after rendering with the new lightmap size, this is what I got ( top image).
It’s better but I still have some dark blotches, on the floor near the door on the left and on the right hand wall just near the doorway (there are others)

So under the Modify menu select Recalculate Normals andgt;andgt;andgt;andgt; All.
Render the scene again.

Now thats much better (bottom Image), all the blotches and stuff are gone and the shadows aren’t to bad.
I would normally Recalculate Normals BEFORE doing my first test render but I’ve left it till now so you can see the difference it makes.

[img:2neuj1u2]http&#58;//img511&#46;imageshack&#46;us/img511/6360/giles10wg3&#46;jpg[/img:2neuj1u2]

There’s one other thing I like to do before leaving this lightmap section.
I find I get much better results, by assigning any materials that are set to be smooth shaded ( applied to curved surfaces), to their own lighmap. Maybe this is how it should be done.

To create a new Lighmap, bring up the Lighting Method window again, click the yellow star at the bottom of the window, a new map is ceated called New Lightmap.
Click on it in the left hand panel.
I renamed mine DeckLtMap2 and resized it to 512×1024.
I closed the Lighting methods window, went back to the Material panel and re-assigned the two materials used for the pipework to this new map.
Rendered the scene again, now the render time is up to 1 minute 35 seconds.

So a word of caution here, if your rendering a large scene which will need quite a few maps, try to keep the number and sizes of the maps down to a minimum to start with.
Don’t worry to much about the crappy shadows and botches, get all the lights set up and make adjustements to your materials a required,
Then start to add new maps, re-assign materials and increase the sizes of maps gradually as you go along.
This will keep the test render times as low as possible and speed up the whole process.
If you can save 30 seconds on each test render it makes a big difference.

[img:2tek8u7u]http&#58;//img511&#46;imageshack&#46;us/img511/9826/giles11tx5&#46;jpg[/img:2tek8u7u]

Thats just about it really, I added a VERY small amount of yellow to the pipe, floor and ceiling materials just to blend them into the scene a bit better.
To hide the lights so you can get some nice screenshots, open the Model panel and click on the small eyes next to each of the omni lights.

[img:16u4a16v]http&#58;//img511&#46;imageshack&#46;us/img511/1839/giles12zc6&#46;jpg[/img:16u4a16v]

When I get time I’ll continue this showing some of the other features of Gile .
Merging in other objects to build the scene up etc.

Hints and Tips
Really all this stuff is a bit trial and error till you get the effect you want, making changes to lights, material settings etc.

If you think about it you are really ‘painting with light’ so to speak. If you could render the file without lights you would be looking at a black screen.
So the creation is all yours, you just do it by adding lights to the scene. Gile
gives you the tools to do it.

Start with a simple scene something like this one, till you get the hang of things. Don’t jump in at the deep end and try to lighmap some massive scene you’ve created.
Some of the internal scenes from my Morpheus spaceship are like this, huge. Some of them have well over 100 lights and 7 or 8 lightmaps, but setting this lot up and going through all the test renders ain’t for the faint hearted.
Some have taken me a month to get right…and thats a month in Gile
.

Hope someone finds all this useful…
Bazza

thank you so much bazza,
this has helped me a whole lot and it means a lot to me that you would take the time to do this..last night i did get a object light mapped and exported in .dbo format into darkbasic pro and it worked perfectly..it was just simple lights casting shadows but it looked awsome to me. the cloning the lights part will help me a lot..this has been great…
thanks again, pirate

Ok…no problem.
I’ve got the hard work over with now. I can add more stuff as I get the time.
Sorry there’s a lot of reading, especially in Part 1, there’s no other way really.

You can clone anything, not just lights.
When I’m working on scenes I’m never sure where to put the light fittings when building the model in 3DC.
It’s not until you get the lights set up in Giles that you know where to place the light fittings.

So I set up the lights in Giles, when I’m happy I Merge one light fitting into the scene and clone and position it as required next to the Giles lights.

Bazza

You must be logged in to reply in this thread.