To assist in rapid prototyping I’ve created a material that automatically aligns UVs based on world position and applies color based on surface normal.
[=;56859]
Thanks! The assets are available for download, I added the material graph below:
I was wondering if there is a float to integer conversion (round up > 0.5 and round down < 0.5) to replace the if-nodes.
[/]
Dear ,
wow this is amazing!
I can make a custom node for your rounding request if you are interested, if you want to use my Custom BP Nodes
**
Edit: Round Function Already Exists**
Oh never mind, the Round function already exists:
It's right here, see pic!

I can make a custom node for your rounding request if you are interested, if you want to use my Custom BP Nodes
**
Edit: Round Function Already Exists**
Oh never mind, the Round function already exists:
It's right here, see pic!

[/]
Hey , we're talking about two different things here! :) The Round node that you linked is from Blueprint, the mockup material is pure material nodes w/o any involvement of Blueprint.
[=;57181]
Hey , we’re talking about two different things here! The Round node that you linked is from Blueprint, the mockup material is pure material nodes w/o any involvement of Blueprint.
[/]
[=;57351]
You can replace the IF statements in this material with the following nodes (Make it a material function if you want to reduce the nodes in the main material):
Since the values are between 0…1 these nodes just multiply the incoming values by 2 and then floors this value so for example if the incoming value is 0.25 then multiply this by 2 and you get 0.5, flooring this value makes 0. If the incoming value is 0.75, multiply this by 2 makes 1.5, flooring this makes 1.
[/]
This is exactly right. I was going to suggest this but saw that you beat me to it!
I’ve updated the material with the multiply/floor nodes, instruction count is lowered by 3. Since the material is not performance critical I’ll leave the online version as is for now.