Nebula texture trouble

General discussion about Celestia that doesn't fit into other forums.
Topic author
bidmaron
Posts: 44
Joined: 10.04.2005
With us: 19 years 7 months
Location: Portsmouth, NH

Nebula texture trouble

Post #1by bidmaron » 28.10.2006, 20:31

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).
--Dale--

Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 2 months

Re: Nebula texture trouble

Post #2by Malenfant » 28.10.2006, 20:36

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.
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

BrainDead
Posts: 238
Joined: 27.08.2005
With us: 19 years 2 months
Location: Germantown, OH

Post #3by BrainDead » 29.10.2006, 13:53

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
Brain-Dead Bob

Windows XP-SP2, 256Meg 1024x768 Resolution
Intel Celeron 1400 MHz CPU
Intel 82815 Graphics Controller
OpenGL Version: 1.1.2 - Build 4.13.01.3196
Celestia 1.4.1

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #4by selden » 29.10.2006, 14:13

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.
Selden

Topic author
bidmaron
Posts: 44
Joined: 10.04.2005
With us: 19 years 7 months
Location: Portsmouth, NH

Billboard CMOD tutorial

Post #5by bidmaron » 29.10.2006, 20:07

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.
--Dale--

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #6by selden » 29.10.2006, 20:43

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.
Selden

Fightspit
Posts: 510
Joined: 15.05.2005
With us: 19 years 6 months

Post #7by Fightspit » 29.10.2006, 21:41

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.
Motherboard: Intel D975XBX2
Processor: Intel Core2 E6700 @ 3Ghz
Ram: Corsair 2 x 1GB DDR2 PC6400
Video Card: Nvidia GeForce 8800 GTX 768MB GDDR3 384 bits PCI-Express 16x
HDD: Western Digital Raptor 150GB 10000 rpm
OS: Windows Vista Business 32 bits

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #8by selden » 29.10.2006, 21:58

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.
Selden

Topic author
bidmaron
Posts: 44
Joined: 10.04.2005
With us: 19 years 7 months
Location: Portsmouth, NH

Transparency problem

Post #9by bidmaron » 30.10.2006, 04:36

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.
--Dale--

LoneHiker
Posts: 53
Joined: 10.10.2005
With us: 19 years 1 month

Re: Transparency problem

Post #10by LoneHiker » 30.10.2006, 06:16

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

Topic author
bidmaron
Posts: 44
Joined: 10.04.2005
With us: 19 years 7 months
Location: Portsmouth, NH

PSP Help

Post #11by bidmaron » 31.10.2006, 00:11

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).
--Dale--

LoneHiker
Posts: 53
Joined: 10.10.2005
With us: 19 years 1 month

Re: PSP Help

Post #12by LoneHiker » 31.10.2006, 01:39

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

Topic author
bidmaron
Posts: 44
Joined: 10.04.2005
With us: 19 years 7 months
Location: Portsmouth, NH

Thanks for PSP help

Post #13by bidmaron » 31.10.2006, 02:55

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).
--Dale--

LoneHiker
Posts: 53
Joined: 10.10.2005
With us: 19 years 1 month

Re: Thanks for PSP help

Post #14by LoneHiker » 31.10.2006, 06:15

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

Topic author
bidmaron
Posts: 44
Joined: 10.04.2005
With us: 19 years 7 months
Location: Portsmouth, NH

My thanks

Post #15by bidmaron » 31.10.2006, 12:28

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--
--Dale--

tech2000
Posts: 258
Joined: 14.02.2006
Age: 52
With us: 18 years 9 months
Location: Skepplanda, Sweden

Re: My thanks

Post #16by tech2000 » 31.10.2006, 13:13

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

LoneHiker
Posts: 53
Joined: 10.10.2005
With us: 19 years 1 month

Re: My thanks

Post #17by LoneHiker » 31.10.2006, 16:01

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


Return to “Celestia Users”