February 25, 2011
at 7:38 pm /
#24835
Sorry about the long post. <!– s:) –><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="" title="Smile" /><!– s:) –>
Creating the shadow and highlight detail on models is one of my favorite passtimes, this is what brings the model to life, IMO. Without shadows and highlights models tend to look very flat and washed out.
I’ve tried just about every method available, so here are some of my thoughts on the subject.
The possibilities are….
1) Texture baking
2) Light mapping/Shadow mapping
3) Real time shadows
4) Paint the shadow/highlight detail onto the model textures.
I’ll run through these methods briefly but the thing you MUST keep in mind is that you CAN’T USE ANY OF THESE METHODS ON ANIMATED PARTS.
So whilst you can create shadows/highlights on the main structure of say, a locomotive, you can’t create them for the wheels and con rods etc. More on this later.
With methods 1 and 2 you need an app that allows you to load in your model and set up the lights to create the shadows/highlights. You then export the model to your required file format.
Some of the high end 3D models apps do have these options, but at a price.
You can use a stand alone app like Gile, which is now free, for lightmapping.
Which ever way you go you need to make sure you can export your model to your required file format, this could be a problem.
If Richard can create a lightmap feature this would be the best bet as he would no doubt be able to make all the train sim formats available.
But don’t be put off by all this, read on…..
1) Texture Baking…
This is the oldest method of creating shadows on 3D models and isn’t used much now that lightmapping is available. It’s a term that is often mis-used I think to include just about every method of shadow creation.
With Texture Baking a SECOND set of textures are generated, onto which the shadow detail is added.
Suppose you have a model of a building and you apply and scale a 256×256 texture of a floor tile onto the floor area.
The app that is doing the texture baking couldn’t possibly create all the shadows on your 256x 256 texture so it generates a second, much larger texture of the whole floor area, onto which the shadows are generated.
So the downside is…This is very memory intensive method, although it can produce quite good results.
2) Light mapping/Shadow Mapping…
This is the best of the first two methods by a long way.
A second texture is created, called a lightmap, which is then (sort of) wrapped around all the faces of your model by the Lightmapping app.
You set up the lights, make adjustments to texures (depending on the app) click Render and the Lightmapper will generate the lightmap which contains all the shadow/highlight detail created by the lights you set up.
Lightmaps are nearly always black through grey to white, although some apps do allow for coloured light maps.
Giles does this so you can set up coloured lights. Deepest shadows are black, highest highlights are white.
You then export the model an the lightmap is exported with it.
No real downside to this method, in fact most lightmappers allow you to adjust both the size and the number of lightmaps which is very helpful.
If the lightmaps is to small you get very poor shadows with jagged edges.
More on creating lightmaps here…
<!– l –><a class="postlink-local" href="http://amabilis.com/forum/viewtopic.php?f=20&t=11093">viewtopic.php?f=20&t=11093</a><!– l –>
<!– l –><a class="postlink-local" href="http://amabilis.com/forum/viewtopic.php?f=20&t=1109">viewtopic.php?f=20&t=1109</a><!– l –>
3) Real time shadows…
This method isn’t even in the running, it’s used by most of the train sims and game industry to create a flattened shadow model of say your locomotive and rolling stock which is then used to simulate a shadow cast onto say a terrain.
You can’t use this method to create shading for your model because you need certain parts of your loco to cast shadows onto other parts of your loco. The cab roof needs to cast a shadow onto the cab floor etc.
This method won’t do this, so forget it for now, maybe in the future…who knows.
4) Use your artistic abilities to create the shading/highlights
Without doubt, the best method of all as things stand at the moment.
Yes it’s a bit more time consuming creating the textures but it’s not that difficult once you get the hang of things.
All you need is a decent paint app with a layers feature. A Dodge and Burn or Light and darken brush.
Then loads of practice…
[img:2ljldd1h]http://img98.imageshack.us/img98/6892/newhall1md7.jpg[/img:2ljldd1h]
I’ve posted this pic elsewhere on the forums but it’s here again as an example.
There AREN’T ANY LIGHTS in this scene to create the shadows and hightlights.
They are all created directly onto the textures in my paint app.
So to get this sort of effect…..
The underside of your boiler texture needs shading, a highlight something like the one here and a shadow for the handrail.
The boiler would cast a shadow onto the the footplate so apply some shading to the footplate texture.
Note the shadow on the lower part of the footplate where the smokebox overhangs the footplate. I had to create a seperate texture for this part of the footplate so I could apply the shading.
If you have outside cylinders the cylnder covers need shading a bit like the boiler texture.
The loco wheels have a dark texture applied to the inner rim and the inner sides of the spokes, also don’t forget the back of any wheels would look very dark.
Highlights are applied to all moving parts, con rods, piston rods etc.
Note the shading on the top of the driving wheels, this is a cheat, because you can’t apply the shading the footplate would cast to the wheel texture, if you did, as the wheel turned so would the shading. <!– s:oops: –><img src="{SMILIES_PATH}/icon_redface.gif" alt=":oops:" title="Embarrassed" /><!– s:oops: –>
This is why you can’t lightmap or texture bake animations.
I used a basic cube, deleted the top and bottom faces, scaled it so it fitted just outside the wheels, applied a dark texture to it then adjusted the transparency so I could just see the top of the wheel.
Note I haven’t got round to doing the front bogie in the same way, note the difference.
Some of the textures used for the above loco.
[img:2ljldd1h]http://img14.imageshack.us/img14/4100/shadetextures.jpg[/img:2ljldd1h]
Anyway thats enough of my ramblings.
Bazza