3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1] 2

Author Topic: Giles[s] Tutorial - Basic Lightmapping  (Read 3465 times)

psikoT

« on: February 10, 2012, 06:30:18 AM »
hi all...

In this tutorial I will explain how to apply a lightmap to our models... I guess you're comfortable with your 3d app, you know how to texture it and have some basic control over your model.

I will use 3dsMax for this tutorial, but you can use your favorite app. Take care of center your model at 0,0,0 coordinates.



In order to get a model inside Giles, you'll need to export it in ASE format...



And those are the parameters... nothing special...




Open the ASE file you've exported... and now we have our model into Giles.




The first thing is to add some lights... better if you work in 4 view mode. First we'll add the sun, because this is an outdoor scene so, create a Directional light and place it somewhere... be sure the light is pointing the model, although you can't see any realtime interaction with the model when you add or move a light... just place it.

Check the 'infinite' box inside Light Atenuation panel




Now let's see the light effect... go to Editors > Lightning Methods Wizard




I will set up the size as 2048x2048... can't remember defaul settings so try to match something like this... and click Apply.




Now the model goes clearer but still has no shadows... that's because we need to render the lightmap... to do that, go to Render > Render Settings (F5) and select Ambient Oclussion and check Enable Antialiasing and Enable Soft Shadows as well...




Click the render button (F6) and wait... now we have a lighted scene, but it is still a bit boring... let's add another light for fill the interior and get soft shadows...




I will add an Omni light and place it at the center of the model... in the Light Attenuation panel, give it 30 for Near Range and 60 for Far Range... feel free to play with all lights settings until you're happy...




and render again...




ok, at this point, we will finish the lightning/rendering process... so we are now ready to export the model to 3drad... as you can see, we have a very basic lightning setup here... I leave you to play with light colors and different render settings...

To export the model, go to File > Export and create a new folder on your desktop, then select .X file format and gives it a name like '000_mesh'... and leave the 'Lightmap 00' name for the lightmap texture... then, in the popup, uncheck all except 'Collect Texture Files' box and here we go... save and exit from Giles.



Now you have a folder in your desktop with all files needed in rad, just the last tweak for final export:

THE FINAL TRICK!

Before copying the files to rad's skinmeshes folder, we need to edit all the file paths... by default, Giles writes some weird paths for all textures, so they will not work on your 3drad folder nor a compiled game... open the 000_mesh.x file with Notepad++ and change all paths from:

   TextureFilename {
      "../../../../_TALLER/GRIMBALL/stadium/field.dds";
   }

   
to:

   TextureFilename {
      "field.dds";
   }

this is because the .X file and all textures will be in the same folder.

Make the same thing in the '000_mesh_lmap.x' file, change something like this:

   TextureFilename {
      "C:\Documents and Settings\BlackCrystal\Escritorio\export\Lightmap 00.bmp";
   }

by this:

   TextureFilename {
      "Lightmap 00.bmp";
   }

ok, now we have all files ready to copy them to the 3drad skinmesh folder. Create 2 new folders in your skinmeshes folder: one for the main skinmesh and the second for the Lightmapped one. Call them as you want. Copy the '000_mesh.x' file with all textures (except the Lightmap 00.bmp) to the main skinmesh folder. Rename the '000_mesh_lmap.x' to '000_mesh.x' and move it to the secondary skinmesh folder. Move the 'Lightmap 00.bmp' texture as well.

INSIDE 3DRAD

This is the basic procedure to have a lightmapped skinmesh inside 3drad. We need the 2 skinmeshes above created, so add them to your project. Place them at the same coordinates (mainly 0,0,0). The settings for the LM skinmesh are the following:




And that's all... just place a sunlight and rotates it to match the sun orientation we did into Giles...

BEFORE



AFTER



Hope you guys have learned how to make your models a bit deeper and how to give them better look inside rad. Sorry for my bad english and, if you have any questions, feel free to comment.


« Last Edit: February 10, 2012, 06:35:42 AM by psikoT »
« Reply #1 on: February 10, 2012, 04:39:39 PM »
Thanks for this psikoT - nice tutorial.  :)

psikoT

« Reply #2 on: February 11, 2012, 02:38:50 AM »
I was thinking that maybe I was a bit rude using your model without permission to make the tut... sorry about that.  :-[

Also maybe the people can't appreciate the lightning effect in the above example, so here are some of my levels fully lightmapped... they have a lot of lights to enhance the general colors and give a cool warm ambiance...  ;)










I would like to see your lightmapped worlds, so feel free to post them here too! :D

jestermon

« Reply #3 on: February 11, 2012, 05:25:07 AM »
I was thinking that maybe I was a bit rude . . .

Bad boy. *smack*
Good boys go to heaven, but bad boys go everywhere.
« Reply #4 on: February 24, 2012, 02:34:28 AM »
Thanks alot psikot, this should fix my complaints in Giles!
Btw. Would be nice to have some kind of rating system for useful tuts, or a closed forum section where only mods can put a copy of them, sorted by type.
new forum search:
http://www.google.com/ site:www.3drad.com searchword  ( <-- copy )
3DRad is now in the same Brain-Area like my old C64 and Amiga Memories!
« Reply #5 on: February 24, 2012, 02:46:45 AM »
Btw. Would be nice to have some kind of rating system for useful tuts, or a closed forum section where only mods can put a copy of them, sorted by type.

Seconded. Great idea.

psikoT

« Reply #6 on: February 24, 2012, 06:25:56 AM »
thanks, glad you find this tut useful...

since jess goes out, this forum looks like this: ;D

« Reply #7 on: February 24, 2012, 10:41:49 AM »
thanks, glad you find this tut useful...

since jess goes out, this forum looks like this: ;D

Yep. This forum is seriously doomed. It's a shame.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #8 on: February 24, 2012, 06:15:07 PM »
thanks, glad you find this tut useful...

since jess goes out, this forum looks like this: ;D

Yep. This forum is seriously doomed. It's a shame.
jess? do u mean jestermon? if so why do u think if she goes the forum is "DOOMED", im sure we will cope without her. :o
Yeah.. I'm back, momentarily... been busy with the minecraft business over at http://www.harsworld.com/
« Reply #9 on: February 25, 2012, 03:23:58 AM »
jess? do u mean jestermon? if so why do u think if she goes the forum is "DOOMED", im sure we will cope without her. :o

The problem is, that there isn't an active moderator around anymore. All the crap that gets posted won't be deleted.
Rocket Rumble, a 3D Rad puzzle game:
http://www.3drad.com/forum/index.php?topic=9896.0
« Reply #10 on: February 25, 2012, 03:44:21 AM »
All the crap that gets posted won't be deleted.
:'(  :(
« Last Edit: March 06, 2012, 10:54:57 PM by Har88 »
Yeah.. I'm back, momentarily... been busy with the minecraft business over at http://www.harsworld.com/

psikoT

« Reply #11 on: February 25, 2012, 04:41:27 AM »
EDIT: egh why dosnt my quote work

who cares?... please stop posting crap
« Reply #12 on: September 16, 2012, 02:07:57 AM »
I know its old thread but... Am using sketchup... not 3dsmax. So how can i export model from sketchup to giles???

psikoT

« Reply #13 on: September 16, 2012, 02:46:49 AM »
I think you can export it as 3ds... ::)
« Reply #14 on: September 16, 2012, 09:37:14 AM »
I got it workin with .x file :) Thanks :) But... i have the latest giles but... i cant see the sun object as you can...
Pages: [1] 2