Message 1 of 3
How to modify an existing DirectX shader to work with Maya 2013 Extension (Viewport + DirectX)?

Not applicable
10-24-2012
11:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I must be overlooking something. I've been reading Extension docs, searching this forum, googling, but I have failed to find answers to basic questions that anyone needs to know, in order to write custom DirectX shaders for Maya 2013 Extension, for use in Viewport mode using DirectX renderer.
Here are three related questions, three ways to think about what I seek to learn:
"How do I write a custom DirectX shader that is compatible with Maya 2013 Extension?"
"How do I adapt an existing DirectX shader so that it will work with Maya 2013 Extension?"
"What are the DirectX shader features that are/aren't compatible with Maya 2013 Extension?"
The Maya Help does a fine job of explaining:
1. The DirectX 11 Shader node.
2. The provided uber shader, and how to use it.
3. What MAYA features are not compatible with Viewport 2.0 + DirectX. ("DirectX 11 Limitations")
But that's all from the Maya point of view, assuming you are an artist using a compatible shader that is already written.
If there is information anywhere to help the programmer who is creating that shader, I have not found it. (There are the provided shaders as examples, but my questions are basic information I should have, before I expend time experimenting with them. And there are thousands of DirectX shaders in the world; need some basic guidance as to what to do with them, what to look for in them, what is likely to work / not work / need modifying.)
Any help appreciated,
-- Steve
EDIT: Specific questions:
4. If a DirectX 11 Shader needs to access textures, is there a specific HLSL syntax needed to inform Maya of that, so that Maya GUI knows to present user with option to specify texture file?
5. HLSL "technique", "technique10": I infer (by Maya's complaint when I tried to use a .fx file not supplied by Autodesk) that this "technique" syntax is necessary for a shader to be useful in Maya. Do I have to reverse engineer the uber-shader myself, or is there a description somewhere of what Maya needs in the technique profiles? (This is a new concept to me; will read about HLSL technique tomorrow. Maybe this is all obvious after I read that. Regardless, there must be -- or needs to be -- Autodesk provided documentation that at minimum tells the programmer that this is what they should be doing. Would have saved me hours of Google time today.)
Here are three related questions, three ways to think about what I seek to learn:
"How do I write a custom DirectX shader that is compatible with Maya 2013 Extension?"
"How do I adapt an existing DirectX shader so that it will work with Maya 2013 Extension?"
"What are the DirectX shader features that are/aren't compatible with Maya 2013 Extension?"
The Maya Help does a fine job of explaining:
1. The DirectX 11 Shader node.
2. The provided uber shader, and how to use it.
3. What MAYA features are not compatible with Viewport 2.0 + DirectX. ("DirectX 11 Limitations")
But that's all from the Maya point of view, assuming you are an artist using a compatible shader that is already written.
If there is information anywhere to help the programmer who is creating that shader, I have not found it. (There are the provided shaders as examples, but my questions are basic information I should have, before I expend time experimenting with them. And there are thousands of DirectX shaders in the world; need some basic guidance as to what to do with them, what to look for in them, what is likely to work / not work / need modifying.)
Any help appreciated,
-- Steve
EDIT: Specific questions:
4. If a DirectX 11 Shader needs to access textures, is there a specific HLSL syntax needed to inform Maya of that, so that Maya GUI knows to present user with option to specify texture file?
5. HLSL "technique", "technique10": I infer (by Maya's complaint when I tried to use a .fx file not supplied by Autodesk) that this "technique" syntax is necessary for a shader to be useful in Maya. Do I have to reverse engineer the uber-shader myself, or is there a description somewhere of what Maya needs in the technique profiles? (This is a new concept to me; will read about HLSL technique tomorrow. Maybe this is all obvious after I read that. Regardless, there must be -- or needs to be -- Autodesk provided documentation that at minimum tells the programmer that this is what they should be doing. Would have saved me hours of Google time today.)