Maya texture.outColor for Octane Materials

Autodesk Maya (Plugin developed by JimStar)

Moderator: JimStar

User avatar
dionysiusmarquis
Licensed Customer
Posts: 159
Joined: Mon Nov 04, 2013 9:29 pm

Yes, the shader decides which renderer to use. Its complete independent from the rendering happing in the render view. Here's a python script for testing. Its possible to retrieve the color data of the surfaceShader1 while rending with Octane in the background. I think even baking with Mental ray ect is possible as long as the plugin is loaded in Maya.

(Python is damn slow this has to be C of course)

Code: Select all

import maya.cmds as cmds
import maya.OpenMaya as om
import maya.OpenMayaRender as omr

resolutionX = 512;
resolutionY = 512;

resultColors = om.MFloatVectorArray();
resultTransparencies = om.MFloatVectorArray();
coordsU = om.MFloatArray(); 
coordsV = om.MFloatArray();

for v in range(0, resolutionY):
    vValue = v * (1.0/(resolutionY-1));
    for u in range(0, resolutionX):
        index = u+v*resolutionX;
        coordsU.insert(u * (1.0/(resolutionX-1)), index);
        coordsV.insert(vValue, index);

omr.MRenderUtil.sampleShadingNetwork("surfaceShader1.outColor", resolutionX*resolutionY, False, False, om.MFloatMatrix(), None, coordsU, coordsV, None, None, None, None, None, resultColors, resultTransparencies );

sampledColorArray = [];
for i in range(resultColors.length()):
    resultVector = om.MFloatVector(resultColors[i]);
    sampledColorArray.append(resultVector.x*255);
    sampledColorArray.append(resultVector.y*255);
    sampledColorArray.append(resultVector.z*255);
    
print sampledColorArray;
3D textures are possible too. But they also need a reference geometry.
User avatar
dionysiusmarquis
Licensed Customer
Posts: 159
Joined: Mon Nov 04, 2013 9:29 pm

The Lightwave 3D Plugin does have this feature btw.

At minute 5:40 :
[vimeo]http://www.vimeo.com/97941224[/vimeo]
Wenneker
Licensed Customer
Posts: 111
Joined: Mon Jun 02, 2014 4:12 pm

Acces to the maya procedurals would be really great!
The lack of a gradient Texture (ramp) in octane maya can be really cumbersome but that's comming in one of the next updates if I understood correctly. More procedural texture options would be nice.
Win 7 x64 | i7-4930 | 64gb | 4x gtx 780Ti 3gb
prodviz
Licensed Customer
Posts: 543
Joined: Sun Jul 14, 2013 6:00 pm

Any developments, on procedural displacement (whether maya's or Octane's) like Lightwave and C4D?

cheers,

Steve
Post Reply

Return to “Autodesk Maya”