Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
  • 1/3
You are here: Forum Home / Autodesk® Maya® / SDK / is it possible to write own texture2d-node to be used in Emitters TextureRate?
  RSS 2.0 ATOM  

is it possible to write own texture2d-node to be used in Emitters TextureRate?
Rate this thread
 
35785
 
Permlink of this thread   Subscribe to this thread
avatar
  • Total Posts: 1
  • Joined: 16 July 2009 06:28 PM

Hello everybody,
My intention is(was) to write a texture2d node to be used to control the emission of an emitter.
(i want to colorize certain areas or pixels based on some other calculations to control where particles are emitted from my mesh)
I compiled the examples (checkerShader etc.) and tried them, it didn’t work in the textureRate Plug of Emitters.

After quite some time of searching through the documentation, i found the statement, that Emitters check the plugged Node for validity to be used as a texture for TextureRate. The Documentation says:

“For these purposes, only a subset of Maya’s textures are supported, namely the default 2d textures (bulge, checker, cloth, file, fluid texture 2d, fractal, grid, mountain, movie, noise, ocean, ramp, water). No other nodes are supported.”

So i am that far, that you simply cannot write your own shader to be used in there?
Why is this limitation?
Is there really no way to get it working?

(the only workaround i can think of, would be changing a file-texture on disk to colorize the pixels i want to change and use a file-texture-node to control the TextureRate of my Emitter. But i think that would be quite time-consuming, to always write onto disk.)

Johannes



Replies: 1
/img/forum/dark/default_avatar.png

Johannes ,

The Stroika plugins do a good job of handling most of this and they are affordable . If you would like to write the plugin yourself , you ought to be able to write a more robust emitter that access shader information via MRenderUtil::sampleShadingNetwork .

In addition , you can prototype any ideas you have with per particle attributes parentU , parentV or rampUVcoord and the colorAtPoint command .

All of this will take time to fiddle through bugs and unexpected problems from all of the aforementioned methods .

Chris Haney

Author: chaneyX

Replied: 13 November 2009 06:08 AM  




   
  Settings Choose Theme color: