Jump to content

  •  

CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.

Photo

Stellarium Landscapes and GIMP

  • Please log in to reply
14 replies to this topic

#1 ah.clem

ah.clem

    Explorer 1

  • -----
  • topic starter
  • Posts: 50
  • Joined: 06 Jun 2013

Posted 14 July 2021 - 03:50 PM

I've spent a few days (approximately 15 hours, I'm retired) trying to resolve this GIMP issue by reading, watching YouTube and experimenting. I'm sure it's a very simple issue for anyone with knowledge of graphics software but I am completely baffled and I would appreciate some help.

 

I have created 3 landscapes and I have successfully added them to Stellarium. I can now select the viewing areas around my house. What I cannot do, and has been so frustrating, is to black out the transparent selection below my centered panorama so that I don't see stars below my horizon.

 

I know how to open my JPG, resize the image and transparent canvas, add an Alpha layer, remove the sky and create a PNG file in the appropriate folder, but I cannot paint out the bottom of my canvas.

 

If someone can point me to a good tutorial for this, or just tell me the steps (the manual was not helpful, it really assumes a knowledge of graphics software) I would really appreciate it. I believe it has something to do with layers, but in all the videos on YouTube (both GIMP and Photoshop) it looks like there is a quick button click and the paintbrush is used to paint out the bottom transparency.

 

Any help would be most appreciated.



#2 grubba

grubba

    Sputnik

  • -----
  • Posts: 32
  • Joined: 27 Jun 2021
  • Loc: Nova Scotia, Canada

Posted 14 July 2021 - 04:20 PM

Can you post the (full size) image? I can then process it and post back a proper PNG with alpha channel.



#3 Dynan

Dynan

    Fly Me to the Moon

  • *****
  • Posts: 6,095
  • Joined: 11 Mar 2018
  • Loc: NOLA

Posted 14 July 2021 - 04:48 PM

This worked for me. But I didn't use an imaging program:

 

https://www.cloudyni...ght/?p=10722640



#4 gzotti

gzotti

    Stellarium

  • -----
  • Vendors
  • Posts: 110
  • Joined: 20 Mar 2017
  • Loc: Vienna, Austria

Posted 14 July 2021 - 04:51 PM

The unhelpful manual reveals the solution on page 67:

maptex_bottom (optional; default=-90) is the altitude angle of the bottom edge. Usually you will not require this, or else there will be a hole at your feet, unless you also specify
bottom_cap_color (optional; default=-1.0,0.0,0.0 to signal “no color”). If set, this is used to close any hole in the nadir area (if maptex_bottom higher than -90).

In your case, use bottom_cap_color=0,0,0 for a black nadir zone

Other instructions to adjust the image are just a few pages away.



#5 ah.clem

ah.clem

    Explorer 1

  • -----
  • topic starter
  • Posts: 50
  • Joined: 06 Jun 2013

Posted 14 July 2021 - 04:54 PM

Can you post the (full size) image? I can then process it and post back a proper PNG with alpha channel.

Unfortunately, even individually zipped they are too large to post. Can you tell me how to add another alpha channel to the existing layer?  Do I create a new transparent layer the same size as the canvas, make it an alpha layer, select the region below the image, paint it and then merge the layers and export? I really don't feel comfortable creating a link to google drive on a public forum.

 

Thanks. I'm still trying things.



#6 ah.clem

ah.clem

    Explorer 1

  • -----
  • topic starter
  • Posts: 50
  • Joined: 06 Jun 2013

Posted 14 July 2021 - 05:00 PM

This worked for me. But I didn't use an imaging program:

 

https://www.cloudyni...ght/?p=10722640

Thanks. I already have my images working correctly for the sky, I'm just trying to black out the area under the horizon.



#7 ah.clem

ah.clem

    Explorer 1

  • -----
  • topic starter
  • Posts: 50
  • Joined: 06 Jun 2013

Posted 14 July 2021 - 05:11 PM

The unhelpful manual reveals the solution on page 67:

maptex_bottom (optional; default=-90) is the altitude angle of the bottom edge. Usually you will not require this, or else there will be a hole at your feet, unless you also specify
bottom_cap_color (optional; default=-1.0,0.0,0.0 to signal “no color”). If set, this is used to close any hole in the nadir area (if maptex_bottom higher than -90).

In your case, use bottom_cap_color=0,0,0 for a black nadir zone

Other instructions to adjust the image are just a few pages away.

Thank you for pointing me to this and giving me a starting place. I will try to do this. I was in IT for more than 30 years, and I believe that the manual is not user-friendly to someone who does not have any experience using graphics software, just like most programming texts are quite confusing to neophyte or amateur software programmers. I sincerely apologize if you feel offended by my observation/opinion. As a technical writer myself, I have often been chastised for "writing beyond the audience".



#8 ah.clem

ah.clem

    Explorer 1

  • -----
  • topic starter
  • Posts: 50
  • Joined: 06 Jun 2013

Posted 14 July 2021 - 05:31 PM

I believe I have it figured out.  I opened the PNG, selected the lower region, added an ALPHA channel to the selected region and I was able to bucket fill the bottom of the image with black. then I could export back to the subdir. It worked great. I got the idea from grubba when he said he'd post back with a proper ALPHA channel.  Thanks, grubba!

 

EDIT: Actually, it's easier than above. Once I open the PNG file, I can select the region I want to fill and I don't need to set an ALPHA channel on the selected area, I can just bucket fill the area with black, save the XCF file and then export the new PNG.

 

I've just added this info in case someone else is trying to figure this out for Stellarium.


Edited by ah.clem, 14 July 2021 - 05:53 PM.

  • Dynan likes this

#9 grubba

grubba

    Sputnik

  • -----
  • Posts: 32
  • Joined: 27 Jun 2021
  • Loc: Nova Scotia, Canada

Posted 14 July 2021 - 07:00 PM

Unfortunately, even individually zipped they are too large to post. Can you tell me how to add another alpha channel to the existing layer?  Do I create a new transparent layer the same size as the canvas, make it an alpha layer, select the region below the image, paint it and then merge the layers and export? I really don't feel comfortable creating a link to google drive on a public forum.

 

Thanks. I'm still trying things.

I don't use Gimp. I use Photoshop. I can explain what to do but it won't be the same process. You basically create a new (transparent) layer beneath the main (image) layer and erase the portions you want to be transparent. Photoshop has proper tools to eliminate background (paint them out). Once done, you save as a PNG file. The transparent part becomes your alpha channel.



#10 grubba

grubba

    Sputnik

  • -----
  • Posts: 32
  • Joined: 27 Jun 2021
  • Loc: Nova Scotia, Canada

Posted 14 July 2021 - 07:14 PM

• Transparent layer added (beneath image)

• Background selected

• Delete background 

 

Screen Shot 2021-07-14 at 8.05.02 PM.jpg

Screen Shot 2021-07-14 at 8.06.52 PM.jpg

Screen Shot 2021-07-14 at 8.07.11 PM.jpg

 



#11 ah.clem

ah.clem

    Explorer 1

  • -----
  • topic starter
  • Posts: 50
  • Joined: 06 Jun 2013

Posted 14 July 2021 - 09:50 PM

Thanks, grubba. I'll give that a try to be sure that I understand it but once I had resized and set an alpha channel on my jpg, set the correct canvas size and then saved it as an xcf file and exported it as a png, I was able to select the region below my panorama and bucket fill it with black. Once saved with the black region, it works correctly. 

 

Many years ago I thought I'd take a try at learning Blender, figuring that with decades of programming experience behind me I shouldn't have a problem, but man... what a surprise I received! I believe that to be really good at 2D and 3D graphics software, you need to put in the kind of time you need to learn programming languages. I really admire that ability.



#12 grubba

grubba

    Sputnik

  • -----
  • Posts: 32
  • Joined: 27 Jun 2021
  • Loc: Nova Scotia, Canada

Posted 14 July 2021 - 10:02 PM

Many years ago I thought I'd take a try at learning Blender

Lol

 

Given that I've spent my career writing 3D software, specifically a well known one, I too get crossed eyed every time I look at Blender tongue2.gif  Either way, this sort of stuff is quite trivial to me. Let me know if you have any other question.



#13 lphilpot

lphilpot

    Vanguard

  • *****
  • Posts: 2,142
  • Joined: 15 Oct 2005
  • Loc: Central Lousiana, USA

Posted 14 July 2021 - 10:26 PM

Here's what I did in GIMP (and despite the obvious I'll go ahead and state I'm no expert). On one pano I cloned the foreground (albeit badly) but on the second I just added a black gradient to the bottom.

 

QcIeNaF.png

 

xfBwgSV.png



#14 ah.clem

ah.clem

    Explorer 1

  • -----
  • topic starter
  • Posts: 50
  • Joined: 06 Jun 2013

Posted 15 July 2021 - 11:21 PM

Thanks, Len. I'll also learn that technique. Seems there's lots of ways to get this done once you understand some fundamentals about file types. Right now I'm OK but I have many more locations to add so I'll try all that have been mentioned.



#15 lphilpot

lphilpot

    Vanguard

  • *****
  • Posts: 2,142
  • Joined: 15 Oct 2005
  • Loc: Central Lousiana, USA

Posted 16 July 2021 - 06:20 AM

The black area was originally just a layer with an alpha channel (for transparency) and a black foreground-to-transparent gradient on it.


CNers have asked about a donation box for Cloudy Nights over the years, so here you go. Donation is not required by any means, so please enjoy your stay.


Recent Topics






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics