Planetside Software Forums

Support => Terragen Support => Topic started by: mogn on May 09, 2008, 03:49:53 AM

Title: TGD3 Odd!
Post by: mogn on May 09, 2008, 03:49:53 AM
I have created a two node clipfile Atan2(x,z), consisting of a "get position in geometry", connected to the input of an "add scalars".
The actual calculations are hidden in the "add scalars" by "DandelO's device" i.e assigning the internal network to input2.

I save the clipfile, exits tgd3, start tgd3 again and load the clipfile. Check that it works by double click on the Atan2(x,y) nodes.
It works.
Then I copy and deletes the nodes to the clipboad (ctrl x).
Create an "add scalars" go to the internal network and copies the nodes from the clipboard, and makes a double click an the Atan2(x,y) node.
This time a wrong result.  ???
Back to the outer level. Copy the nodes from clipboard and double click. This time the correct result!!

TGD2 has the same behavior!
Title: Re: TGD3 Odd!
Post by: Tangled-Universe on May 09, 2008, 05:49:03 AM
Looks like TGTPx has a certain maximum amount of sublevels for nodes I suppose?
Title: Re: TGD3 Odd!
Post by: Matt on May 09, 2008, 12:34:21 PM
Can you figure out at what part of the network it starts giving different results?
Title: Re: TGD3 Odd!
Post by: Matt on May 09, 2008, 12:38:02 PM
I don't even know how the node "Colour to Vector" is doing what it's doing in the working example. It has no inputs yet it seems to be outputing texture coordinates somehow.

EDIT: Ah, I see it's been connected to the Get Position node in the parent network. Somehow this link has become broken when nested further.

Matt
Title: Re: TGD3 Odd!
Post by: Matt on May 09, 2008, 12:51:53 PM
The problem is this:

<colour_to_vector
   name = "Colour to vector 01"
   gui_use_node_pos = "1"
   gui_node_pos = "-180 240 0"
   gui_group = ""
   enable = "1"
   input_node = "/Get position in geometry 01"
   gui_use_preview_patch_size = "0"
   gui_preview_patch_size = "1000 1000"
   >
</colour_to_vector>

In the clip file, the input for Colour to Vector 01 is set to "/Get position in geometry 01". The '/' means that it's pointing to the root level of the network, which was necessary because it wasn't in the same network as Colour to Vector 01. When this code is pasted into a further subnetwork, the Get position in geometry 01 node is no longer at the root level, but the other pasted node expects it to be.

Problems like this are likely to happen if you do unusual things with internal networks although we've tried to make it as flexible as possible. I think the only way to fix this at the moment is to reassign the broken input. In future I may be able to make assigment to relative levels work more fluently.

Matt
Title: Re: TGD3 Odd!
Post by: Kevin F on May 09, 2008, 02:26:31 PM
Quote from: Matt on May 09, 2008, 12:51:53 PM
The problem is this:

<colour_to_vector
   name = "Colour to vector 01"
   gui_use_node_pos = "1"
   gui_node_pos = "-180 240 0"
   gui_group = ""
   enable = "1"
   input_node = "/Get position in geometry 01"
   gui_use_preview_patch_size = "0"
   gui_preview_patch_size = "1000 1000"
   >
</colour_to_vector>

In the clip file, the input for Colour to Vector 01 is set to "/Get position in geometry 01". The '/' means that it's pointing to the root level of the network, which was necessary because it wasn't in the same network as Colour to Vector 01. When this code is pasted into a further subnetwork, the Get position in geometry 01 node is no longer at the root level, but the other pasted node expects it to be.

Problems like this are likely to happen if you do unusual things with internal networks although we've tried to make it as flexible as possible. I think the only way to fix this at the moment is to reassign the broken input. In future I may be able to make assigment to relative levels work more fluently.

Matt


proof that Matt is not a mere mortal!
Title: Re: TGD3 Odd!
Post by: mogn on May 10, 2008, 02:25:09 AM
Thanks Matt! To build the internal network, I use an "add scalar" with input2 connected to the internal network.
Inorder to compensate the typecast length. I import the getposition via a dumme vector "colour to vector", the length of which is subtracted in tha last node.
Ofcourse I also use the "Colour to vector" for the actual calculations.
There is a reason for doing it this way.
1) to minimize the number of visible nodes (two) in the clipfile.
2) To enable the user to change the "Get position in texture" to another (e.g with an offset) by connecting the the new "pos.." to the input of the old,
     and then deleting the old. It works like a dream.

By the way it would be possible network of this kind to "one liners" if you would allow internal access to the the nodes, not used as "final input" nodes.
You could make a line "assigned inputs" as accesible output nodes, of course before type casting.

"CTRL G" and the selecting of nodes works like a dream :D