Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

How do I handle text as a texture?

Bronte Alcott
Registered User
Join date: 31 Dec 2006
Posts: 19
03-20-2008 04:42
I'm making a peace pole and have everything done but the four text panels in the four different languages. I own Photoshop Elements and also have Paintbrush on my Mac, but I have no experience using these tools. Basically, I'm trying to get a text bar that turns a horizontal line of text into a vertical texture that gives crisp clear readable words.

The phrase is "May peace prevail on earth" in black text on a white background. Can anyone point me in the right direction? The panel the texture will go on is .200 wide by 1.750 long. I am clueless about pixels and everything i've uploaded so far winds up a blur on the pole.

I'm wondering if there is a simple way to create a text image and what size and format to upload it in.

If anyone could just point me in the right direction, even to a tutorial, I would be very grateful. I'm a real newbie with this.

Thank you.
Kahiro Watanabe
Registered User
Join date: 28 Sep 2007
Posts: 572
03-20-2008 07:39
The more suitable format for SL is tga.

If you upload for example, a jpg, the image to be showed must be decompressed first. That's why compressed formats are not recommended.

Also it is highly recommended not go beyond the 512 pixels. So for a rectangular banner you can use something like 256x64, 256x128 and try to make the prims with that relation.

for example 256 is four times 64 so if you do a 2x0.5 box you will see the same proportion.
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
03-20-2008 08:04
Photoshop Elements will do the trick. Just use it to create the texture with your text, in whatever format you like, then save it as a .tga file and upload it. When you apply the texture to the pole, you can use the various controls in the "Textures" section of your SL Edit menu to rotate the text, stretch or squeeze it, and move it up, down, left, or right to make it fit.
Bronte Alcott
Registered User
Join date: 31 Dec 2006
Posts: 19
Thank you!!
03-20-2008 10:43
Thank you both so very much. I will do as you suggest.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
03-20-2008 11:49
From: Bronte Alcott
I own Photoshop Elements and also have Paintbrush on my Mac, but I have no experience using these tools.

Before you go any further, I'd highly recommend you spend some time getting to know your software, and learning about graphics in general. You don't want to put the cart before the horse. So slow down, forget all about texturing for the moment. Do some reading to learn the fundamentals of graphics, and then step through some beginner tutorials to learn the basics of the specific program you're using. Only after you've done that, should you return to the subject of texturing. Trust me; it's worth the wait, and in the end you'll be very glad to have done the right thing now.

The reason I say this is that while the specific image you're looking to create at this moment is very simple, texturing itself is a big subject. Developing improper habits in the beginning can come back to bite you in a big way later. When you're brand new to all this, if you try to learn texturing at the same time as you're first learning how a graphics program works, it's almost a guarantee be overwhelmed, no matter how smart or talented you may be. Sooner or later you'll find that your efforts will amount to little more than a giant exercise in frustration and disappointment. Without starting from a proper, solid foundation, every step you take will only land you on shakier and shakier ground.

Take a little time now to do it right, and you can avoid all that trouble. You'll be very glad you did.


From: Bronte Alcott
Basically, I'm trying to get a text bar that turns a horizontal line of text into a vertical texture that gives crisp clear readable words.

The phrase is "May peace prevail on earth" in black text on a white background. Can anyone point me in the right direction? The panel the texture will go on is .200 wide by 1.750 long. I am clueless about pixels and everything i've uploaded so far winds up a blur on the pole.

I've never seen a peace pole before, but I just Googled for it, and I found this:



Is that what you're trying to make? If so, then your task is extremely simple.

I'm going to give you a brief tutorial here, but before I get to it, let me take a minute to reiterate, please take what I said above to heart. Please don't be insulted by what I'm about to say, but by your own words, you don't even know what a pixel is right now, and that's really not a good place to be staring from. You might as well be asking how to build a jet aircraft without having yet even learned what metal is. You seriously need to read up on graphics fundamentals before you proceed any further with learning to texture.

I know it's going to be tempting to just dive in and do it, since I'm about to explain the steps. But, once again, I can promise you that if you approach this without a proper understanding, you WILL experience extreme frustration. This particular task might be simple enough that you'll be able to get by on the raw steps alone, but without really understanding what you're doing, you're going to hit a wall sooner or later that you won't know how to get around, and then you'll be back to square one. And that kind of thing will only get worse as time goes on, as you attempt more and more complex projects, which you inevitably will. Learn the basic fundamentals first, and you won't have that problem.

All that said, here come the how-to's...

From: Bronte Alcott
I'm wondering if there is a simple way to create a text image

You're using Photoshop Elements, right? Well, here's a quick tutorial. I'll do my best to put it in as beginner-friendly language as possible, but since you're brand new, there will undoubtedly be some words you might not understand, or some procedures you don't know how to do. Consult the Help file in PSE for more information on these things. Unfortunately, it's not possible to explain every last thing about any program in an environment like this forum. That's what books are for, and as I'm sure you can understand, none of us have time to write an entire book just to answer one little question.

1. Create a new image file.

Click File -> New. The program will ask you what size you you want your new image to be. Before we get to actual size (as measured in pixels), let's think about proportion. You stated that your object in SL is roughly 8 times as wide as it is tall (actually, you said it's the other way around, about 8 times as tall as it is wide, but when you consider that the texture is going to be turned on its side, it's perfectly reasonable to go the wide way instead of the tall way). Well, the easiest thing to do to make the texture "fit" the object is to keep the same basic proportions on both.

You want the image to be tall enough that the text will be legible, but not so big that you end up wasting space. Always make textures as small as you can possibly get away with, for performance reasons. Texture size mismanagement on the part of users is the single biggest reason SL runs as slowly as it does. For everyone's sake, always err on the the side of smallness.

So how tall should it be? Well, for a simple font like the one in the picture I linked, you don't need a whole lot of pixels for it to be clear. A height of 32 pixels is more than enough room for a decent font size, say 14pt or 16pt or so. If the object in SL is likely to appear large on people's screens, meaning you think people will likely want to zoom in on it, you might want to go with a larger texture size for better clarity. In that case, a height of 64 might be better. I wouldn't go any bigger than that for something this simple.

At 64 height, your width would be 512. Let's go with that. You'll want your image to be 512x64. Don't input that quite yet, though. We've got a couple of things to talk about first.

Where am I getting these numbers from, by the way? Well, remember that stickied thread about texture sizes at the top of the forum, the one you mistakenly posted in before? Read it. The information it contains is very important. One of the things it explains is that textures must be measurable (in pixels) in powers of two. 32 and 64 are both powers of two. 256 and 512 happen to be the powers of two that would go with them to most closely match the dimensions of your object.


2. Put text on the image.

Take a look at the toolbox on the left side of the screen. See the button with the big black T on it? That's the Type tool. Click that to select it, and then click somewhere in your image. You'll see a blinking cursor appear where you clicked. You can now start typing, and you'll see the text appear on the canvas.

Across the top of the screen is the tool settings bar. Every tool has settings. For the Type tool, you'll see you can set the font, size, justification, color, etc. of the text. Pick a size that enables the full line of text to fit on the canvas. Go with whatever font and color you like.

If you clicked to start your typing in a strange place, don't worry. Just grab the Move tool (the black arrow at the top of the toolbox), and drag the whole line of text wherever you want it on the canvas.

3. Save the file and upload it to SL.

Not much to be said here. I'll talk a little about formats in a minute, but I must assume you already know how to save formats, and how to upload things to SL.


4. Apply your texture to your object and rotate as necessary.

Depending on how you made the object, the texture might look a little funny when you first apply it. If you made the pole by stretching a cube height-wise (the Z axis), then the texture will end up squished along its width, and stretched along its height. I assume this is what you meant when you said everything "winds up a blur". The way to fix that is simply to rotate the texture on the surface by 90 degrees.

Select the object, and then in the editor window, click on the More button to expose all the tabs and options. Click on the Texture tab, and then look for the field called Rotate. By default, the rotation will be set to zero. Enter the number 90 and press Enter. The texture should straighten out right away.

Of course, the other way to go would have been to have started with a wide cube instead of a tall cube, and then rotated the whole cube instead of rotating the texture. Either way works.


There you go. You should be all set now. The only little problem right now is that you've got the English version of your phrase on all sides, but you want a different language on each. There are two solutions for this. One would be to make three more textures the same way you just did, and then apply one to each face of the cube. The other would be to make a single texture with all four lines on it, and then use the repeats per face and offsets settings in SL to show only one quarter of the whole texture on each face. For performance reasons, the latter would be what I'd recommend, but either way works.



From: Bronte Alcott
and what size and format to upload it in.


Again, read the sticky at the top of the forum. It's got a complete explanation of the sizes and formats SL can use. I already gave you a recommended size for the particular image you're looking to make. For format, I recommend TGA, always.




From: Kahiro Watanabe
If you upload for example, a jpg, the image to be showed must be decompressed first. That's why compressed formats are not recommended.


Small point of clarification. You're right that JPEG is not a good format to use, but you're incorrect on the reason why. The fact that it needs to be decompressed to be viewed is irrelevant. All images in SL are compressed, and all must be decompressed before you can view them, no matter what.

The reason it's not a good idea to use a lossy format like JPEG as your source image is because SL saves everything internally in another lossy format, called JPEG2000. When you start with something lossy to begin with, and then convert it to a different lossy format, you lose quality not just once but twice, and your image quickly starts to look bad. It's akin to making a copy of a copy on Xerox machine. It's never a good idea.

When your source image is lossless, the JPEG2000 conversion still causes you to lose some quality, but not nearly as much as if your source were lossy from the start. Textures sourced from TGA, BMP, or PNG will always look better than those sourced from JPEG.
_____________________
.

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.
Alwin Alcott
Registered User
Join date: 5 Jan 2007
Posts: 34
03-20-2008 16:44
there's no need for expensive programs to make texts on your textures... can also do it in microsoft's paint...
Kaimi Kyomoon
Kah-EE-mee
Join date: 30 Nov 2006
Posts: 5,664
03-20-2008 17:21
/me squirms with embarrassment - again.

Chosen, I've made quite a few signs in sl now. I used to make them all conform to the 32 64 128 256 etc. rule but for some time now I've just been uploading them whatever size they are. And they still seem to look ok after SL resizes them and I put them on prims that match the original aspect ratio. Am I fooling myself?
_____________________



Kaimi's Normal Wear

From: 3Ring Binder
i think people are afraid of me or something.
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
03-20-2008 20:34
the * of 8 is used for open GL (the 3d software that works with sl and your video card) of course SL already resizes them for you to meet this requirement

as far as fooling yourself it really all depends, if your image is only a handfull of pixels one way or another you probably will not ever notice a difference, this is due to the jpg2k quality loss and the rendering of the image by open GL in combination with your video card (IE: notice how inworld your square pixels are more like blurry crosses-stars)

but if you get into the habbit of doing this it will eventually bite you causing streaching or squashing of the image to the point where it just wont look good

+ think of the extra computer power your using when asking the asset server to do resizing your images
Kaimi Kyomoon
Kah-EE-mee
Join date: 30 Nov 2006
Posts: 5,664
03-20-2008 20:46
From: Osgeld Barmy
the * of 8 is used for open GL (the 3d software that works with sl and your video card) of course SL already resizes them for you to meet this requirement

as far as fooling yourself it really all depends, if your image is only a handfull of pixels one way or another you probably will not ever notice a difference, this is due to the jpg2k quality loss and the rendering of the image by open GL in combination with your video card (IE: notice how inworld your square pixels are more like blurry crosses-stars)

but if you get into the habbit of doing this it will eventually bite you causing streaching or squashing of the image to the point where it just wont look good

+ think of the extra computer power your using when asking the asset server to do resizing your images


Thanks for the answer. You seem to be saying what I was thinking, that if it looks good it's good.
If it doesn't look good I'll change it, of course. It's simple enough to re-size it myself.
_____________________



Kaimi's Normal Wear

From: 3Ring Binder
i think people are afraid of me or something.
Bronte Alcott
Registered User
Join date: 31 Dec 2006
Posts: 19
Huge Thanks
03-21-2008 04:31
Huge thanks to Chosen Few for the great directions, and all of the time it must have taken to write them out, and for the cautionary note regarding learning my graphics program. I followed the directions and the peace pole is complete. Wow!!! I can give it to my friend, which is all I really wanted. Now, I feel, I have the time to figure out more of all of this, and everyone's comments will be very helpful. Thank you!
Kaimi Kyomoon
Kah-EE-mee
Join date: 30 Nov 2006
Posts: 5,664
03-21-2008 09:00
From: Osgeld Barmy


+ think of the extra computer power your using when asking the asset server to do resizing your images


I should have thought of that. Ok. I can resize them myself.
_____________________



Kaimi's Normal Wear

From: 3Ring Binder
i think people are afraid of me or something.
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
03-23-2008 23:26
its been a few days but to bump this point i will provide an example (sorry everyone i have been moving)

lets say you have a 513*100 image

it takes an average *bigbox brand* computer 2 seconds to resize

and you have 100,000 users doing this

grats, you just added 138 days of work

course LL isnt dealing with a single bigbox brand computer, they have a large cluster of computers acting as one brain, so 138 days might be 138 seconds, if it took 138 days THAT would be severe lag for the application

138 seconds yes you can take care of by resizing your images to a power of 8

and every little bit of lag saving does help the big picture
Kaimi Kyomoon
Kah-EE-mee
Join date: 30 Nov 2006
Posts: 5,664
03-23-2008 23:41
Really. I'll never do it again.
_____________________



Kaimi's Normal Wear

From: 3Ring Binder
i think people are afraid of me or something.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
03-24-2008 07:51
Osgeld, unless I'm misreading you, you're presenting some very inaccurate information here.

First, you seem to be saying that odd-sized images are resized by the asset server. That's not how it works. They do get resized, yes, but the asset server isn't what does it. Any necessary resizing is done by the local client before the image is uploaded, not by any server after the fact. The asset server simply stores the textures (and other things) once they've been uploaded; it does not change them.

In simplistic terms, here's what happens when you hit the upload button:

1. Client software examines the image.

2. Client software scales the image sizing to powers of two. If the image is already in powers of two, this step has no effect.

3. Client software saves the (resized) image in JPEG2000 format.

4. Client software uploads the JPEG2000 file to the asset server.

The source image file never gets anywhere near the servers. Only the resized and reformatted version gets uploaded. Before the server gets the first inkling that the image even exists, the resizing and reformatting has already been done.

The reason it's best to pre-size your images correctly in Photoshop (or equivalent) first, rather than letting SL do it, is not that it saves on server processing power, but simply that Photoshop happens to do a better job of it in terms of visual quality than does the SL client. An image resized by SL usually won't look quite as good as one resized by Photoshop. Also, since the power of two requirement is such a common rule in texturing (it goes well beyond SL), sizing textures properly upon creation is just a good habit to be in. That's it, really. No matter what you do, the resizing happens locally, not server-side.


Second, I notice you've twice now referenced the number 8 as a requisite, either by multiples or by powers, for proper sizing. In your most recent post, you said "power of 8", and in the one before that, you said "* of 8". (I assume the * means multiple.) Neither of these is accurate. What it's about is powers of two, not powers of 8, and certainly not multiples of 8.

If it were powers of 8, we'd only have three available numbers (8, 64, and 512) before we'd blow most graphics cards away. The next power up from there would be 4096, which is way too big for a lot of systems to handle in real time as a texture. SL's maximum is set at 1024 to prevent video cards from crashing.

If it were multiples of 8, we'd have all kinds of numbers available that we don't have now, such as 24, 40, 56, 72, etc.

Neither of those scenarios is true. The only numbers that are allowable are all powers of two between 8 and 1024, no more, no less. To spell it out, that is 8, 16, 32, 64, 128, 256, 512, and 1024. That's it.

The number 8 is relevant only in that it happens to be a power of two, and that it happens to be the smallest size LL has determined SL should accept. The latter limitation is a completely arbitrary, as far as I know. If LL so desired, I'm sure they could enable SL to accept sizes of 2 and/or 4, in which case 8 would simply fall in the middle of the scale, instead of at one end of it. There's nothing inherent to 8 that makes it any more or less special than any other power of two.
_____________________
.

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.