Jump to content
monomind

GLSL Pipeline in Houdini

Recommended Posts

Would love to know about how GLSL pipeline works inhoudini. I was not successful creating anything related to GLSL shaders in houdini yet, some help is very much appreciated!

How to create or load a shader?

looking at houdini/glsl directory, there is plenty of stuff to test, but I'm not sure how to load them into houdini.

Share this post


Link to post
Share on other sites

Checked both of them, couldn't get the example shader to work anyhow. I think those documents are very vague..

How can I load and check any of the shaders located under houdini/glsl directory?

Share this post


Link to post
Share on other sites

Add a GLSL Shader parameter to the material (Edit Rendering Parameters, Material Option > OpenGL) and put the path to glsl .prog file into the field.

GLSL shaders are responsible for a lot more than just surface shading, so you need to be careful what GL geometry types you apply the shader to. Any GLSL shader with a geometry shader stage will require a specific GL input type (triangles, lines, points), and be much more restricted as to what they can be applied to (polys, curves, particles). Others have more implicit targets, like a hair shader requiring lines or particle sprites requiring points, but not outright failing if you don't pass it the right geometry.

  • Like 1

Share this post


Link to post
Share on other sites

Would it be too much to request a very simple example file?

Ir any place where I can download examples about this?

I've searched this forum, none of the examples I've found seem to work..

Share this post


Link to post
Share on other sites

Point rendering doesn't use materials currently. Sprites look at the diffuse texture, but that's about it. That's why you're not seeing any change in the display.

Share this post


Link to post
Share on other sites

instancing geo doens't give me screen space points, I'm desperately needing an efficient way to render screen space points in houdini..

Opengl seemed very fast but point rendering has (almost) no settings

Share this post


Link to post
Share on other sites

Not sure what you're trying to do, more details please. If what you need is simple enough, it could maybe be achieved by turning off the lights? (See picture, use the selected/orange icon under lock in top-right of viewport)

I've got a super simple GLSL shader working as well, can post an example later.

flat_point.thumb.png.198be4f513711678c256fc7ff84a0e4d.png

Edited by limeforce

Share this post


Link to post
Share on other sites

thanks for the response

copy to points is ultra slow when done with a lot of points (100 mil +) 

That's why I wanted to solve this directly using shaders.

An example would be good, indeed

Share this post


Link to post
Share on other sites

This should help you with the GLSL setup/boilerplate (point the material parm to the .prog file, vertex shader is basically a passtrough shader copied from somewhere in Houdini files). I've no answer for creating & rendering 100mil points on the GPU though, I haven't tried to create points in the vertex shader. Would be cool if Houdini had some intuitive ways of working with & displaying GPU data (something like a more wrangle-like OpenCL SOP with a direct hook/endpoint in the viewport so that the data doesn't have to come back to the CPU before being displayed).

I included a test file using instancing as well, that approach seems to start to break down around 1-10mil points here.

hou-glsl-instancing-example.zip

Edited by limeforce

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×