lisux Posted August 7, 2006 Share Posted August 7, 2006 Hi all. All the time I crate a custom shader, using the VEX Builder or hard coding the VEX lines, it is created a default OpenGL preview for my shaders. This is the default behaviour. What a bout if, along with my shader I want to create a custom preview in OpenGL for this new shader, with other parameters and lighting models, or even better if I want to use an OpenGL 2 shader to previsualize my shader. This is possible? Thanks. Quote Link to comment Share on other sites More sharing options...
hoknamahn Posted August 9, 2006 Share Posted August 9, 2006 Hi all.All the time I crate a custom shader, using the VEX Builder or hard coding the VEX lines, it is created a default OpenGL preview for my shaders. This is the default behaviour. What a bout if, along with my shader I want to create a custom preview in OpenGL for this new shader, with other parameters and lighting models, or even better if I want to use an OpenGL 2 shader to previsualize my shader. This is possible? Thanks. Try to set HOUDINI_OGL_ENABLE_SHADERS variable to 1. This will enable an OpenGL 2 hardware shaders in SHOP. I believe you can write your own OpenGL 2 shader and use it as preview for VEX. But I don't think that it's an easy way (and stable too) because you need to know an OpenGL SL and C. Quote Link to comment Share on other sites More sharing options...
lisux Posted August 9, 2006 Author Share Posted August 9, 2006 Try to set HOUDINI_OGL_ENABLE_SHADERS variable to 1. This will enable an OpenGL 2 hardware shaders in SHOP. I believe you can write your own OpenGL 2 shader and use it as preview for VEX. But I don't think that it's an easy way (and stable too) because you need to know an OpenGL SL and C. I know RSL ans C so I think that to write a simple OpenGL 2 shader shouldn't be so difficult. What compiler I have to use to generate opengl shaders in linux to use in Nvidia. Where I have to put this shaders in order Houdini can find it, and the most important, how link the opengl shader to the SHOP? Thanks Quote Link to comment Share on other sites More sharing options...
hoknamahn Posted August 9, 2006 Share Posted August 9, 2006 I know RSL ans C so I think that to write a simple OpenGL 2 shader shouldn't be so difficult.What compiler I have to use to generate opengl shaders in linux to use in Nvidia. Where I have to put this shaders in order Houdini can find it, and the most important, how link the opengl shader to the SHOP? Thanks Try to ask edward I know only that ogl2 shaders are placed in $HFS/houdini/ogl2. But how to generate a dialog scripts... This is a question. I'm not sure about compiler but I think that an OpenGL2 driver doing the compilation. Maybe I'm wrong. Anyway try to dig an official ARB web site - http://www.opengl.org You can find an OpenGL SL specifications there. Quote Link to comment Share on other sites More sharing options...
edward Posted August 9, 2006 Share Posted August 9, 2006 I think you would need to add dialog scripts in the old fashion way before as it was prior to the introduction of OTLs with the SHOPsurface files, etc. I don't even remember how to do that anymore. As a hack, just make some copies of the existing OGL2 OTL definitions and edit them via Edit Contents... in the Op Type Manager. You will need to then make your OGL2 shader (with the correct extension) available in your ~/houdiniX.X/ogl2 directory. I have never tried this so your mileage may vary. Just try out the default OGL2 shaders (in normal shaded mode, NOT vex mode) in SHOPs with OGL2 Gingham or something like that. Note that for most of the examples, you need correct uv's. All this was just some prototype code. You can't really do anything useful with it anyhow since there's no way to pass the which lights are enabled if you have an OGL2 vertex shader. Quote Link to comment Share on other sites More sharing options...
peliosis Posted August 10, 2006 Share Posted August 10, 2006 Max and maya have a preview of procedural shaders in viewport, I don't know how it works or how hard it is to implement but houdini would never suffer from having such preview:) Quote Link to comment Share on other sites More sharing options...
hoknamahn Posted August 10, 2006 Share Posted August 10, 2006 Maya and Max have an OpenGL versions of "normal" shaders for preview. So I'm sure if want to write your own shader with Max API you should need to make an OpenGL equivalent. The same in Houdini. IMHO. Btw Edward, some ogl2 shaders in Houdini have problems. I'm not sure but something with loading of input parameters. Quote Link to comment Share on other sites More sharing options...
edward Posted August 11, 2006 Share Posted August 11, 2006 Which ones? To be frank, I'm not surprised as they haven't been touched in quite a while. And they're experimental anyhow. Quote Link to comment Share on other sites More sharing options...
hoknamahn Posted August 11, 2006 Share Posted August 11, 2006 Which ones? To be frank, I'm not surprised as they haven't been touched in quite a while. And they're experimental anyhow. Marble shader. I have tried to load it into 3DLabs GLSL demo but got the same result. WARNING[ogl2_marble]: Failed to bind variable 'MarbleColor' WARNING[ogl2_marble]: Failed to bind variable 'VeinColor' WARNING[ogl2_marble]: Failed to bind variable 'Offset' Quote Link to comment Share on other sites More sharing options...
edward Posted August 11, 2006 Share Posted August 11, 2006 <shrugs> i have no idea what's wrong with the shader. It seems ok. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.