Trying to Use Default Shader in Background Node

Started by RichTwo, October 26, 2018, 12:23:46 pm

Previous topic - Next topic

RichTwo

I have been using the default shader internally in the background node and using a starfield image on the default color and luminosity inputs, changing both colors to pure white.  And indeed I got the effect of a nighttime sky with stars. 

But in reality that is not what was happening.  I tried plugging a different image, such as a nebula, and all I got was star-like dots of the same colors as the image, no nebula.  I even took my original starfield image and made a copy which I had drawn a big white "X" across and used it.  And still got star-like dots in lieu of the "X". 

I'm sharing the nebula image I was trying to use and if anyone has success in making it project as it looks onto the background, I'd love to know how it's done. 

Thanks in advance.
They're all wasted!

Oshyan

What projection were you using for the texture? In the Default Shader this setting is on the Images tab. For the Background sphere you'll probably need to use Spherical. That might work just by itself, however...

In the case of any spherical mapping usually the *position* of the image also needs to be set to the same as whatever you're spherically mapping to. The Background sphere is at 0,0,0 by default so it may work automagically, so to speak. If not, since the Default Shader doesn't include a Position setting, you'd need to use an Image Map shader instead. If the Default Shader has some setting you want that's not present in the Image Map shader, you could just use the new Image Map shader as an input to the Color Function of the Default Shader you already have. Just make sure to specify the position to be the same as the Background Sphere. You can open the Background Sphere settings and just use the copy button to the right of the position coordinates.

- Oshyan

WAS

You'll probably want a spherical image to use for spherical, since it seems you'll end up with a  stretched look

Oshyan

True. If your image is non-spherical and you want it to look exactly like it does when you view it in an image viewer, just as the background of your scene (behind the atmosphere), then you can use Through Camera projection and connect it to your render camera. This is a cool trick. :)

- Oshyan

RichTwo

October 28, 2018, 01:57:37 pm #4 Last Edit: October 28, 2018, 01:59:45 pm by Rich2
Yay - it worked!  But the "stars" are way out of proportion as if they were magnified, looking more like blobs.  I'm using a 1500 X 844 image.  Would I need one smaller or larger?

I remember my using the Image Map shader back when I was into TG2, and was getting fairly good results, or so I thought at the time.  I've been away, mostly for a few years, so I don't recall exactly what I did. 

Check this out.

https://bw-1651cf0d2f737d7adeab84d339dbabd3-gallery.s3.amazonaws.com/images/image_2143432/6d4b5cd46409024973d3ebf6ad8d0c74_large.jpg
They're all wasted!

Oshyan

It depends on your render resolution, but you probably need a higher resolution image. Also note that it is non-square and you should try to make it the *aspect ratio* as your render, otherwise it will be squashed on one dimension.

- Oshyan

RichTwo

Quote from: Oshyan on October 28, 2018, 05:38:40 pm
It depends on your render resolution, but you probably need a higher resolution image. Also note that it is non-square and you should try to make it the *aspect ratio* as your render, otherwise it will be squashed on one dimension.

- Oshyan


I almost always use the 16 X 9 aspect ratio in renders, and the image size is that.  Also it is the same as I attached, which to me looks fairly sharp.  I tried a medium-high quality render exactly the same size as the background image, and still it comes out stretched vertically and very low res.  It gets better projected spherically (not stretched, anyway), but definitely not as good as the image itself.  In the image map shader, I tried flipping "x" and "y".  I tried reducing the size from 1 / 1 to 0.25.  I tried checking and unchecking every box on every feature.  I ever tried changing the radius size of the background.  Nada.

I've done this more than once in TG2 and have achieved fairly good results each time.  The image I attached proves it.  I don't remember having difficulties at all.  Like you said, almost magically it happened.  But I am not doing something right this time and I cannot figure out what it is.  Somewhere in my years-long absence from TG I have lost part of my mind...
They're all wasted!

WAS

Quote from: Rich2 on October 29, 2018, 02:09:58 pm
Quote from: Oshyan on October 28, 2018, 05:38:40 pm
It depends on your render resolution, but you probably need a higher resolution image. Also note that it is non-square and you should try to make it the *aspect ratio* as your render, otherwise it will be squashed on one dimension.

- Oshyan


I almost always use the 16 X 9 aspect ratio in renders, and the image size is that.  Also it is the same as I attached, which to me looks fairly sharp.  I tried a medium-high quality render exactly the same size as the background image, and still it comes out stretched vertically and very low res.  It gets better projected spherically (not stretched, anyway), but definitely not as good as the image itself.  In the image map shader, I tried flipping "x" and "y".  I tried reducing the size from 1 / 1 to 0.25.  I tried checking and unchecking every box on every feature.  I ever tried changing the radius size of the background.  Nada.

I've done this more than once in TG2 and have achieved fairly good results each time.  The image I attached proves it.  I don't remember having difficulties at all.  Like you said, almost magically it happened.  But I am not doing something right this time and I cannot figure out what it is.  Somewhere in my years-long absence from TG I have lost part of my mind...


Images rendered in TG in general seem to "pop" and be noticeable as images. Maybe a lack of beautification. But you may be noticing that a bit. For example, the gamma is effected by your scene, bring out jpeg artifacts.  No offense to anyone else, but skyboxes in TG are noticeable like "Night and Day" (ironically).