Closed doctorpangloss closed 11 years ago
As you guessed, maya ptex plugin is intended just for the siggraph demo, so it's not well formed for practical use. At least you have to specify not only ptexes but also environment map and diffuse map to get correct lighting (it can be anything, panoramic hdr images are expected on the included shader).
Currently we are focusing on the development of core features and we don't have any specific plan to support/extend example plug-ins, but of course, your contribution is welcome!
Thanks for the prompt response, I think I will polish the sample then:
The diffuse, as you can see, is some kind of gibberish: sometimes it is gibberish colors, other times it is text. On one occasion it even said the words "persp". So my guess is that there is something wrong with the shader.glsl file used by default.
My guess is that the shader is pulling texture indices from internal maya textures (like icons or keywords) : sounds like texture IDs are not initialized or reset properly. This is the exact code that we used for the demo, so the GLSL shader definitely does work, at least within the constraints of our specific scene / environment.
As Takahito said however : this code was written for the Siggraph conference demo, so it is provided for "educational value" only...
I've made some progress fixing and compiling the ptex + displacement plugin in Maya 2013 x64 on Windows, but I'm running into a pretty rough issue.
The Ptex shader doesn't handle channels correctly. Here's what I see by default when I turn off "Enable Color," "Enable Displacement" and "Enable Occlusion."
http://www.benberman.com/wp-content/uploads/2012/08/opensubdiv_git_comment_issues.png
Checking any of them causes no mesh to render (only Maya wireframe). The diffuse, as you can see, is some kind of gibberish: sometimes it is gibberish colors, other times it is text. On one occasion it even said the words "persp". So my guess is that there is something wrong with the shader.glsl file used by default.
I've tried populating the ptex files with samples off the Internet and exports from Mudbox, and got roughly the same result.
Originally, subdivision didn't work on the ptex shader until I fixed some code around the Kernel registration and handling. I added an attribute to choose the kernel, initialized the different kernels, etc. I saw that it was a bit rushed for the Autodesk demo so I understand. I'm not familiar with github yet but I will submit a patch soon.
I can also definitely say that the GLSL shader is broken.
P.S., an iPad version using the CPU version is in the works...