Build Vector Node

Started by Sengin, August 24, 2007, 12:47:57 PM

Previous topic - Next topic

Sengin

One of the convert function nodes is called the Build Vector node.  It has 4 inputs (input, x value, y value, and z value).  I assume that you can basically create a vector with it and then tell the terrain that you want to use that coordinate.  So for instance, say you want to raise the entire terrain by 10 meters.  You could use a "Get position" node, use an x, y, and z "to scalar"s from the Get Position, use a constant scalar of 10 and add it with the y, then feed them all to the build vector node (using the respective inputs).  What I assume happens is that all x and z values stay the same, but the new y-value is 10 greater than it was (I know this is not the best way to do this, it's just an example).  Is there some way to use that new coordinate (the (x, y+10, z) vector) to actually sculpt the terrain like that?  I've tried using a few various shaders (i.e. the distribution shader feeding into the compute terrain) but the only result I've gotten is a 2D cone (by that I mean that is that you can see the inside of the cone, but not the outside).

Thanks.

Matt

#1
The Build vector node allows you to fully define the x, y, z components of a vector by inputting scalars into the corresponding inputs. You can also use it to modify just one or two components of an existing vector by passing an existing vector into the main Input. Then if you leave any of the x, y or z inputs empty the empty value will be taken from the main Input.

I would need to know more about what you are trying to achieve before I can answer your second question.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Sengin

Ok, thanks for the reply.  Basically, what I'm doing is computing 2 functions based on the x-value of a get position (get position, x to scalar, then computing the two functions based on that x value).  After the two fuctions have been computed, I use two conditional scalars to find out if the current altitude (get altitude) is between the 2 computed values (greater than one of the functions and smaller than the other).  I take the output of the conditional scalars (which would be the altitude or y-value of the terrain from the get altitude) and feed that into the y-value input of the build vector node.  I want to use those coordinates (if the y-value is in between the two functions) to be my terrain, so that basically, what is rendered is the cross section of two functions (but some of the terrain will be overhanging).  Do I need a shader or something else between the build vector and compute terrain?

Matt

#3
The function networks in TG can be used to displace an existing surface, but they cannot be used to volumetrically define the intersection of two or more surfaces to create an overhang. Terragen is only able to look at each point on the undisplaced surface and move that to a new position. It cannot create more than one point for each original point on the surface (except to create more points when a surface becomes stretched by the displacement).

To create an overhang you need to use horizontal displacement (x and z displacement) to displace a surface that has already been displaced upwards (y displacement).

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Sengin

Dang, there goes my idea on creating wave crests by the cross section of two ellipses.... :(  I already had an extensive node network going on too....

old_blaggard

I tried that out myself before, and I gave up too.  I'm afraid that you'll have to use other methods.
http://www.terragen.org - A great Terragen resource with models, contests, galleries, and forums.

rcallicotte

So this is Disney World.  Can we live here?

chefc

Quote from: Sengin on August 28, 2007, 07:39:37 PM
Dang, there goes my idea on creating wave crests by the cross section of two ellipses.... :(  I already had an extensive node network going on too....
Unreal structure Sengin so much effort  :(
Chef C  ;)

Serving the masses  8)

Tangled-Universe

Wow Sengin, that looks incredible complicated, to me at least  ;D LOL
Nice to see your reference formula's at the top right. It gives me more insight on the workflow with function-nodes, so thanks  ;)

Martin

Sengin

#9
You're welcome, that's why I put them there.  I was hoping to actually be able to create the wave crests, so I organized everything and kept all the variables (even the add 0's) so that others could change the values to suit their projects.  But alas...Build Vector did not work as I thought it would...

Oh, for those wondering, the conditional scalar 02 and 03 are for checking whether or not the value is greater than zero (because I only wanted a certain part of the functions).

Also for those wondering, here's a graph representing what I was hoping to make (the gray part is what I wanted rendered, the cross-section of the two curves, the red line is the top function, the green is the second function (when looking at the reference formulas)).