PDA

View Full Version : Image Resolution: Technical Question



4dartist
11-08-2007, 12:17 PM
I've heard that if you create a texture image at (1x1024)pixels that when lightwave renders the image it uses the same amount of memory as a (1024x1024) image. Basically it rounds up to the nearest power of 2. So if you make an image at (1025x1) it would round to (2048 x 2048). Does anyone know if that information is correct? I really trust the source i heard it from, but I may have understood it wrong, so was wondering if this is how it works.

Thanks for the information.

iconoclasty
11-08-2007, 12:23 PM
I've never heard that before. I'm very interested to hear the answer.

Lightwolf
11-08-2007, 12:25 PM
As far as I know this is not true at all.
However, textures displayed in the openGL viewports must have dimensions that are a power of two (1, 2, 4, 8, 16, 32, 64, 128, 256, 1024, 2048 etc...).
I think that LW pickes the width and height independantly out of these, but it may be that the width and height need to be identical.
This only affects Layout/Modeler, and only if you use a textured viewmode and the images are actually potentially visible.

Cheers,
Mike

4dartist
11-08-2007, 12:42 PM
Very interesting I hope that is the case.

I have another question too although unrelated. I have recently learned you can use a .png as a texture and you don't need an alpha channel image separate because LW can see the transparent parts of the .png. This is great because it saves a lot of time, but i have been having trouble because modeler and layout can't see the image correctly in openGL unless I go to image editor and turn it to alpha only. It shows up with black all over most of the image.
http://4dartist.com/cgtalk/png.jpg

Am i doing something wrong? Is there another image type that does this but works better in openGL?

Lightwolf
11-08-2007, 12:57 PM
Is there another image type that does this but works better in openGL?
They all work the same. Also, depending on what you want to do, remember you can clone the image and set different alpha options.

What exactly do you want to use the alpha for? Be default it is used to control how the image is applied to within the texture layers, which means it doesn't _not_ affect the transparency of the object.

4dartist
11-08-2007, 03:05 PM
I think my post was confusing sorry! hehe. I just want to apply the UNITED STATES black text on a surface in the color channel but leave the underlying color intact.

Normally i just use a separate black and white image as set to 'alpha' in the texture editor above the color image, and thus just applies the black text to the surface.

Seems like you can skip that step if you use .png and lw sees the fact that the area outside the text is blank and doesn't fill it in with white, but leaves it blank, that way when you add it in the color channel you don't have to alpha out the white around the text, it's already gone.

My problem is openGL doesnt show the .png image in openGL correctly. It's creates black boxes over the text or something strange as seen in the image on the previous post. I noticed though if you turn it to 'alpha only' the image draws correctly (I don't know what alpha only does, and i don't want to use it, i just noticed it makes the image show right) With that on i can see the text in openGL correctly, but i'd rather it show in openGL correctly at the default setting cause i don't want it on 'alpha only'.

Hope that clears things up a bit. Thanks for the reponses.

4dartist
11-08-2007, 03:12 PM
I've never actually tried using a .psd with parts of the image blank, and seeing how it layers in LW. It works like i discribed, the areas around the text show up white in the little image preview, but when rendered it doesn't render that white and shows the sufaces color setting underneath.

Going to have to start using .psd for text and logos.

edit- and it shows correctly in openGL

Lightwolf
11-08-2007, 03:38 PM
Hope that clears things up a bit. Thanks for the reponses.
It does. What you're dealing with here is an openGL limitation. If you activate GLSL in the display options it should show as expected ... with a huge speed penalty though.

The faster, legacy openGL pipeline can only display one layer on a surface, in your case the image. Not the effect that image layer has on the surface though (i.e. it has an effect if it includes an alpha channel that obscures whatever is underneath the layer).

Cheers,
Mike