Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
  Visit YaBB today Wink

FFDS Home | TIPS Section | Tutorials Section | Resources Section | Utilities Section

Military | FSDS | Jetliners | Real Planes Section | Gmax | Rotorcraft | Business | Civilian

  HomeHelpSearchLoginRegister  
 
 
Pages: 1 2 
Send Topic Print
Tutorial - Texture Baking in 3dsmax for VC design (Read 12705 times)
13th Aug, 2007 at 6:11pm

nextlevelsims   Offline
Spline Extruder
I Love FFDS!
Munich, Germany

Posts: 188
***
 
Hi there,

Okay... here goes my first tutorial Cheesy

Well, what is texture baking and what is it good for??

Due to the fact, that a real time game engine, like the one from FS, is unable to simulate complex lighting and shadows, you would need to find another way to get a realistic and non-flat looking VC than using the game's lighting features. So well, the only way to achieve that is to do it via texture.

To get the textures look right, you could probably use high res photos which are exclusively shot for use as panel texture, but since not everyone has the possibility to do so, you will need to find another way. Apart from that, the photo texture method is very unflexible, too and might require long hours of retouching works.

So this is where texture baking comes into the game. The technique is already used for quite some time by professional game content designers throughout the game industry. So what does texture baking do?

What texture baking actually does, is pretty simple -> it "bakes" a look which is defined by setting up a proper lighting in 3dsmax into the texture which is applied to an object in the scene. The result is, that this object and it's appearance will become somehow independent from the game engine in terms of looks and lighting. The texture will make it look like you've rendered it from 3dsmax. Everything from light, shading, shadows will be baked into the texture then...

This is an example of how a finished "bake" would look like. Please note that everything is just textures:

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

(some parts not done yet btw.)
Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

and these are some earlier shots from FSX showing the "blank" texturing first compared to the baked texturing later on

unbaked:
Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

baked:
Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

Alright... I will post the actual tutorial as answer in this thread then.
 

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
IP Logged
 
Reply #1 - 13th Aug, 2007 at 8:16pm

nextlevelsims   Offline
Spline Extruder
I Love FFDS!
Munich, Germany

Posts: 188
***
 
okay let's start...

1. I built up a VERY VERY basic VC for demonstration... it's very simple but it will help to explain the job Wink

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

first off, it's very important that you name the geometry properly! The rendered bake files will be named automatically according to the parts they belong to. I would suggest you to have ONE light and bake scene and another one which is actually your FSX working file with right FSX materials, animations, attachpoints, GUIDs and so on. In your Light Scene, you will have normal Max Materials (no FSX materials!) and lights. The materials in your Light Scenes can be set up as you desire... including bump maps, opacity maps, reflections and so on. Just keep in mind that you have ALL the geometry you are going to bake a texture bitmap assigned. No procedural or "only color" mapping! It must all rely on bitmaps which are correctly mapped on the objects. Use the UVW unwrapper if needed.

2. Set up a texture map for the VC (or multiple) using Adobe Photoshop. These can be plain coloured or however you want them... just "blank" without lighting effects and shadows. Just make sure they have about the same proportions and "size" for the object they will be mapped on. Keep in mind that you can NOT use a part of the texture for multiple objects (unless you want them to look the same in terms of lighting and shadows). For example, you can use the side panel texture for the other side (mirrored) as well to save resources.

so this is how the plain base texture looks like:

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

additionally, I have made a bump map. You will not use this bump map in your FSX material later on. It's just made for the light scene. Orientation etc. must be the same of course.

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

Then go back to Max, create a material for the VC including the base texture as diffuse and the bump map must go into the bump channel accordingly. I have set a little bit of a specular level and glossyness for the material. The bump channel strength was set to "5". You are completely free on what you set up here. It will have no effect on the FSX material you will use later on as this is only needed to create a realistic texture.

What is VERY important tho is that you map everything correctly. You can/should use the UVW unwrapper to get everything right in place. Make sure all UVs are flat and properly aligned. You can also use the automatic uv flattening on the "render to texture" module but I would only recommend that if there is REALLY no other way and you can't get the object unwrapped by yourself. The automatic flattening creates a somehow very uneconomic set up texture and in addition, the texture orientation you've set up in your texture PSD is completely lost.

So I would go with traditional unwrapping:

before:

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

after unwrapping:

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

As you can see, the window pillar is now grey and the side panel is black as I planned it to be.

now place some lights in your scenes. Again, you are completely free on what you do here... well here, I have set an omni at the outside to simulate the sunlight, some panel flood lights, a fill light under the glareshield with an inverse square limitation and a fill light for the cabin. Just play around with the settings until you get the light setting as you want it.

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

rendered:

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

You can also use advanced rendering techniques using a skylight, Vray Rendering and so on. It's up to you! Here I used the default scanline renderer using area shadows. In the A380 cockpit, I have also included an Ambient Occlusion layer which is then multiplied into the diffuse in Photoshop. If you want to create an AO layer, don't forget to switch your renderer to mental ray here:

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

keep in mind that area shadows won't work with mental ray. So if you are using area shadows, then render a Complete Map with scanline and the AO layer independently with mental ray. As for here, I have left out the AO layer. It's actually very helpful if you have lots of small geometry like switches, buttons etc. Here is a small overview on what Ambient Occlusion actually is -> Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
 

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
IP Logged
 
Reply #2 - 13th Aug, 2007 at 8:30pm

nextlevelsims   Offline
Spline Extruder
I Love FFDS!
Munich, Germany

Posts: 188
***
 
So once you have set up your lighting and everything, select all the geometry you wanna bake and open the render to texture dialog (can be found under rendering -> render to texture). The selected objects will appear in the dialog then.

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

set everything as I have done it in the red boxes. Also, set up an output path for the baked texture files. On "output", define what you want to have baked. Here, we will chose "CompleteMap" as this will include everything we need. In my screenshot, I have also included a mental ray ambient occlusion layer but I kicked it off later then Wink Also, make sure you set 1024 for bitmap size as our base texture is also 1024x1024.

At the bottom of the dialog, it should look like this:

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

Once you have everything set, hit "render"... now it will render the output files. When done, go back to photoshop, open the PSD of your base textue, go to "open" and browse to your baked materials output folder. You will find this:

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

Open the main panel complete map for example and drag it on the base map psd... make sure it is orientated exactly pixel by pixel. When its all set, delete the black areas around with the magic wand tool (tolerance set to 0). Proceed the same way with the other textures...

with the main panel and side panel textures applied it should look like this:

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

And there you go!! Wink Save your Light Scene and open your FS Scene. Just import the geometry from your light scene and create a new FSX material using the new baked texture as diffuse bitmap and apply that to the geometry. As the UV mapping is already set correctly, you will just need to replace it with the standard material and everything should be right! I strongly recommend to use the "no base material specular" in your FSX materials extended dialog as this will mess up the lighting you've created in the bake materials. But thats up to you! Wink

Well that concludes my texture baking tutorial... I hoped you enjoyed it Wink If you have any questions, let me know!

Just a quick note: of course, you can use texture baking on exterior models, too, but I don't think that would be a good idea as lighting conditions change too often on the outside. Shadows would look pretty weird and unreal for example. In a cockpit, you have lots of artificial and fixed light sources what gives texture baking more sense. I hope you understand what I am talking about Wink

Have fun!

Oli
 

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
IP Logged
 
Reply #3 - 13th Aug, 2007 at 8:44pm

nextlevelsims   Offline
Spline Extruder
I Love FFDS!
Munich, Germany

Posts: 188
***
 
here a practical example of the A380 KCCU (keyboard and cursor control unit)

texture has been reduced for previews

base texture:

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

complete map

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

ambient occlusion

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

all together

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

mapped on geometry

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
 

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
IP Logged
 
Reply #4 - 5th Sep, 2007 at 4:14am

lionheart   Offline
Inspecteur des Polygonnes
Phoenix Arizona

Gender: male
Posts: 5782
*****
 
A thousand thanks for this brilliant tutorial, NextLevelSims..

This is superb learning...!

Smiley    Smiley    Smiley

 

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
IP Logged
 
Reply #5 - 7th Sep, 2007 at 4:02am

nextlevelsims   Offline
Spline Extruder
I Love FFDS!
Munich, Germany

Posts: 188
***
 
hey bill, nice to see that you like it... Smiley

has anyone already tried using the technique on a VC? I am very keen to see some results Smiley

cheers,
oli
 

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
IP Logged
 
Reply #6 - 7th Sep, 2007 at 10:08am

Fr. Bill   Offline
YaBB Moderator
I used to have a life:
now I have GMax...
Hammond, IN

Gender: male
Posts: 5426
*****
 
nextlevelsims wrote on 7th Sep, 2007 at 4:02am:
hey bill, nice to see that you like it... Smiley

has anyone already tried using the technique on a VC? I am very keen to see some results Smiley

cheers,
oli


Among the things you didn't explain is just where this mysterious "bump map" came from. Presumably it didn't simply fall like manna from heaven, so...

...how does one create it!  Grin
 

Fr. Bill
Gauge Programming - 3d Modeling Eaglesoft Development Group Intel Core 2 Quad Q6600-4 GB DDRII Crucial PC6400-500 GB SATA-ATI Radeon HD2400 Pro 256MB
IP Logged
 
Reply #7 - 7th Sep, 2007 at 11:13am

nextlevelsims   Offline
Spline Extruder
I Love FFDS!
Munich, Germany

Posts: 188
***
 
well, the bump map of the leather is just a desaturated, high contrast version of the original one Smiley you can use bump maps or whatever you lile (except procedural) maps in your pre-bake material... Wink

it will bake the appearace of the bump effect into the texture as well Smiley (as seen in the baked texture) Wink
 

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
IP Logged
 
Reply #8 - 7th Sep, 2007 at 1:03pm

lionheart   Offline
Inspecteur des Polygonnes
Phoenix Arizona

Gender: male
Posts: 5782
*****
 
Quote:
has anyone already tried using the technique on a VC? I am very keen to see some results  

cheers,
oli


Hey Oli,

I have used 'basic' Baking before with what Gmax can do with lights and doing screenshots.  Really helped massively with my Trinidad panel, which was a real bear with all the pods having recessed panels in them.

One gentleman here, Daniel (dmaher) has done superb texture baking on his Vans aircraft.  Here is his website.  (Seems his site is stirring up a commotion of enthusiasm at the Sim-Outhouse)

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

Cheers and thanks again for the brilliant tutorial,

Bill
LHC
 

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
IP Logged
 
Reply #9 - 8th Sep, 2007 at 2:55pm

Paco Sanchez   Offline
Inspecteur des Polygonnes
I want axis-driven animations
back NOW!!!
Vigo, Spain

Gender: male
Posts: 1686
*****
 
I used texture baking in the Constellation and B-17, but without any spotlight; just ambient occlusion:

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

You can also use texture baking to create FSX-style window reflections (this image is taken in FS9):

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

 

Paco.&&Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
IP Logged
 
Reply #10 - 4th Dec, 2007 at 8:10am

rd84   Offline
Polygon Twister

Posts: 75
**
 
Hi,

Thanks - Interesting tutorial !

What is the earliest version of 3D Studio Max that will handle this technique ?? - assuming I can buy a pre-owned version of 3DS - its just too expensive new.

Are there any other programs that could process a Gmax model ??

Cheers
Paul
 
IP Logged
 
Reply #11 - 1st Jan, 2008 at 9:40am

Thor s Hammer   Offline
Point Pusher
Rafale builder

Posts: 34
*
 
Hye !

I use it since 3dsmax 6. But it probably exist since earlier versions. For the free way, Some1 says he used this technique with blender, maybe you can ask for some advices.

Here is the post : Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

Bye.
« Last Edit: 12th Mar, 2011 at 5:25pm by Felix/FFDS »  
IP Logged
 
Reply #12 - 4th Jan, 2008 at 8:35pm

rd84   Offline
Polygon Twister

Posts: 75
**
 
Many thanks.

Regards
Paul

Quote:
Hye !

I use it since 3dsmax 6. But it probably exist since earlier versions. For the free way, Some1 says he used this technique with blender, maybe you can ask for some advices.

Here is the post : Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

Bye.

 
IP Logged
 
Reply #13 - 27th Oct, 2008 at 1:47pm

RGS   Offline
Point Pusher
I Love FFDS!

Posts: 2
*
 
Would you mind explaining Paco or anyone else, how to bake in the reflections on the glass as above using 'render to texture.' Have no problems baking lighting, just not able to work out how to do reflections.

Thanks in advance,

Robert
 
IP Logged
 
Reply #14 - 24th Dec, 2008 at 4:31am

nextlevelsims   Offline
Spline Extruder
I Love FFDS!
Munich, Germany

Posts: 188
***
 
by the way... texture baking makes a vey nice effect on night lighting setups (nightmaps)

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register

btw: reflections are a bit difficult as they are view angle dependet - but it still works - just use a raytrace map in your reflection slot (maybe combined with a nice falloff), choose a good general view in the perspective viewport and bake! Wink
 

Multimedia File Viewing and Clickable Links are available for Registered Members only!!  You need to Login or Register
IP Logged
 
Pages: 1 2 
Send Topic Print