Tenek Epsilon
Registered User
Join date: 31 Aug 2005
Posts: 12
|
07-30-2006 06:43
Hi all, a noob question here. now I'm building few things on SL, now I know how to upload texture files. I use photoshop to make the pictures but when I upload them they don't fit or a put out of proportion. Is there any way to work out the size the picture need to before I upload the texture file. I've tried to repostion the texture but to no avail.
Thanks.
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
07-30-2006 09:42
Before getting to your question specifically, here are a couple of tips you need to know if you don't already: - Always make sure your canvas size on every texture you make is measured in powers of two on each axis. This is an openGL requirement. Measurements SL will accept (in pixels) are 32, 64, 128, 256, 512, 1024, and 2048. If you don't use one of those numbers for the height and width of your image, SL will resize it at the time of upload, and the results are not always pretty.
- Always keep texture sizes as small as possible. Lousy texture size management by content creators is the single biggest reason SL runs as slowly as it does. Generally speaking, 256x256 is more than big enough for most purposes. Legitimate reasons to go bigger than that are quite rare.
- Textures don't have to be square. Any combination of the above numbers for height and width is fine. i.e. 64x1024, 128x512, 32x2048, etc.
As for your question, the answer is take a look at the proportions of the prim you want to texture, make your texture according to those proportions, and if necessary, mount it on a proper power-of-two sized canvas. For example, let's say you're texturing a cube side that is 5M wide and 4M tall. Here's the procedure you would use: - You know you've got a ratio of 5 to 4, so if your texture is 256 pixels wide, it should be 205 pixels tall, so start with that. Make your 256x205 teture using whatever painting tools you like.
- Since you can't upload a 256x205 cleanly, you're going to need to mount that image on a 256x256 canvas. In Photoshop, simply go Image -> Canvas Size... and change the canvas to 256x256. You should now see a bunch of blank space above and below your image, filling the canvas, which is now square.
- Save and upload to SL.
- When you apply the texture to your prim in SL, it will initially show the whole thing, including that blank part of the canvas you don't want to see. You'll need to crop off the excess canvas by using the repeats per face settings on the editor's texture tab (accessed by clicking on the More button on the editor). To find the right setting, it's just a question of simple math (or trial & error if you prefer). Since the part of the image you want height-wise is 205 pixels out of the total 256, or 80% of the total, simply set the repeats per face to .80 on the vertical. Since we're using the entire width, set the horizontal repeat to 1.
Your image should now look perfectly correct on your 5x4 prim. That's all there is to it. Of course, the specifics of the math will change, depending on the size and shape of the prim in question, but the concept is always the same. Oh, and one more tip. Since you've got that extra blank space on your canvas, consider not letting it go to waste. You can fill that space with additional textures for use on other surfaces. Just use the repeat and offset settings to isolate the portion of the canvas you want to see on each surface. "Texture sheeting" like this will save tremendously on system resources.
_____________________
.
Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
|