Page 1 of 1

Nebula texture trouble

Posted: 28.10.2006, 20:31
by bidmaron
I am having trouble getting my nebula png to have the desired transparency. I would post the images, but I can't even figure out how to get this forum to post images. Anyway, the image shows up with 50% transparency just perfect in Paintshop Pro, but when I view the nebula in Celestia, the background is transparent but the image itself is a dull-grey non-transparent image.
I'm kind of new here, so how do I post an image in a topic? I tried copying the image in PSP but there doesn't seem to be any way to paste it here (using IE 7).

Re: Nebula texture trouble

Posted: 28.10.2006, 20:36
by Malenfant
bidmaron wrote:I'm kind of new here, so how do I post an image in a topic? I tried copying the image in PSP but there doesn't seem to be any way to paste it here (using IE 7).


You can't post images to the forum directly - you have to upload them to a website and link to the image using the [ img ] tags here.

http://imageshack.us is a semidecent free image hosting site you can use if you don't have your own website.

Posted: 29.10.2006, 13:53
by BrainDead
Bidmaron,

Sounds like your texture may be too large for your graphics card (if any) to
handle. On MY machine, if I try to use a 4k texture mapped to any of the
planets or moons, I see excatly what you're talking about. I get a dull white
or grey globe which feature NO details of the planet or moon. If you can,
try using a simpe 1024 x 512 version of your texture to see if that works in
Celestia.

Also, Selden can generally pinpoint ANY kind of graphics display problem if
you give him all of the details concerning your system specifications. In
other words, what processor speed, how much RAM, what kind of graphics
card, etc.

Hope that helps.

Take care, Bob

Posted: 29.10.2006, 14:13
by selden
It might also be that the texture is not a power-of-two on a side. This limitation is in most graphics hardware. Celestia v1.4.1 and older also have this restriction.

For Nebula objects, as Bob says, it's best to use textures that are 512 or 1024 pixels on a side. Not everyone will be able to see larger textures.

If you really want to display a higher resolution image, you'll have to cut the image into smaller pieces and you'll have make your nebula model out of several different meshes, each displaying its piece.

Billboard CMOD tutorial

Posted: 29.10.2006, 20:07
by bidmaron
Selden, I am following (or tyring, anyway) your instructions on the CMOD billboard at
http://www.lepp.cornell.edu/~seb/celest ... -cmod.html

Here is a screenshot of how my 512x512 png looks in PSP:
Image

But here is how the screenshot in Celestia looks when I navigate to the billboard:
Image
I made this by installing Selden's billboard1 in my extras directory, deleting the billboard1.png photo and renaming my png file to billboard1.png.
I appreciate any help in this matter, but I don't understand why the image which is clearly translucent in psp is opaque in celestia.

Posted: 29.10.2006, 20:43
by selden
Dale,

How do you know that it's opaque?

You need to look through it at another object, like a star, galaxy, planet or another nebula, to find that out. I don't see any other objects in your example image, so I can't determine from this picture if it's opaque or transparent.

Posted: 29.10.2006, 21:41
by Fightspit
I notice the body of the billboard is not translucent but opaque in Celestia and it is not the case in PSP where the body is a little translucent.

Posted: 29.10.2006, 21:58
by selden
Celestia does require that the image file contain an alpha channel defining the opacity. If the opacity is a constant value, some applications will optimize the opacity to be a "transparency index." This won't work in Celestia.

Transparency problem

Posted: 30.10.2006, 04:36
by bidmaron
Selden, I fear this may be the problem, but I don't know how to fix it. I'll try a mask layer with a 50% opacity set on the bug outline and 0% opacity elsewhere and see how that works. Appreciate the help. I can't afford Photoshop, but if I can't get PSP working, I guess I'll have to figure out how to use Gimp.

Re: Transparency problem

Posted: 30.10.2006, 06:16
by LoneHiker
bidmaron wrote:Selden, I fear this may be the problem, but I don't know how to fix it. I'll try a mask layer with a 50% opacity set on the bug outline and 0% opacity elsewhere and see how that works. Appreciate the help. I can't afford Photoshop, but if I can't get PSP working, I guess I'll have to figure out how to use Gimp.


There's no reason this can't be done in PSP. If you have a recent version the first thing you need to do is go to

File>Preferences>File Format Preferences...

and click on the PNG tab and make sure

Load and save transparency to / from alpha channel

is selected. If it's not then PSP will not save the alpha channel information if the image is saved in any format other than the native PSP format.

(This option isn't well documented in the program help and IMO it's stupid that it's left unselected as default.)

I hope this solves the problem.

Edit: If this doesn't resolve the problem perhaps you can upload the actual PNG and people can take a look just to verify the alpha channel info is there.

Lone

PSP Help

Posted: 31.10.2006, 00:11
by bidmaron
OK, I set the preference as you describe, but now when I save it and load it in Celestia, the background is solid white. I'm feeling pretty dumb, but I just can't figure out how to get PSP to make a translucent png. It looks translucent in PSP, but when loaded is either like I showed before or shows a solid white background (even though the PSP window shows the background is the checkerboard).

Re: PSP Help

Posted: 31.10.2006, 01:39
by LoneHiker
bidmaron wrote:OK, I set the preference as you describe, but now when I save it and load it in Celestia, the background is solid white. I'm feeling pretty dumb, but I just can't figure out how to get PSP to make a translucent png. It looks translucent in PSP, but when loaded is either like I showed before or shows a solid white background (even though the PSP window shows the background is the checkerboard).


I had a lot of frustration with the newer versions of PSP too. Compared to the first version I owned, PSP 6, they've made things needlessly complicated.

The easiest thing to do would be to upload the PNG for examination. I could take a look and if the reason for the problem is apparent I can suggest a solution.

Lone

Thanks for PSP help

Posted: 31.10.2006, 02:55
by bidmaron
The image of concern is below:
Image
I'd sure be grateful if you can give me the step by step to have a transparent background and a ghostly scarab translucent image (about 50% is what I'm looking for).

Re: Thanks for PSP help

Posted: 31.10.2006, 06:15
by LoneHiker
bidmaron wrote:I'd sure be grateful if you can give me the step by step to have a transparent background and a ghostly scarab translucent image (about 50% is what I'm looking for).


I opened the image in PSP and there is nothing saved in the alpha channel.

(I'm using PSP X so for other versions these instructions may not apply exactly.)

----------

1. Open the image and duplicate the background layer.

2. Select the background layer and fill it with black. Alternately, you can set the background color to black and press the delete key.

3. Select the duplicate layer. Using the magic wand with the tolerance set to 0 select the white background around the scarab. For a smoother outline turn on anti-aliasing and set the feather to 1 or 2 before using the magic wand.

4. Adjust the brightness to -255 so that the area around the scarab is black. Deselect.

5. Reduce the brightness of the scarab layer to -120 and increase the contrast to +50.

6. Create a mask layer from the scarab image using source luminance. In PSP X you do this by selecting 'Layers>New Mask Layer>From Image...>Source luminance'.

7. Save the mask layer to the alpha channel. In PSP X select 'Layers>Load/Save Mask>Save Mask To Alpha Channel...'

8. Save the image as PNG.

----------

You'll probably need to play around with the brightness and contrast settings in Step 5 until you get the results you want. There are other ways to make a mask, but hopefully this one will work for you.

Lone

My thanks

Posted: 31.10.2006, 12:28
by bidmaron
It worked! It was the step to convert the mask to the alpha channel I was ignorant about. I assumed the mask WAS an alpha channel, and that's why my image had no transparency. Thanks to all!
--Dale--

Re: My thanks

Posted: 31.10.2006, 13:13
by tech2000
bidmaron wrote:It worked! It was the step to convert the mask to the alpha channel I was ignorant about. I assumed the mask WAS an alpha channel, and that's why my image had no transparency. Thanks to all!
--Dale--


Hi Dale.

How about showing us a screenshot of the final result? :wink:

Bye, Anders

Re: My thanks

Posted: 31.10.2006, 16:01
by LoneHiker
bidmaron wrote:It worked! It was the step to convert the mask to the alpha channel I was ignorant about. I assumed the mask WAS an alpha channel, and that's why my image had no transparency. Thanks to all!
--Dale--


Hello Dale,

I'm glad you were able to get it to work. :) This is one of those things that seems so simple in retrospect once you know how to do it. Unfortunately PSP doesn't make it as easy as it should be. But Photoshop is even less intuitive (IMHO).

I'm sure you'll have no problem getting the image to look exactly the way you want it now.

Lone