Planetside Software Forums

Support => Terragen Support => Topic started by: Kadri on August 31, 2010, 08:49:49 AM

Title: Same Node settings , different render problem
Post by: Kadri on August 31, 2010, 08:49:49 AM
Open the TGD below .
Make a quick render.
You will get something like the picture "planet_sun_test_01"
Then go to the "Planet 02" object and open its internal node part.You will see 4 nodes. One node -the Atmosphere 02- is in OFF position.
Take the "Cloud layer v2 01" node over this OFF Atmosphere and make it go directly to the Atmosphere shader input (bypass the OFF Atmosphere node).
Now make a quick render ones more. It should look like the second image here(planet_sun_test_02).
Now say you don't like this and want the same render as before.
Put the Atmosphere 02 in the same position as before (between Cloud Layer v2 01 and Atmosphere shader input).
Don't change its state (leave it OFF as it is)
Now make a quick render again.

What? "planet_sun_test_03"...

It should look like the first render (because everything is the same as you open the TGD), but it looks like the second render?
Is this a bug? We should make the same render with the same node states. If this behavior is in other places too it would make TG2 much more hard to use.

Can you guys test this too please. In case i make something stupid here ?  :)

I use : Free TG2 v2.1 (build 2.1.18.1)
          Windows 7 64 bit Home Premium Edition,
          Intel Core 2 Quad Q9400 ( 4 cores x 2.66 GHz)
          4 GB Ram , ASUS P5QD Turbo Mainboard and Ati 4870 Graphics card
          Nothing is overclocked !
Title: Re: Same Node settings , different render problem
Post by: dandelO on August 31, 2010, 04:43:22 PM
I think it has to do with the 'heading, elevation, distance' parameters of planet 2. I never use these because I've had problems with this before, too.

Resetting the heading and elevations of planet 2 both to '0' returns the original effect, but, for some reason, the planet doesn't even need to occlude the sun anymore to still cast rays from its cloud layer into the main atmosphere, the cloud layer still occludes the sun, no matter where the planet is. Weird. Hopefully someone has a better explanation for why this happens.

Anyway, I'd avoid the 'heading, elevation and distance' parameters in a planet node and do it by hand, copying the sun's coord's(by mousing over the sun in the 3d preview) to the planet, then resizing the planet radius to your desired size.

Title: Re: Same Node settings , different render problem
Post by: dandelO on August 31, 2010, 04:48:41 PM
Look at this shot, the planet is nowhere near the sun but its cloud layer still occludes the sun the original way(you can tell by the 'secondary ray' shadows on the ground that the sun is still actually shining through planet 02's cloud layer, even when the planet is nowhere near the sun).

[attachimg=#]

Definitely avoid the heading and elevation parameters in a planet, though. Unless someone can explain how to use them correctly in conjunction with the world coord's...
Sorry, it isn't an answer, just an advice! ;)

Title: Re: Same Node settings , different render problem
Post by: Kadri on August 31, 2010, 05:23:51 PM

Interesting , DandelO !
I tried to copy the "Default Planet" in older tests and had problems with the Atmosphere and clouds.
They were not where they should be mostly when i moved the planet . I wonder if this has anything to do with this problem here?
I thought that two same atmospheres did made TG2 go buggy. So i tried this -maybe more correct- approach (loading a second Planet from the menu directly).
I hope this is a limited kind of bug(if it is of course).

I tried what you did and yes the second planet and atmosphere behaves weird as in your test.
Thanks DandelO :)
Title: Re: Same Node settings , different render problem
Post by: Henry Blewer on August 31, 2010, 06:50:21 PM
You should not move the default Planet. The coordinates of any modifications are not tied to the default planet, but a center that the default planet occupies. When you add a 2nd planet, all the nodes associated to it need to connect to this new planets center, not the planet itself.

I ran into this problem more than a year ago. Before I started lurking here anyway. It took me quite some time to figure this out, and because I think I have it figured out, I'm probably wrong. But the concept works.
Title: Re: Same Node settings , different render problem
Post by: dandelO on August 31, 2010, 07:27:34 PM
It's actually 'planet 02' that's being moved here, though, Henry, not the default planet.

I've been quite confused over this myself before. I ended up deciding to simply leave well alone any secondary planet's heading/elevation/distance parameters and translating its actual 3D world-coordinates.

I'm probably just not getting something simple but I can't work it out.
Hopefully there will be some support for this because, to me, it seems like a bug.
Title: Re: Same Node settings , different render problem
Post by: dandelO on August 31, 2010, 07:38:25 PM
BUT...

Actually, the second and third shots that Kadri has posted is actually the way that the scene should function.
In the first image, the cloud layer doesn't seem to be attached to the second planet at all. It seems to be suspended over 'planet 01'.
This is wrong, for the way the scene is set up. I don't know how you managed to get that cloud layer to appear as if it's around the default planet, Kadri! :D
Title: Re: Same Node settings , different render problem
Post by: dandelO on August 31, 2010, 07:49:35 PM
Nope, the only 'abnormal' thing I can see is that the clouds are plugged into the atmosphere node, not the other way around.
The atmosphere would 'normally' be plugged into the cloud node, in a regular setup.
Title: Re: Same Node settings , different render problem
Post by: Kadri on August 31, 2010, 07:52:37 PM
Henry i didn't quite understand you , but as DandelO said i move here only the new Planet.

But as i was trying to say , i did try to copy and paste the default Planet in the past and it was problematic.
Because of this i don't use this method anymore . Maybe you are referencing to this part , Henry ?

I saw your post now DandelO ! Yes this was one of my thoughts too . Thus i am more on the -how should i say- inconsistency part of this.
There is a problem ! But where . Before i saved this TGD or later ?
It looks like a bug although , but i am curious in which point it sleeps in !

But then it could be one of the weird things that happen as i scramble the nodes  :)
If i have time i will look to this a little more.
Title: Re: Same Node settings , different render problem
Post by: Henry Blewer on August 31, 2010, 07:55:20 PM
The atmosphere of each planet has its own 'pointer' to the atmosphere for that planet. I do not understand then who the atmosphere came to be separate from its planet. I will play with this after I get off work tomorrow.
Title: Re: Same Node settings , different render problem
Post by: Henry Blewer on August 31, 2010, 07:58:02 PM
Yes somehow the atmosphere seems to have moved its location away from its planet. If I understand correctly. I have a couple days coming to see what is happening after work tonight/morning (I work from 12 am to 8 am).
Title: Re: Same Node settings , different render problem
Post by: Kadri on August 31, 2010, 08:05:39 PM
Quote from: njeneb on August 31, 2010, 07:58:02 PM
Yes somehow the atmosphere seems to have moved its location away from its planet.
If I understand correctly. I have a couple days coming to see what is happening after work tonight/morning (I work from 12 am to 8 am).

I had similar problems with a cloned Default Planet in the past as i said.
Thus i wonder Henry if something alike is happening here?
But the inconsistency is at least the same concern to me now :)
Title: Re: Same Node settings , different render problem
Post by: Henry Blewer on August 31, 2010, 08:13:22 PM
The cloned planet would have the same center coordinates as the original planet. Moving the cloned planet would not alter the center of it. It would just offset the 'sphere' of the new planet. All shaders and atmosphere calculations would be from the original  location.
Title: Re: Same Node settings , different render problem
Post by: Kadri on August 31, 2010, 08:37:26 PM

Yes , it looks so, Henry.
Title: Re: Same Node settings , different render problem
Post by: dandelO on August 31, 2010, 09:07:22 PM
No, that's not right. When a planet is moved, any attached atmosphere node values move with it.

The height controls in an atmo' node are taken from the planet to which it is attached, likewise any attached cloud layer's altitude values. They come from the centre of the assigned parent planet.
This is how you can move around a ball of atmosphere/cloud via its parent-planet's coord's/bounding box, even if the planet has no visible surface.
Atmospheres and clouds must be linked to a planet to have any impact on a scene, at all. The coords of that planet are where these nodes take readings from, not the world XYZ coords. Without a parent-planet, an atmosphere/cloud layer will not appear in a scene.
Title: Re: Same Node settings , different render problem
Post by: dandelO on August 31, 2010, 09:26:41 PM
This is a cloned default planet. The pink colour is its cloud layer. It moves wherever the planet goes. I just enabled its bounding box and dragged it into view.

[attachimg=#]

The atmosphere node does the same thing, it's measured from whatever centre the assigned planet has, regardless of its original starting point.

Kadri's original post seems to have the secondary planet's cloud layer hanging in the main atmo1, it isn't assigned there, though.
It should be around the planet02, like in images 2 and 3 of the same post where it is rendering correctly.
Moving a cloned planet would not make this happen.
Title: Re: Same Node settings , different render problem
Post by: Kadri on August 31, 2010, 09:32:59 PM
DandelO , after your post i did try a basic new project. I Added a new Planet object.
Placed it manually with the mouse far away. Then i copied the Atmosphere node in this new Planet and did paste the Atmosphere outside the new Planet.
Then i deleted the new Planet.

Now there is a red Atmosphere (to make it distinct ) without its own Planet on the sky!

I made new default clouds but they showed only where the default planet is.
I think if you put these clouds at first in the new Planet node(internally) they could be where the red atmosphere is too(have to try this) !

Maybe this is the reason of the problem we have ?
Title: Re: Same Node settings , different render problem
Post by: dandelO on August 31, 2010, 09:34:16 PM
Now, I've taken the cloud layer out from planet02 and plugged it into planet01. The rendered result is the same as the first image Kadri posted.
His untouched .tgd believes that this cloud layer is attached to the main planet, when it clearly isn't.
Title: Re: Same Node settings , different render problem
Post by: Kadri on August 31, 2010, 09:36:26 PM
Quote from: dandelO on August 31, 2010, 09:34:16 PM
Now, I've taken the cloud layer out from planet02 and plugged it into planet01. The rendered result is the same as the first image Kadri posted.
His untouched .tgd believes that this cloud layer is attached to the main planet, when it clearly isn't.

We are posting nearly the same time . This looks like you are on the right way DandelO  :)
Title: Re: Same Node settings , different render problem
Post by: dandelO on August 31, 2010, 09:38:28 PM
Are you creating your cloud layer with a context click inside the node network of the new planet, Kadri, or, are you adding it with the 'add cloud layer' button?
Title: Re: Same Node settings , different render problem
Post by: Kadri on August 31, 2010, 09:40:31 PM
Quote from: dandelO on August 31, 2010, 09:38:28 PM
Are you creating your cloud layer with a context click inside the node network of the new planet, Kadri, or, are you adding it with the 'add cloud layer' button?

With a mouse context click inside the node network , so far i remember, DandelO !
Title: Re: Same Node settings , different render problem
Post by: Henry Blewer on August 31, 2010, 09:46:02 PM
I use the atmosphere tab to add cloud layers. Then tweak them in the node network.
Title: Re: Same Node settings , different render problem
Post by: Kadri on August 31, 2010, 09:48:14 PM
Clouds can be made too without the first planet!
2 Atmosphere and clouds , but only one Planet.

Anyway! Your logic sounds right for me DandelO about the problem.

Title: Re: Same Node settings , different render problem
Post by: Kadri on August 31, 2010, 09:49:24 PM
Quote from: njeneb on August 31, 2010, 09:46:02 PM
I use the atmosphere tab to add cloud layers. Then tweak them in the node network.

Normally me too! But when i am in an internal node part i prefer the mouse. Don't know why  :)
Title: Re: Same Node settings , different render problem
Post by: dandelO on August 31, 2010, 09:52:59 PM
Ha! I've no idea!

I've opened up both the original .tgd and an edited one that is working correctly with notepad and there seems to be no difference between the two. Beats me! :-\

Bedtime! :D
Title: Re: Same Node settings , different render problem
Post by: Kadri on August 31, 2010, 09:53:51 PM
Quote from: dandelO on August 31, 2010, 09:52:59 PM
Ha! I've no idea!

I've opened up both the original .tgd and an edited one that is working correctly with notepad and there seems to be no difference between the two. Beats me! :-\

Bedtime! :D

Me too! Goodnight   :)
Title: Re: Same Node settings , different render problem
Post by: dandelO on August 31, 2010, 10:00:14 PM
Wait... :o

I missed a point you were making a couple of posts ago. Are you saying in this post (http://forums.planetside.co.uk/index.php?topic=10667.msg109770#msg109770) that there is NO second planet at all when you rendered this red ball of atmosphere, Kadri?

Now I'm really confused, I need sleep!

EDIT: I can't replicate that phenomenon. ^^

Night night and, good luck! :D
Title: Re: Same Node settings , different render problem
Post by: Kadri on August 31, 2010, 10:03:05 PM
Quote from: dandelO on August 31, 2010, 10:00:14 PM
Wait... :o

I missed a point you were making a couple of posts ago. Are you saying in this post (http://forums.planetside.co.uk/index.php?topic=10667.msg109770#msg109770) that there is NO second planet at all when you rendered this red ball of atmosphere, Kadri?

Now I'm really confused, I need sleep!

Yes! After i moved the Planet in position i copied and pasted the Atmosphere outside of the Planet internal Node part and deleted it.
Title: Re: Same Node settings , different render problem
Post by: dandelO on August 31, 2010, 10:03:49 PM
See above edit. I don't know how you did that. I can't.
Title: Re: Same Node settings , different render problem
Post by: Kadri on August 31, 2010, 10:07:54 PM

After you copied and pasted the Atmosphere and Cloud of the new Planet , when you delete it , you have to put the pasted nodes in the Default Planet node Atmosphere input , DandelO!
Other wise it doesn't show.
Title: Re: Same Node settings , different render problem
Post by: Kadri on August 31, 2010, 10:23:23 PM
I looked at the TGD with Notepad. We can not see it in TG2 directly but the Atmosphere and Cloud nodes have their own center and radius values !
They take these from the Planet they belong it seems ! When we delete the planet these values don't change when we attach them on an other Planet.

I don't know how much related these things are with the problem of course  :)

Edit: Couldn't sleep! I did copy and paste the Atmosphere and Cloud parts of the TGD in Notepad and changed the names and position a little.
       I had to make the inputs by hand(they were messed up) in TG2 . But i had 3 Atmospheres and Clouds with only one Planet .
       We could make so much we want it seems.
       I can not see for now a way to use this , this doesn't look like to have a practical use , but who knows  :)
Title: Re: Same Node settings , different render problem
Post by: Kadri on September 01, 2010, 07:45:27 AM
Open a new project.
Change the camera to look at the sky.
Add a new Planet Object.
Go into the internal node part of this new Planet.
Disable the Power fractal shader in there (to make things easier to see).
Right mouse click and add a Cloud Layer .
Put this in the Atmosphere node (not in the Atmosphere Shader).
Now make a quick render.

Ooops! The Default Planet doesn't have Clouds attached but the clouds are over the Default Planet somehow!
(strange _01_Planet.tgd and strange_Planet_01.png)

Change the order of the nodes. Put the Atmosphere node on top and its output in the Cloud Layer node.
Then the output of the Clouds Layer node in the Atmosphere Shader input.
You can test them now with disabling them one by one. There are no problems now. The Atmosphere and clouds are over the New Planet as they should be.

Now comes the Last important part. Disable only the Atmosphere node.
When you render now you will obviously see only the Cloud layer of the New Planet.
Move the New Planet with this disabled Atmosphere  in any direction  and make a new render.
The Cloud did move with the New Planet without problem.They are in the new position.

Now enable the Atmosphere node and make a quick render the last time.
(strange _02_Planet.tgd and strange_Planet_02.png)

Voila ! The Atmosphere and the Cloud Layer are not in the same place. The Atmosphere node didn't move with the New Planet!

I think here could be the problem and if this is a problem there could be 2 of them at ones it seems !

Edit: If you put the enabled Atmosphere ones more between the Cloud Layer and Atmosphere Shader it works ones more as it should be .
       It seems that the Atmosphere node is updated in this way. (strange _03_Planet.tgd and strange_Planet_03.png )
       But we did put this Atmosphere the first time in the same node order and there were the cloud problem as i said above , but now not!
       It would be good if Planetside looked here , it is really confusing  :)

Title: Re: Same Node settings , different render problem
Post by: dandelO on September 01, 2010, 10:23:14 AM
Quote from: dandelO on August 31, 2010, 07:49:35 PM
Nope, the only 'abnormal' thing I can see is that the clouds are plugged into the atmosphere node, not the other way around.
The atmosphere would 'normally' be plugged into the cloud node, in a regular setup.

So, this is the reason for the way your original .tgd is displaying the second planet's clouds on planet 1, Kadri?
I still don't understand why this is happening but it seems that this is the way to force into existence Henry's explanation of offsetting only the planet sphere and keeping the attached atmo's at their default creation points(in your case, planet 01, because it was a clone of the default planet that created planet 02, I think).
The thing is, re-enabling or rearranging the said node connections seems to make it work 'correctly', the way it should.
A weird one, to be sure!

Good and thorough testing, Kadri! :) Still seems like a bug to me, though, one we should make use of and exploit! ;)
I'd also like some official clarification on the 'why' of it, though.
Title: Re: Same Node settings , different render problem
Post by: dandelO on September 01, 2010, 10:29:18 AM
QuoteThey take these from the Planet they belong it seems ! When we delete the planet these values don't change when we attach them on an other Planet.

I don't know how much related these things are with the problem of course

It relates exactly to your original problem. I think there should be some hidden function that resets those values as soon as the node is plugged into another planet. It isn't as if you can move the isolated atmosphere around with a handle or bounding box once the parent planet is deleted.
Title: Re: Same Node settings , different render problem
Post by: Henry Blewer on September 01, 2010, 10:37:16 AM
I found that grouping the nodes separately into Planet1 and Planet2 makes it easier to work with the node networks.
The way I understand how planet shading works is based on the planet coordinates. 0, -6.378e+006, 0 is the center point and 6.378e+006 is the default radius. The Base Colors and Default Atmosphere use this coordinate for everything. When you create a new planet, the new center location of the new planet becomes the origin for the new Base Colors and Atmosphere.

When the default planet is cloned, it inherits the default center coordinate, no matter where the cloned planet is placed.
Title: Re: Same Node settings , different render problem
Post by: dandelO on September 01, 2010, 11:01:33 AM
As long as the secondary atmosphere/cloud *doesn't* plug directly into the new planet, it will stay with the original coord's it had before the second planet was deleted.
Plugging the secondary atmosphere into the default one keeps it where it was, if you plug the default atmosphere into the new one and then the new one into the default planet it will then reset the atmosphere values to match the following planet. You must keep something between the new atmosphere/cloud node and the default planet, to keep it in its previous position.
Putting it directly into another planet, with nothing between the two, will reset the second atmo/cloud coord's to the expected position.

I'm glad we got that sorted out! :D
Title: Re: Same Node settings , different render problem
Post by: Kadri on September 01, 2010, 02:13:14 PM
Yeah guys at least we know there is a problem and how to handle it  somehow :)
But it is still problematic of course.

DandelO now i remember why i use the mouse in the internal part of this New Planet node.
If you try to put a Cloud Layer from the menu they aren't created where they should be.
They are directly putted on the Default Planet Node. This is wrong too.

look at the picture .Can you see the differences?  :)
For new users it would be easier to show it.

The first and the last Node setup are the same. But the Clouds are in different places.
Ones on the Default Planet then on The New Planet .
If you put the Cloud node at first like in the first picture at top you have the problem.
When you change the Node input order (Cloud layer + Atmosphere ) and then put it exactly as in the first place (Atmosphere + Cloud Layer) it is where it should be.
It gets updated in some way as i wrote above .

I wonder if this has something to do with the problem that the internal node is created outside at first when we use the menu for the creation of the Cloud Node of the New Planet ?

Title: Re: Same Node settings , different render problem
Post by: dandelO on September 01, 2010, 05:24:30 PM
I normally always create secondary planet cloud layers or atmos'(in fact, every node, more or less) by right clicking in the network area.
Exceptions for me are, for example, creating a fractal terrain or, population on planet 1. With these, I seem to use the 'add etc.' buttons, it's easier to make a regular population this way because it will auto-link it to your planet and, with fractal terrains there is less editing to 'add terrain' than to right-click>>create shader>>displacement shader>>power fractal(you end up with a 1,1000,0.1m fractal this way, not a terrain scaled one.
Every other node I use is created via network context-clicks. I work almost exclusively in the node network. You can choose exactly where each node goes that way. I thought maybe you were using the node list buttons in each tab up-top and that that might be causing the problem.

Regardless of this, and the actual solution to your problem, I still never use the heading/elevation/distance controls in a planet node, it doesn't work the way I'd expect. If you'll notice, those parameters don't change when you drag a planet around with its translate controls but, the translate controls *do* change when you use the heading/elevation/distance parameters. Something doesn't mesh right with that, in my brain, at least. :D

I can't see much use for exploiting the 'stuck in space' atmosphere phenomenon when there's no connected planet node, you can't move it around or, do much else with it. You can always still disable the surface of a planet and then move it around that way, though. I think that should be tidied up so it doesn't happen but, it's no big deal to me really, I'd never noticed that this even happens before your intriguing problem last night. :D

Just make sure that you reset this uneditable value by plugging the desired node directly into the desired planet first next time, Kadri! With nothing between them! ;)
Title: Re: Same Node settings , different render problem
Post by: Kadri on September 01, 2010, 05:58:43 PM

This is all because of , Hannes. He mentioned a Big Red Sun in my last image LOL ;D