Instructions for writing Custom Viewport Shaders

   1747   1   1
User Avatar
Member
113 posts
Joined: July 2005
Offline
I'll be sending this message to the Houdini Teacher's slack in the morning but I thought I would also address the entire user's community.

I'm teaching a university level class in Real-time Visual Effects and I'd like to create a color calculator for my students using Houdini. I could get by, initially, by just using Python and performing operations on simple colored swatches in the Houdini viewport. However, since this is a VFX course, I would like to perform operations,(+, *, exp, burn, dodge, etc.), on swatches containing texture maps. I'm note quite sure how to pull this off using Python, or VEX for that matter. I think I might be able to do this writing a custom viewport shader in GLSL.

I think I should be able to pull this off since I teach a basic version of HLSL which is pretty close to GLSL. However I'm having trouble understanding how to get two different sources inputted into the shader. I'm currently following documentation from http://127.0.0.1:48626/shade/glsl. [127.0.0.1] However, this only offers the basic description of the shader's structure and function calls.

Can someone suggest some documentation or some other resource I can explore this topic a bit more?
Or if anyone has any ideas how I can accomplish this using Python, VEX, or some other technique I would love to hear.

Cheers
User Avatar
Member
113 posts
Joined: July 2005
Offline
I think I may have discovered an alternative way of getting this done. I can create swatches from grids that have the same number of points as desired pixels. I can then use simple Python to manipulate the point colors.

However, If there is anyone that has any alternative solutions I would love to hear them. I really want to dive into writing custom GLSL Shaders in Houdini but not sure I have the time to figure them out from scratch.

Cheers!
  • Quick Links