View Full Version : Custom Texture Node (C++ API)

04 April 2006, 09:28 PM
Greetings! I'm fairly new to the Maya API and I'm attempting to create a custom texture node. I've been through the docs and read David Gould's book, but finding information about creating a custom texture node has proven to be elusive. To the user, I'd like it to work just like a File Texture hypershade node, but it will take connections in from other File Textures and combine them. Is there some way I can "extend" a 2D File Texture node?

I've tried using the "inheritAttributesFrom() method of MPxNode, but none of the strings I pass in to the function work. I'm not even sure what the correct string should be -- is it the name of an MObject subclass? Or "texture2d"? (which I tried, and didn't work)

Is there another way to create a node that acts just like a File Texture node with my extensions without having to reprogram all the functionality involved such as the filtering, color balance, UV coverage, wrap, etc.?

Any help is greatly appreciated. Thank you!

04 April 2006, 04:59 PM
There are many examples of API render nodes in the devkit examples directory . Some of these are 2D procedural textures , some are 3D , but you should take the time and check them out .

And of course , you should read "Writing a Shading Node" in the API docs .

If you are looking to make a 2D texture that reads in an image file , you will use the MImage class . All the other details are covered in the examples and API docs .

Good Luck .

CGTalk Moderation
04 April 2006, 04:59 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.