tiles texture with rounded corners


Here is 2 versions of an OSL texture that I wrote.

The first is a very simple tile texture (just a color mask) and the second is the same thing but with beveled and rounded corners.
osl-tiles-texture: first_version
osl-tiles-texture: rounded_corners_version

However, have you an idea how to improve the interface ? Instead of use an INT value to choose the corner type, It will be interesting to have a list that contain values like: None, Beveled, Rounded. Is it possible with OSL ?


I think we need to wait for pynodes to improve the interface, but I’m not certain how or if this will work.

@arketip: in principle this is possible in osl by adding metadata to shader parameters. theosl language spec even gives examples of how to indicate that a paramter is an enumeration. this metadata is explicitely intended to help rendering systems show sockets in an appropriate way but alas, Blender does not (yet ?) supports this.

Thanks for the explanations guys. I hope this functionnality will come with the next releases of Blender.

@Charlie: Nice tile texture. I like the hexagonal one.
That gives me some ideas.

@varkenvarken: Thanks for your blog. I mainly learn OSL by reading some of yours scripts (at blenderthings) ! :slight_smile: