Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

What is "texture baking"?

Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
11-26-2005 09:25
I understand it's something to do with rendering SL models in 3D packages, then pulling the resulting appearance of the model off as textures (how!?) and putting it on the SL object. But how do you allow for changing lighting conditions in SL for instance?
Nephilaine Protagonist
PixelSlinger
Join date: 22 Jul 2003
Posts: 1,693
11-26-2005 09:32
hi yumi!

usually the 3d package will output the image as a render shaped in the model's uv mapping. if you are rendering from the model of the sl avatar that was released, this can work out very nicely for clothing.

as for lighting conditions, there is unfortunately no way to create maps that will change dynamically with lighting situations in world for clothing, so the next best bet is to render with a global illumination/ambient sort of setup- a lighting rig where darks and lights are as nuetral in direction and diffused as possible, while still retaining the look of having been lit.

neil just mentioned that it would be possible to change textures via script to change the lighting conditions of an object, i suppose to be compatible with sl's sun, or the local lighting of the room ect. this is a cool idea, but i dont think it's been done in world yet- it would be cool to see it taken on, but it would also be *really* intense to create, involving several rerenders of the model being baked and several different lighting setups for baking them with.
_____________________
Foolish Frost
Grand Technomancer
Join date: 7 Mar 2005
Posts: 1,433
11-26-2005 09:33
From: Yumi Murakami
I understand it's something to do with rendering SL models in 3D packages, then pulling the resulting appearance of the model off as textures (how!?) and putting it on the SL object. But how do you allow for changing lighting conditions in SL for instance?



Simple answer: You can't. That's why it's called baking. When it's done, it's DONE.


Let me give you a basic methodology for baking textures into SL.

1. Build the item in another 3D package, such as BLENDER 3D.
2. Use global illumination methods to get the 'scatter effect' of the lighting on the object. That means you light the entire thing evenly with a lighting dome. The shadows on the object surfaces will then have shadows for cracks, creavaces, and surfaces not outwardly facing the light sources directly.
3. take pictures of those surfaces and use them to make textures for your SL object.
4. Build the object and take the textures with built in 'Global illumination" and apply them.

Normal lighting still effects the object, but the shadows from the texture make it seem more 'real' in how light normally bounces off the surfaces of the object.

Did that make sense, or does this need pictures? It's a fairly complex and time consuming system for making textures. Looks REALLY good on items though.
Yumi Murakami
DoIt!AttachTheEarOfACat!
Join date: 27 Sep 2005
Posts: 6,860
11-26-2005 09:38
From: Foolish Frost
Simple answer: You can't. That's why it's called baking. When it's done, it's DONE.


(looks at ability to store multiple textures)

(looks at llGetSunDirection())

Are you sure? ;)
Neil Protagonist
FX Monkey
Join date: 11 Jul 2003
Posts: 346
11-26-2005 09:42
You can certainly setup baked lighting for a changing lighting situation. Its time consuming but no more difficult than lighting it normally, just more time involved in baking out the X number of variations you want to change the textures to as the day progresses. I would love to see someone tackle this, I think it would be neat.


You could also tint the prim face over time to accentuate the normal bit of lighting sl does.
_____________________
"Control the things you can control, maggot. Let everything else take a flying f**k at you, and if you must go down, go down with your guns blazing." -Cort

Need fire? Visit my FX Store in Bisque(232, 48)
Sick-N-Wrong

Like Anime? Visit Nakama!
Foolish Frost
Grand Technomancer
Join date: 7 Mar 2005
Posts: 1,433
11-26-2005 09:43
From: Yumi Murakami
(looks at ability to store multiple textures)

(looks at llGetSunDirection())

Are you sure? ;)


<evil grin> Please. Be my guest. Let me know when you get done, and then we can watch the object grey out to the default wait texture every time the sun moves.

Anyway, You missed the point of the above: If it's done right. You don't have to. It's to capture the detail shadows in the crooks and nooks. SL can do surface illumination already.
Nephilaine Protagonist
PixelSlinger
Join date: 22 Jul 2003
Posts: 1,693
11-26-2005 09:43
this thread had some interesting examples of several different ways to achieve the baked look. octal's place is cool. :)

From: someone
foolish frost: we can watch the object grey out to the default wait texture every time the sun moves.


hahahaha oh wow i didnt even think about that, but youre right. that would be an annoying limitation. no good way around it either, no matter how fast you can get those textures to load, for those first few seconds of switchover the build would just be awful. :p

editing yet again: but aimee has a point too, if its only happening a couple times a day it might be worth the coolness of the effect.
_____________________
Aimee Weber
The one on the right
Join date: 30 Jan 2004
Posts: 4,286
11-26-2005 09:44
From: Yumi Murakami
(looks at ability to store multiple textures)

(looks at llGetSunDirection())

Are you sure? ;)


This is certainly possible on a small scale. My empire state building in hawthorne changes textures between day and night (2 textures). I am currently considering 4 sets of textures for the next Midnight City build, for noon, evening, night, and morning. Doing this could become laggy for a whole sim around the time the textures change so I may just scrap it and do day and night textures.
_____________________
Aimee Weber
The one on the right
Join date: 30 Jan 2004
Posts: 4,286
11-26-2005 09:45
From: Foolish Frost
<evil grin> Please. Be my guest. Let me know when you get done, and then we can watch the object grey out to the default wait texture every time the sun moves.

Anyway, You missed the point of the above: If it's done right. You don't have to. It's to capture the detail shadows in the crooks and nooks. SL can do surface illumination already.


The alternative is to have the different light phase textures on one texture sheet, and the script would move the offset depending on the sun's position. The cost would be high for the initial texture load time, but then you wouldn't grey out when it was time to shift to the next texture.
_____________________
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
11-26-2005 09:56
From: Foolish Frost
<evil grin> Please. Be my guest. Let me know when you get done, and then we can watch the object grey out to the default wait texture every time the sun moves.

Anyway, You missed the point of the above: If it's done right. You don't have to. It's to capture the detail shadows in the crooks and nooks. SL can do surface illumination already.


Depending on what you want to do, making a shadow that moved with the sun could simply be a matter of rotating / stretching the shadow prim. It shouldn't be terribly difficult to make a simple sun dial for instance.
Aimee Weber
The one on the right
Join date: 30 Jan 2004
Posts: 4,286
11-26-2005 09:58
From: Eggy Lippmann
Depending on what you want to do, making a shadow that moved with the sun could simply be a matter of rotating / stretching the shadow prim. It shouldn't be terribly difficult to make a simple sun dial for instance.


Another great point!
_____________________
Enabran Templar
Capitalist Pig
Join date: 26 Aug 2004
Posts: 4,506
11-26-2005 09:59
From: Aimee Weber
The alternative is to have the different light phase textures on one texture sheet, and the script would move the offset depending on the sun's position. The cost would be high for the initial texture load time, but then you wouldn't grey out when it was time to shift to the next texture.


Beat me to it, Aimee, but that was my thought exactly. That's the best way to avoid the brief ghosting effect when you need to cycle through textures.
Noel Marlowe
Victim of Occam's Razor
Join date: 18 Apr 2005
Posts: 275
11-26-2005 10:02
You might need to keep the repeats pretty low (<1), so it doesn't wrap. Plus, you might need to rotating the image too... Boo, Eggy beat me to it. *curses* Wonder what it would take to get a better light rendering system, so these hacks weren't necessary? Oh is there a way to turn off lights and shadows effects on a prim by prim basis. I think the answer is no.
Foolish Frost
Grand Technomancer
Join date: 7 Mar 2005
Posts: 1,433
11-26-2005 10:10
From: Enabran Templar
Beat me to it, Aimee, but that was my thought exactly. That's the best way to avoid the brief ghosting effect when you need to cycle through textures.


Agreed. A perfect idea.

Still would not want to be the one who has to render and copy all those textures. Whew! :D
Aimee Weber
The one on the right
Join date: 30 Jan 2004
Posts: 4,286
11-26-2005 10:14
From: Foolish Frost
Agreed. A perfect idea.

Still would not want to be the one who has to render and copy all those textures. Whew! :D


*looks at Maya*
*looks at Midnight City*
*looks at Maya*
*goes back to bed*


:D
_____________________
Foolish Frost
Grand Technomancer
Join date: 7 Mar 2005
Posts: 1,433
11-26-2005 10:16
From: Aimee Weber
*looks at Maya*
*looks at Midnight City*
*looks at Maya*
*goes back to bed*


:D


There, there! It's all over now. You can rest for the 7th day.

:D
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
11-26-2005 10:17
aimee == smart <3
Foolish Frost
Grand Technomancer
Join date: 7 Mar 2005
Posts: 1,433
11-26-2005 10:21
From: Eggy Lippmann
aimee == smart <3


And/Or stubborn. They're both excellent traits that successful creatives tend to have.