VRayGLSLTex for Maya?

Hello,

I’m looking to write a custom shader for V-Ray for Maya. I’ve found the VRayGLSLMtl in Maya which looks really good, but can’t see the VRayGLSLTex - is it available in Maya?

If not, what’s the next best way of writing a custom shader (before OSL is available) ?

Thanks!

Lindsey

What version of Maya and V-Ray are you using?
The VRayGLSLTex should be available in the 2.45 night builds, but I don’t think it is available in 2.40 unfortunately.

Ok thanks - I’m using 2.25 at the moment so perhaps I’ll see if I can get the latest nightly and see if I can use it from there.

Thanks very much!

Lindsey

Thanks very much for the help - I now have the VRayGLSLMtl and VRayGLSLTex available which is great.

So I have a few questions about using GLSL shaders with vray for maya:
- As GLSL is for OpenGL graphics drivers are there any hardware requirements when using these shaders? Or is it a software implementation of the language? Are there any limitations related to using the GLSL shaders?
- I have used the examples in the online help to test materials using VRayGLSLMtl, but haven’t managed to get any texture displacements working in GLSL, is there a simple example for that? Presumably I need to add the code in the VRayGLSLTex shader, but I’ve tried to use a simple GLSL displacement shader and it won’t compile… any advice?

Thanks very much - any help is much appreciated!

Lindsey

It is purely software implementation and doesn’t have any hardware requirements.

I’m not sure I understand this question.
Can you describe in more detail what exactly do you want to achieve?

As far as I know you can use VRayGLSLTex as any other texture in V-ray, so it should work if you plug it in the displacement nodes.
I’m not sure that it is possible to implement your own version of displacement in GLSL, because in VRayGLSLMtl and VRayGLSLTex
you can write only fragment shader type of code. Vertex, geometry and tessellation shaders are not possible.

Hope it helps.

You should be able to use a GLSL texture as a displacement texture; I haven’t tried it though, will do that.

Best regards,
Vlado

Thanks very much - that’s really helpful.

I am testing the VRayGLSLTex to try using it for displacement. I’m connecting the outAlpha to the displacement shader and I’m finding it just balloons the object (whatever value I output from gl_FragColor in my code). This still happens even when I put the displacement shader’s scale to 0.0. Any idea where I’m going wrong?

Thank you!

Lindsey


Hm, it seems that there is some problem in the translator and it won’t work.
I’m looking at it and I’ll see if I can fix it.

This issue should be fixed in the next night build coming tomorrow.
Please test and report if there are any more problems with it.

Sorry for the inconvenience.

No worries, thank you for fixing it - I’ll get the new nightly and then give it a try.

Thanks very much for the help,

Lindsey