Thank you for your responses, I have looked into those solutions before. The problems I have found are:
- If I use Vertex Colors I must calculate and load the colors for each frame. - and if I use a ramp texture I have to modify the u or v coordinates for each frame. All the previous solutions require an execution time of O(n) where n is the number of vertices. (The scene contains lot of vertices). Using a 1d texture I only have to change the texture. (The u or v coordinates do not change) Thank you, Omar. On 7 September 2010 19:24, Ofer Koren <[email protected]> wrote: > You should look into these: > - 'Ramp' texture (creates 1d or 2d color ramps in various ways) > - Vertex Colors: you can assign specific color values per vertex or per > face-vertex. This might work better that using a shading network, and you'd > easily be able to see those results directly in the viewport. > > - Ofer > www.mrbroken.com > > > > On Tue, Sep 7, 2010 at 10:18 AM, Omar Agudo <[email protected]> wrote: > >> The scenario is the following: >> >> >> - I have some meshes loaded into maya. >> - All vertex of these meshes have a "voltage" value, which I must >> render using a specific color (which is calculated from the voltage). >> - These voltage values change from one frame to another, therefore, >> in the next frame, all voltages are different. It is worthwhile to mention >> that I have access to an array which contains the voltage value for each >> vertex (index of the array). >> >> My purpose is the following: >> >> - Create a 1d texture with the voltage values. (Using the mentioned >> array). >> - Use the u or v coordinate of each vertex to point at its voltage >> value. >> - Programme a shader (modify the lambert shader) to convert the >> voltage value to a color. >> >> >> Using this approach, I only need to reload the buffer (1d texture) which >> contains the voltages (It is not needed to change the uv coordinates). >> >> Thank you again, >> >> Omar. >> >> >> On 7 September 2010 19:07, Ofer Koren <[email protected]> wrote: >> >>> I think we need more details... >>> >>> - Ofer >>> www.mrbroken.com >>> >>> >>> On Tue, Sep 7, 2010 at 9:02 AM, Omar Agudo <[email protected]> wrote: >>> >>>> Hi, >>>> >>>> I have recently started using maya for my project at the university. >>>> >>>> I am using the maya-python API as well as the OpenMaya API to create and >>>> render the scene. >>>> >>>> Do you know how can I implement a 1d texture in maya? >>>> >>>> Thank you in advance, >>>> >>>> best regards, >>>> >>>> Omar. >>>> >>>> -- >>>> http://groups.google.com/group/python_inside_maya >>>> >>> >>> -- >>> http://groups.google.com/group/python_inside_maya >>> >> >> -- >> http://groups.google.com/group/python_inside_maya >> > > -- > http://groups.google.com/group/python_inside_maya > -- http://groups.google.com/group/python_inside_maya
