Page MenuHome

Shader: Hexagon Texture Node
Needs ReviewPublic

Authored by Charlie Jolly (charlie) on Dec 13 2019, 6:34 PM.
Tags
None
Tokens
"Love" token, awarded by amonpaike."Love" token, awarded by BlackRainbow."Love" token, awarded by mfink."Love" token, awarded by MetinSeven."Love" token, awarded by RC12."Love" token, awarded by Alrob."Love" token, awarded by mantissa."Love" token, awarded by 1D_Inc."Love" token, awarded by duarteframos."Love" token, awarded by Yegor."Love" token, awarded by lopoIsaac."Love" token, awarded by astrand130."Love" token, awarded by jonathanl."Love" token, awarded by SecuoyaEx."Love" token, awarded by monio.

Details

Summary

This provides a new hexagon texture with fac, color, cell, coords and position outputs.

Based on 3D projected cube method from here: http://www-cs-students.stanford.edu/~amitp/Articles/GridToHex.html

Diff Detail

Repository
rB Blender
Branch
master
Build Status
Buildable 6033
Build 6033: arc lint + arc unit

Event Timeline

Looks awesome. I think hexagon grid or simply hex grid might be a more properly descriptive name for it though as its not just a single hexagon.

Fix weird GLSL precision issue. Adding 0.0 to the position fixes this. This was found whilst plugging position into white noise.

Tidy up and use vec3/point/float3 as mentioned by @Bartosz Moniewski (monio). Thanks.

Fix aspect ratio for XY coords.

Based on user testing and feedback from @Bartosz Moniewski (monio). Added color output and control over size and radius of the shape. Also changed name to "Hex Grid Texture".

Charlie Jolly (charlie) edited the summary of this revision. (Show Details)Dec 16 2019, 7:57 PM
Charlie Jolly (charlie) edited the summary of this revision. (Show Details)Dec 16 2019, 8:03 PM

Thanks to @Bartosz Moniewski (monio) feedback, radius now works more intuitively. Fixed menu name.