Black Body Star Textures

Tips for creating and manipulating planet textures for Celestia.
Avatar
Topic author
FarGetaNik M
Posts: 484
Joined: 05.06.2012
With us: 12 years 5 months
Location: Germany

Black Body Star Textures

Post #1by FarGetaNik » 31.03.2017, 18:59

Once proper star colors are implemented in Celestia, we should consider proper colored textures as well. I havn't tried yet if the command BlendTexture true works on stars... also it might be useful if Celestia automatically colored star textures according to temperature.

Anyways, I created a highres 8k star texture from SDO images. I just projected the sun's disc to polar coordinates and stiched it together to a cylindrical texture... so it is somewhat fictional. Then I used this chart to color in the textures according to spectral type and normalzed brightness to one half. Brighter textures tend to be overexposed by starshine, making them useless.

stars-spectral-sequence.jpg


My star textures showing spectral types O, B, A, F, G, K, M, L. M uses a correctly projected texture created from UV data, L uses an even higher UV frequency but is projected like the textures from O-K.

star-textures.zip
(1.28 MiB) Downloaded 511 times

john71
Posts: 1009
Joined: 10.08.2016
With us: 8 years 3 months

Post #2by john71 » 01.04.2017, 09:56

Very nice work!

Added after 2 minutes 1 second:
By the way I think in a 64 bit new Celestia release 8k should be the standard texture size (in 32 bit it crashes Celestia after opening too many hires textures).

Avatar
Topic author
FarGetaNik M
Posts: 484
Joined: 05.06.2012
With us: 12 years 5 months
Location: Germany

Post #3by FarGetaNik » 01.04.2017, 11:38

Thanks :) I realized I forgot to normalize the O star texture... But it's only a preview anyways. The 8k textures are 45 MB each... I could post the neutral colored or unprecessed one if anyone needs it...

Hm I think that's a bad idea. While I dropped the lores textures (256 px) I use my Celestia installation on 1k medres most of the time, unless I want a photorealistic render. When using 8k textures it gets stuck loading sometimes. I don't think 64 bit will improve this, only a faster hard drive (SSD) could. Also I'm using mostly jpg for this reason.

I think it would be increadibly usefull if Celestia loaded lores and medres textures first and only the hires when really needed (similar to virtual textures). It is annoying if a world happens to be in the field of view, larger than one pixel, and Celestia gets stuck loading an 8k texture...

john71
Posts: 1009
Joined: 10.08.2016
With us: 8 years 3 months

Post #4by john71 » 01.04.2017, 13:38

Yes, loading time is a problem, but realistic 8k textures are still superior to any lores or procedural textures (like in Space Engine).

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

Post #5by selden » 01.04.2017, 17:35

Why not use VTs for the star textures?

That'd improve both performance and memory usage.

Fridger Schrempp's original zsh (bash) script which uses ImageMagick for splitting up textures is available at http://web.archive.org/web/20050828132838/http://www.shatters.net/~t00fri/virtualtex

Fridger's most recent utilities for splitting up textures are available at http://www.celestialmatters.org/?q=node/30

John Van Vliet's bash script which uses VIPS for splitting up textures is available at https://github.com/JohnVV/MyCelestiaBuild/blob/ma ... c/tools/scripts/VertTexVIPS.sh

A minimal directory structure for creating a VT is available at https://www.classe.cornell.edu/~seb/celestia/files/minimumvtframework.zip
Selden

john71
Posts: 1009
Joined: 10.08.2016
With us: 8 years 3 months

Post #6by john71 » 01.04.2017, 20:05

I was able to create a 32k VT using only Gimp...but thanks for the links!

Avatar
Topic author
FarGetaNik M
Posts: 484
Joined: 05.06.2012
With us: 12 years 5 months
Location: Germany

Post #7by FarGetaNik » 01.04.2017, 21:05

selden wrote:Why not use VTs for the star textures?

Because I don't want to modify every star in the whole Celestia installation :fie: but seriously, the sun would be the only relevant start for me anyways... does performance improve with virtual texture for 8k textures alreay? I was able to create VT using Fridger Schrempp's texture tools, but they lack an option to create jpg textures. They are still a pain to create, so I would appreaciate if Celestia used it's resources more efficiantly even without rather complicated VTs. But thanks for the links, maybe I find a way to improve this procedure.

john71 wrote:I was able to create a 32k VT using only Gimp...but thanks for the links!

With Gimp? Do you use any scripts? It will take forever to do this manually, except for a very large tile size. But Gimp on my computer barely can load 32k textures anyways, working with them is impossible for me.

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

Post #8by selden » 01.04.2017, 23:14

Are you willing to provide your 8K star textures in png format? (The Zip above contains only 1K textures.) I could easily convert them into VT format if you want.

You don't have to replace anything: just put the VT files in Celestia's own textures/hires folder. Celestia v1.6.1 does not include any hires star surface textures of its own.

For example, put gstar.ctx and gstar_levels (or whatever you've named its levels directory tree) in textures/hires. When you select the "hires" render option and goto the Sun (or any G class star), your VT will be shown. When you select either the "medres" or "lores" render option, Celestia's standard jpg will be shown.

Since Fridger's original virtualtex script uses ImageMagick, it can generate any output format you want, although its default DDS output format is DXT5, which isn't as highly compressed as DXT1. That script isn't as efficient as the newer utilities, but I find it more than adequate.

p.s. Celestia used to use a single star surface texture and colorized it corresponding to the spectral type. I think people objected to all stars looking the same, though.

p.p.s. I suspect Celestia gets "stuck" when loading 8K textures mostly because they're in jpg format. After loading them, it has to expand them to full size, convert them to RGB format and then load them into the graphics hardware. In contrast, DDS format images get loaded directly into the graphics hardware with no expansion or image format conversion at all.
Selden

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

Post #9by John Van Vliet » 01.04.2017, 23:32

while my vips library shell script is rather fast
there is no alpha support in that version of it

i need to upgrade it to the current vips8 lib's new api

john71
Posts: 1009
Joined: 10.08.2016
With us: 8 years 3 months

Post #10by john71 » 02.04.2017, 15:57

FarGetaNik: No, I'm not using scripts, I start with 32k textures (it is really slow, I admit), after that I use the "guillotine" function of Gimp to create tiles. I use 4k tiles, to reduce the number of them. After that you can rename them manually... :)

Avatar
Topic author
FarGetaNik M
Posts: 484
Joined: 05.06.2012
With us: 12 years 5 months
Location: Germany

Post #11by FarGetaNik » 02.04.2017, 17:03

selden wrote:Are you willing to provide your 8K star textures in png format? (The Zip above contains only 1K textures.) I could easily convert them into VT format if you want.

Of course, this was just supposed to be a preview. I uploaded them on my google dive: https://drive.google.com/open?id=0B14NSu0PnA5xaFRWV2NBemd5YTA

I would really appreciate jpg tiles, I can create png myself. I was totally lost with ImageMagick, so I stuck to the comand-prompt utilities. I know dds is faster loading, but overall unhandy compared to jpg imo.

If it works simply by putting it into my hires folder, this is increadibly usefull. Thanks for the tip!

Using a single star texture for all spectral types would be great, it saves a lot of disk space and loading time. One should be carefull how to color in the texture, they should still be "normallized" in brightness so some stars won't appear too dark.

I always suspected jpg to load more slowly than other formats because of its unique color space, but what slows down Celestia is simply my hard drive reading the images, not the graphics interpreting them in my experience. So jpg is my format of choice.

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

Post #12by selden » 02.04.2017, 17:31

If you haven't already, you might consider upgrading to or adding an internal Solid State Disk. Their prices aren't too unreasonable these days and their performance is very, very good.

I'll download your file shortly.

Added after 3 hours 1 minute:
FarGetaNik,

Virtual Textures of the eight star surface textures are now available to everyone in a Google Drive folder named "Celestia" at
https://drive.google.com/drive/folders/0B210C4xpMG-nYUliVHVXaWY1OGs

The folder contains two Zip files:
jpg_star_levels.zip (109MB expands to 110MB)
and for comparison
dds_star_levels.zip (137MB expands to 224MB)

The individual tiles are 1K on a side.

p.s. I trust you're aware that the textures have "polar pinch" problems.
Selden

Avatar
Topic author
FarGetaNik M
Posts: 484
Joined: 05.06.2012
With us: 12 years 5 months
Location: Germany

Post #13by FarGetaNik » 03.04.2017, 09:12

I'm considering getting a new computer soon, certainly with a SSD.

Thank you very much for the VTs! It works perfectly! I know my textures are not accurately projected, but the pinch effect seems to be present only at smaller resolutions, on higher levels it disappears. The small-scale granulation exposes this effect I think. The poles should be projected fine (except for the mstar texture).

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

Post #14by selden » 03.04.2017, 10:57

You're very welcome.
Selden

Avatar
Adirondack M
Posts: 528
Joined: 01.03.2004
With us: 20 years 8 months

Post #15by Adirondack » 03.04.2017, 18:16

Isn't there a pinch filter in GIMP?
Like (in german words) Filter -> Verzerrungsfilter -> Polarkoordinaten... in Photoshop?

Adirondack
We all live under the same sky, but we do not have the same horizon. (K. Adenauer)
The horizon of some people is a circle with the radius zero - and they call it their point of view. (A. Einstein)

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

Post #16by John Van Vliet » 03.04.2017, 18:33

in gimp
Filters / Distorts / " Polar Coordinates "
Screenshot_20170403_143117.png


and why is "mstar" 3000 x 1500 ???

john71
Posts: 1009
Joined: 10.08.2016
With us: 8 years 3 months

Post #17by john71 » 03.04.2017, 18:45

John Van Vliet, thanks, I didn't know that! :)

Avatar
Adirondack M
Posts: 528
Joined: 01.03.2004
With us: 20 years 8 months

Post #18by Adirondack » 03.04.2017, 21:10

Thanks, John, that's what I meant.
@ FarGetaNik: Go ahead, fix the scale for "mstar" (like e.g. 4096 x 2048) and eliminate the pinch!

Adirondack

Should look like this:
mstar_pinched.jpg


Please note: There are also some seams in your image! Eliminate them too.
We all live under the same sky, but we do not have the same horizon. (K. Adenauer)

The horizon of some people is a circle with the radius zero - and they call it their point of view. (A. Einstein)

Avatar
Topic author
FarGetaNik M
Posts: 484
Joined: 05.06.2012
With us: 12 years 5 months
Location: Germany

Post #19by FarGetaNik » 03.04.2017, 21:29

Adirondack wrote:Like (in german words) Filter -> Verzerrungsfilter -> Polarkoordinaten... in Photoshop?

I used exactly this filter for the O-K & L star textures.

John Van Vliet wrote:and why is "mstar" 3000 x 1500 ???

I simply picked the map on this site and didn't bother to rescale it, but it should be projected cylindrical already. I don't see how the non-pow-of-2 texture is affecting the pinch effect? The pinch is already present in the source material. The virtual textures are fine. The M star texture needs some cosmetic work anyways, I am not proficient enough to significantly improve it.

Added after 1 minute 11 seconds:
Ok ok I see what I can do, my first atempts looked messy...

Avatar
Adirondack M
Posts: 528
Joined: 01.03.2004
With us: 20 years 8 months

Post #20by Adirondack » 03.04.2017, 21:38

FarGetaNik wrote:I used exactly this filter for the O-K & L star textures.
So you already know what to do. :wink:

FarGetaNik wrote:I don't see how the non-pow-of-2 texture is affecting the pinch effect?
The non-power-of-2 does not effect the pinch effect! It's the cylindrical image (its upper & lower edges) itself, so to say...

Adirondack
We all live under the same sky, but we do not have the same horizon. (K. Adenauer)

The horizon of some people is a circle with the radius zero - and they call it their point of view. (A. Einstein)


Return to “Textures”