relbbox alternative function ?
4703 10 1- _Christopher_
- Member
- 760 posts
- Joined: April 2014
- Offline
- tamte
- Member
- 8514 posts
- Joined: July 2007
- Online
- _Christopher_
- Member
- 760 posts
- Joined: April 2014
- Offline
- tamte
- Member
- 8514 posts
- Joined: July 2007
- Online
so to get equivalent of :
you can do:
vector relbbox = relbbox(@P);
vector bbmin, bbmax; //initialize variables getbbox(0, bbmin, bbmax); //populate them with real bbox min and max values vector relbbox = fit(@P, bbmin, bbmax, 0, 1); // and fit @P from real bbox range to 0-1 range to get relbbox // note that 0, 1 are automatically cast to vector // so you don't have to write {0,0,0}, {1,1,1} here, but you still can
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- _Christopher_
- Member
- 760 posts
- Joined: April 2014
- Offline
- tamte
- Member
- 8514 posts
- Joined: July 2007
- Online
- _Christopher_
- Member
- 760 posts
- Joined: April 2014
- Offline
- tamte
- Member
- 8514 posts
- Joined: July 2007
- Online
not sure what you mean
relbbox() is a function that will return for each position sample it's relative normalized position within bounding box of the specified file geometry or input
it's evaluated only when you call it
if for whatever reason you don't want to use it, then to get the same result you can use getbbox() and fit() functions as I described
relbbox() is a function that will return for each position sample it's relative normalized position within bounding box of the specified file geometry or input
it's evaluated only when you call it
if for whatever reason you don't want to use it, then to get the same result you can use getbbox() and fit() functions as I described
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- _Christopher_
- Member
- 760 posts
- Joined: April 2014
- Offline
if for whatever reason you don't want to use it, then to get the same result you can use getbbox() and fit() functions as I described
What I meant was, the vop network I posted in my previous post, regardless if the relbbox is in the network or not as you suggest it's not required. If I were to keep it in the network, it would work the same as if I plugged P into (val) of the fit node ?
relbbox() is a function that will return for each position sample it's relative normalized position within bounding box of the specified file geometry or input
it's evaluated only when you call it
relbbox is a function that returns each point position sample which is relative to the most normalized position within the bounding box of the specified file or input ? I hope my explanation wasn't confusing ?
Edited by _Christopher_ - March 29, 2017 08:42:53
【T】【C】【S】
- Digipiction
- Member
- 166 posts
- Joined: March 2014
- Offline
Christopher_RNo, it would not work the same. Your current network does not output what you want unless the bounding box of your object goes exactly from 0,0,0 to 1,1,1. And in that case you would not need the fit or the other bbox node at all because the relbbox already outputs the correct value.
What I meant was, the vop network I posted in my previous post, regardless if the relbbox is in the network or not as you suggest it's not required. If I were to keep it in the network, it would work the same as if I plugged P into (val) of the fit node ?
The relbbox outputs a value between 0 and 1, depending on how close to the bounding box limit the point is. P outputs a world position, which is what you would need to feed into the Fit of your network.
Edited by Digipiction - March 29, 2017 11:12:33
- _Christopher_
- Member
- 760 posts
- Joined: April 2014
- Offline
and the equivalent is the network you have without relbbox1 node
just P connected directly to fit2 val
No, it would not work the same. Your current network does not output what you want unless the bounding box of your object goes exactly from 0,0,0 to 1,1,1. And in that case you would not need the fit or the other bbox node at all because the relbbox already outputs the correct value.
Since P outputs a world position, I can bypass the relbbox node and use fit. Although if I use relbbox node, I can bypass using bbox and fit nodes since, as you said Chris_TC the relbbox node already outputs the correct value between 0-1 ?
【T】【C】【S】
-
- Quick Links