Texture Baking

This sections is intended for the ever growing number of 3D Modellings applications that can or cannot be used for developing addons for VS.

Re: Texture Baking

Postby Hudizzle » Thu Apr 22, 2010 1:39 am

I have finally gotten the skylight to work correctly!
I have the texture baking processes working wonderfully now.

Axeonalias wrote:Hehe nice work,when you get the Skylight working do that gif again to see a HUGE diff! cant wait to see,if you need me to have a look at the model just drop me a pm.


You're right, it does make a HUGE difference when using the skylight!

Image

It is of course a bit dark in the enclosed spaces. I only used one skylight, over the model in the middle, and didn't adjust its properties.
"If you wish to make an apple pie from scratch, you must first invent the universe." - Carl Sagan

PC Specs:
Processor - AMD Athlon II quad core (64-bit) 3.0Ghz
Graphics - XFX Radeon HD6770 1GB
RAM - 8GB
OS - Windows 7 Home Premium 64-bit
User avatar
Hudizzle
 
Posts: 578
Joined: Thu Jan 15, 2009 6:00 am
Location: Indiana, United States
Preferred Sim: Vehicle Simulator

Re: Texture Baking

Postby CaptainMack » Thu Apr 22, 2010 4:33 pm

Hud,

If you are not satisfied with the darker areas, you may adjust contrast and brightness for the baked texture(s), using Photoshop or another editor :)
If you don't want to have another go on baking lights into them.
CaptainMack
 

Re: Texture Baking

Postby Hudizzle » Thu Apr 22, 2010 8:21 pm

CaptainMack:

When I make the final bakes on the final model, I'll certainly makes adjustments in Photoshop.

As for lights, I'm still doing various tests. The latest bakes look better I think. A bit more realistic, since those "dark" areas would not appear as dark as they did before under real-life lighting conditions. I increased the intensity of the skylight by a slight amount, but the main reason the dark areas appear lighter is because I placed lighting in the interior.

Here's the result of that latest bake:

Image

Image

Image

Image

Image

Image

Image

Image

Image

Image
"If you wish to make an apple pie from scratch, you must first invent the universe." - Carl Sagan

PC Specs:
Processor - AMD Athlon II quad core (64-bit) 3.0Ghz
Graphics - XFX Radeon HD6770 1GB
RAM - 8GB
OS - Windows 7 Home Premium 64-bit
User avatar
Hudizzle
 
Posts: 578
Joined: Thu Jan 15, 2009 6:00 am
Location: Indiana, United States
Preferred Sim: Vehicle Simulator

Re: Texture Baking

Postby Axeonalias » Thu Apr 22, 2010 9:17 pm

Very Nice Hudizzle,do i smell a WIP?
Image
User avatar
Axeonalias
 
Posts: 715
Joined: Mon Aug 25, 2008 2:25 pm
Location: South Africa
Preferred Sim: Virtual Sailor

Re: Texture Baking

Postby Axeonalias » Tue Apr 27, 2010 6:58 pm

Seems im having abit of trouble of my own with Baking,I did not pick this up over the course of this Wip due to the previouse bakes not having textures,only Colours (The Previouse render to textures).

When I do the Bake it Looses the tile mapping of the texture,I follow the standard procedure I always have for this but for some reason now it does not work,When i set the Channel 1 before the bake in the render to texture window it bakes incorectly,but the Mapping is correct (Pic 2) Pic one is how it looks before the render to texture

When I set the channel as the standard 3 the bake is correct but it looses the mapping on export.

Anyone know where im going wrong?
1.jpg
1.jpg (25.78 KiB) Viewed 2200 times

2.jpg
2.jpg (19.98 KiB) Viewed 2199 times
Image
User avatar
Axeonalias
 
Posts: 715
Joined: Mon Aug 25, 2008 2:25 pm
Location: South Africa
Preferred Sim: Virtual Sailor

Re: Texture Baking

Postby itsme » Tue Apr 27, 2010 7:44 pm

I obviously have not a clue about such sophistication. What I notice is in pic1 you have multiple tiles where against in pic2 only one tile is represented. But you have noticed this already.
Cheers, Reino.
User avatar
itsme
 
Posts: 820
Joined: Mon Jun 16, 2008 5:32 pm

Re: Texture Baking

Postby CaptainMack » Wed Apr 28, 2010 1:13 am

**** LARGE IMAGES WARNING ****

Hi Axe. I'll try to help you on this, but I can only speak on behalf of 3ds Max 2009, even if I've used the same procedure in 3ds Max 8.
This is a process that works like a charm for me, always ;) So I'm not going to tile this texture, but IF it was tiled, it would show up correctly after baking.
The texture is this one.

Image

1. Applying one standard material with diffuse texture

Image

I add the texture into a material slot in the Material Editor, under the section "Maps".

2. Applying Skylight and Advanced Lightening Setup

Image

I add a Skylight and adjusting the render setup in 3ds Max where I select light tracer for advanced lightening.

3. Applying Unwrap UVW modifier

Image

In the modifiers stack I select the unwrap uvw, expand it and select the sub-element faces, and select all faces of the box, Edit -> Select All (or Ctrl + A).

4. Applying channel for texture baking

Image

When baking textures, I need to use another channel than the default channel 1. Virtual Sailor or VSF can only read materials using channel one. Therefore I'm doing this "trick" by switching channels.
I set this one to channel 3 in the unwrap uvw modifier (not channel 2...since I've experienced glitches/bugs with that one).

5. Using manual UV mapping and editing UWVs

Image

When the faces are selected, like I said, I set channel 3 under parameters and then I click on the Edit button.
In the Edit UVWs window I select Mapping and then Flatten Mapping from the menu line.

Image

I the pop-up I normally use spacing to 0,002 to bring the UVWs as close to each other without overlapping.

Image

After that I scale and move the UWVs to fit the blue, thick surrounding frame. When finish, I just close that window.

Image

I also de-expands the modifier unwrap uwv since the uvw's are now ready for the baking process.

6. Render to texture (baking)

Image

Okey, I then bring up this window where my path is set to a scenery in the VSF scenery folder.
Under objects to bake I have my box selected. At mapping coordinates channel 3 is selected, and use existing channel since I will use the manual UWVs made in step 5.

Image

I will make a complete map for my box after clicking the Add button.

Image

Image

Yeah, and I also select the location and type of file this texture will placed after rendering.

All setups checked, ready for rendering process.

Image

So the rendering goes on....

7. Adding baked texture to the box

Image

After that, I close the render to texture window. Then I make a new material in the material editor at the bottom that I call baked just to not mix the baked with the original.
I browse for the baked texture and add it as a diffuse map under the maps section.

Image

After that I apply the material to the box. As you can see.. now it looks messy. So to get rid of that mess I go back to the Unwrap UWV modifier and set map channel back to channel 1.

Image

So that's the end of the texture baking process, where the new baked texture is applied to the box, and map channel switched back to map channel 1.

8. Exporting to OBJ-file with material library

To get rid of the unwrap UVW modifier I simply right-click the box and converts its to Editable Poly...or Mesh. The UWVs are still there.

Image

Image

So I'm exporting it as "mybox" with the OBJ-exporter.

Image

And these are my settings for the OBJ-Exporter. After that I can open it in Deep Exploration with the materials visible and make a X-file.

Same procedure with tiled original texture

Image

After tiled the original (not the baked) I right-click the box and converts it again to Editable Poly to get rid of the UWV Mapping modifier.
Then I add the Unwrap UVW modifier...

Image

...and then we are back a Step 3 and the same process to step 7.

The clue is to always switch channels to not make it messy, it need to be done in the Unwrap UVW modifier and in the Render to Texture dialogue. :)

Well, some of it may look like old news...but this process works as a charm. Like you probably already know, we are working with two sets of textures, the originals and the baked, and it's the baked ones we want to have on our model when exporting. :)
CaptainMack
 

Re: Texture Baking

Postby CaptainMack » Wed Apr 28, 2010 1:16 am

Hmm..to see all the images in full size, go here ;)
CaptainMack
 

Re: Texture Baking

Postby Axeonalias » Wed Apr 28, 2010 7:48 am

Thx Mack,this was very helpfull,wile my procedure was a little different and Alot simpler using the automatic unwrapper.

I followed your procedure using your texture to the T,still same issue,its as if it sets the uv mapping back to its original position (the texture usually appears huge and out of scale)

Ill have to just keep messing with settings etc until i find this monster :mrgreen: but I have learned how to use the advanced lighting menu now,thx and i shall be using it
Image
User avatar
Axeonalias
 
Posts: 715
Joined: Mon Aug 25, 2008 2:25 pm
Location: South Africa
Preferred Sim: Virtual Sailor

Re: Texture Baking

Postby Axeonalias » Wed Apr 28, 2010 8:09 am

After some more testing I have found something interesting:
1.jpg
1.jpg (12.02 KiB) Viewed 2101 times

This is a render in the perspective window after import from Su,all seems fine

2.jpg
2.jpg (18.39 KiB) Viewed 2101 times

This is the bake its been producing,Notice how the tileable has been stretched to the size of the bake instead of staying where it was?

3.jpg
3.jpg (9.21 KiB) Viewed 2101 times

This is a look in 3d explorer,shading is correct but tileable is not
Image
User avatar
Axeonalias
 
Posts: 715
Joined: Mon Aug 25, 2008 2:25 pm
Location: South Africa
Preferred Sim: Virtual Sailor

PreviousNext

Return to 3D Modelling Software

Who is online

Users browsing this forum: No registered users and 1 guest