Jump to content
EntropyNZ

Multiply VOP input order

Recommended Posts

Hello,

I think I figured it out whilst making the image!
But I figure I'd ask anyway.

Does the input order of a multiply node determin its output?

In other words, if a float is the first input a float is the output.
 

inputOrder.jpg

Share this post


Link to post
Share on other sites

Yup, the input data type always determines the output type. The input also sets the allowed data type of the other inputs. As you can see in your image, inserting a integer in the first input reduces the allowed input types to integer(wrong types are indicated by a dotted line). Using a float allows float and integer. Inserting a vector allows vector, float and integer.

 

Dennis

Edited by DennisSchmidt
  • Like 1

Share this post


Link to post
Share on other sites
Guest tar

The types are auto-converted, from floats become integers, integers become vectors etc. You can add a Bind Export to see the output values in the Geometry Spreadsheet - plug it in in pre-multiply and post-mulitple to see the effects.

Share this post


Link to post
Share on other sites

Good way of visualizing and understanding it better. So the dotted line doesn't tell you its wrong, just that it is doing a conversion(?).

Share this post


Link to post
Share on other sites
Guest tar

Yep - it's a conversion.  The dotted line means you are losing info. i.e. float to int has a dotted line, whilst int to float doesn't You can MMB and also create the nodes that the conversation. see screengrab

An incorrect type produces an red error - i.e. string to number.

VectorToFloat.png

Share this post


Link to post
Share on other sites

Ah nice! Now the dotted line makes sense. Losing info but doing a conversion. And nice tip with the creation of the conversion node.
Thanks!

Share this post


Link to post
Share on other sites

be careful with the order when multiplying vector with float. vector multiplied by float is still a vector. the other way around is a different math-calculation

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×