EntropyNZ Posted May 28, 2016 Share Posted May 28, 2016 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. Quote Link to comment Share on other sites More sharing options...
DennisSchmidt Posted May 28, 2016 Share Posted May 28, 2016 (edited) 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 May 28, 2016 by DennisSchmidt 1 Quote Link to comment Share on other sites More sharing options...
Guest tar Posted May 28, 2016 Share Posted May 28, 2016 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. Quote Link to comment Share on other sites More sharing options...
DennisSchmidt Posted May 28, 2016 Share Posted May 28, 2016 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(?). Quote Link to comment Share on other sites More sharing options...
Guest tar Posted May 28, 2016 Share Posted May 28, 2016 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. Quote Link to comment Share on other sites More sharing options...
DennisSchmidt Posted May 28, 2016 Share Posted May 28, 2016 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! Quote Link to comment Share on other sites More sharing options...
EntropyNZ Posted May 28, 2016 Author Share Posted May 28, 2016 Excellent information, thanks guys! Quote Link to comment Share on other sites More sharing options...
borisb2 Posted May 30, 2016 Share Posted May 30, 2016 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.