Background image in space scene

Started by htsoft, August 22, 2013, 05:50:24 AM

Previous topic - Next topic

htsoft

Hi all,

my name is Roberto and I'm a new to Terragen. I'm trying to create a space scene with a planet and a star background.

I'm using for background an Image Map Shader, I set pojection to Camera but when a render the scene the background doesn't appear correctly, what I'm doing wrong?

I've looked for some thread on the forum about this problema but I didn't find something.

Attached to this message there is the render, the tgd file and the background image.

Thank you for your help.

Roberto

Hannes

Go into the network of your background object,
disconnect the image map shader from the background's surface shader,
create a a default shader,
connect the image map shader with the colour function input and the luminosity input of the new default shader,
set the value for diffuse color and luminosity to 1,
IMPORTANT: assign a camera to the image map shader, when it's set to "through camera"! Otherwise TG doesn't know where to project through.

And voilá, there's your background

htsoft


MinusD

I am having the same difficulty as Roberto had and I'm trying to follow Hannes' solution but I am missing something.

Color and Luminosity values are set to (1) in my Default Shader.  It might be obvious from the network screenshot where I have gone astray but I attached my .tgd file for reference, if someone can take a peek and give a novice some advice?  Thanks!.  -d


Dune

There's no tgd attached, but if you want an image as background it should go inside the background node. You can import your (spherical) image there (in luminosity input of default shader or as image map shader attached to input of luminosity), and set projection to the render camera, or if you want a spherical image all around, set it to spherical.

MinusD

I'm sorry, one attachment must have been lost somewhere along the way.  (Now attached, for reference.)
Thanks for the advice, Dune.  I will try to apply it in the context of Hannes's instructions to Roberto. 

So, if I  map my .jpg image to Surface Shader in the Background (object), then to what do the Background input and/or output nodes connect?


(signed) MinusD pulling a D- in Terragen 101

Oshyan

The Background object doesn't need to connect to anything, it's a stand-alone object. Only the Surface Shader inside it needs to connect to its Shader input.

- Oshyan

MinusD

EUREKA.  I was working one level too high in the network. 
Thank-you, Dune and Oshyan.  Now I see stars!

midnight_stories

Quote from: Hannes on August 22, 2013, 08:29:58 AM
Go into the network of your background object,
disconnect the image map shader from the background's surface shader,
create a a default shader,
connect the image map shader with the colour function input and the luminosity input of the new default shader,
set the value for diffuse color and luminosity to 1,
IMPORTANT: assign a camera to the image map shader, when it's set to "through camera"! Otherwise TG doesn't know where to project through.

And voilá, there's your background
Would that work on a spherical camera, and how does the tiling work spherical camera. I see there is spherical option in the image shader or that just VU coordinates ?

Oshyan

The Spherical option in the Image Map Shader is for applying to objects with a spherical mapping. It disregards UVs.

Through Camera is its own projection type, you can't use Spherical *with* it, it is used instead of Spherical projection (of an image map).

- Oshyan

midnight_stories

Quote from: Oshyan on October 20, 2017, 09:04:21 PM
The Spherical option in the Image Map Shader is for applying to objects with a spherical mapping. It disregards UVs.

Through Camera is its own projection type, you can't use Spherical *with* it, it is used instead of Spherical projection (of an image map).

- Oshyan
Thanks that stops me from going down the wrong path.
I wanted to have a BG with the earth and stars in it. But I think I may have to put the earth on a flat plane and some how have it face the camera.
It's for a 360 moonscape.

Dune

You can add another planet (or a sphere with earth dimensions) and move it to the location you want. Copy that location.
Add an image map shader, assign a spherical (equirectangular) earth image.
Set to spherical and paste the location in. 
Attach the image map shader to the planet or sphere surface shader input (which you can find by doublclicking the + on the planet).
If using a planet, you could disable atmosphere if it gets too hazy.
If you later move the planet, copy the new location and paste in the image map shader, or the image won't align.

midnight_stories

Quote from: Dune on October 21, 2017, 02:42:08 AM
You can add another planet (or a sphere with earth dimensions) and move it to the location you want. Copy that location.
Add an image map shader, assign a spherical (equirectangular) earth image.
Set to spherical and paste the location in. 
Attach the image map shader to the planet or sphere surface shader input (which you can find by doublclicking the + on the planet).
If using a planet, you could disable atmosphere if it gets too hazy.
If you later move the planet, copy the new location and paste in the image map shader, or the image won't align.
You know I actually understood everything you said that's scary some of this is sinking in at last. I actually got the card to work pretty good, but I will say it looks a bit fake. You you are suggesting sounds better and will be more realistic so I'll give that a go. Thanks for the advice !

bobbystahr

midnight_stories...checked it out in my LizardQ viewer and it looks pretty good. Dunno if it's worth the render time to put an actual planet in for earth though...as I said looks fine as it in the viewer:
https://www.lizardq.com/en/downloads/
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

midnight_stories

Quote from: bobbystahr on October 21, 2017, 10:22:36 AM
midnight_stories...checked it out in my LizardQ viewer and it looks pretty good. Dunno if it's worth the render time to put an actual planet in for earth though...as I said looks fine as it in the viewer:
https://www.lizardq.com/en/downloads/
Thanks that looks like an excellent utility I'll give that a go. I got the 3D planet in lost the clouds not sure what happened there ?