Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Texturing the inside of a hollowed cube

Periapse Seattle
Registered User
Join date: 9 Feb 2006
Posts: 3
04-19-2006 16:06
I can apply a different texture to each of the external faces of a cube prim. With a hollwed prim it seems that I can only apply one texture to the entire inner surface of the hollow. Using a cube prim with default (cube) hollow the one texture is stretched around all four faces of the interior. Is there any way around this, i.e. to have separate textures for each of the interior faces?

What's even worse is that I can't figure out how, exactly, the texture is applied to those inner faces. I understand that it is mirrored (fixable by selecting a horizontal flip), but more troubling is that even with "1.000 repeats per face" the texture is not completely used as it wraps around. Part of one side of the texture is not visible.

Does anyone know how this works, and can help me out or point me at any documentation for how textures are applied to prims?

Thanks,
Per
Candide LeMay
Registered User
Join date: 30 Dec 2004
Posts: 538
04-19-2006 17:58
Yes, look up Robin Sojourner inworld and follow the link to her excellent texturing tutorial in her profile picks.
_____________________
"If Mel Gibson and other cyberspace writers are right, one day the entire internet will be like Second Life." -- geldonyetich
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
04-19-2006 20:40
basicly make a image devided up into 4 parts in a row

ie

|part1|part2|part3|part4|

or if its one image you want to show fully on all 4 sides of the inside repeate x 4 in one direction
Periapse Seattle
Registered User
Join date: 9 Feb 2006
Posts: 3
04-19-2006 22:10
Thanks to both of you who replied! Robin Sojourner's tutorial (and shop) is amazing. There's so much info there it's like drinking from a firehose.

I did divide the texture into four parts, and finally got it to work right. What surprised me is that the four parts need to be equal (128 pixel on a 512 texture) even if the hollow is oblong (my y size is 10 but x is only 8). Furthermore I found that I had to increase repeats per face slightly (1.050) and tweak the offset a bit to make it all fit snugly for my 95% hollow.

Cheers,
Per
Goshua Lament
Registered User
Join date: 25 Dec 2003
Posts: 703
04-22-2006 23:41
That's a neat texturing trick! I'll have to try that out!
_____________________
Flickr Second Life Photo Gallery

I no longer regularly login to SecondLife, but please contact me if an issue arises that needs my attention.
Damanios Thetan
looking in
Join date: 6 Mar 2004
Posts: 992
04-23-2006 06:54
From: Periapse Seattle
Furthermore I found that I had to increase repeats per face slightly (1.050) and tweak the offset a bit to make it all fit snugly for my 95% hollow.


Textures inside hollow shapes behave as if they're projected on the outside of the shapes. This explains the increased repeats per size. Example: To get a texture to fit a 0.50 hole, the faces in the hollow are half that of the outside, so the 'projected outside repeats is twice that. (Imagine the texture in the right size projected on the outside face.)
In maths, to get the right repeats per texture:

<#repeats per face> * <#faces in hollow> / <hollow setting>

Examples:
- to wrap a single texture, so it covers all sides with 1 repeat on each side on a 95% square hollow :
1 repeats * 4 sides / 0.95 hollow = 4.21 repeats per face

- to wrap a special texture containing all 4 faces in a 95% square hollow:
0.25 repeats * 4 sides / 0.95 hollow = 1.05 repeats per face

- to wrap a texture so it covers all faces with 1 repeat per face in a 75% hollow triangle:
1 repeats * 3 sides / 0.75 hollow = 4 repeats per face
_____________________