-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
351 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
[node pota] | ||
desc STRING "Polynomial optics camera shader" | ||
maya.name STRING "camera" | ||
maya.id INT 0x00070506 | ||
maya.classification STRING "shader/surface" | ||
maya.type STRING "camera" | ||
maya.translator STRING "pota" | ||
|
||
c4d.classification STRING "generic" | ||
|
||
houdini.icon STRING "SHOP_surface" | ||
houdini.label STRING "pota" | ||
houdini.help_url STRING "http://www.zenopelgrims.com/polynomial-optics-arnold" | ||
|
||
|
||
[attr lensModel] | ||
maya.name STRING "aiLensModel" | ||
desc STRING "Lens Model" | ||
default STRING "petzval" | ||
|
||
houdini.label STRING "Lens Model" | ||
|
||
|
||
[attr sensor_width] | ||
maya.name STRING "aiSensorWidth" | ||
min FLOAT 0.1 | ||
max FLOAT 100 | ||
default FLOAT 36 | ||
desc STRING "Width of the sensor in mm. Default value is the width of a full frame sensor." | ||
|
||
houdini.label STRING "Sensor Width (mm)" | ||
|
||
|
||
[attr wavelength] | ||
maya.name STRING "aiWavelength" | ||
min FLOAT 390.0 | ||
max FLOAT 700.0 | ||
default FLOAT 550.0 | ||
desc STRING "Wavelength in nanometers." | ||
|
||
houdini.label STRING "Wavelength (nm)" | ||
|
||
|
||
[attr dof] | ||
maya.name STRING "aiDof" | ||
default BOOL true | ||
desc STRING "Enable Depth of Field" | ||
linkable BOOL FALSE | ||
|
||
houdini.label STRING "Enable Depth of Field" | ||
|
||
|
||
[attr fstop] | ||
maya.name STRING "aiFstop" | ||
min FLOAT 0.0 | ||
max FLOAT 64.0 | ||
default FLOAT 2.8 | ||
desc STRING "F-Stop" | ||
|
||
houdini.label STRING "f-stop" | ||
|
||
|
||
[attr focus_distance] | ||
maya.name STRING "aiFocusDistance" | ||
min FLOAT 0.0 | ||
max FLOAT 1000000.0 | ||
default FLOAT 150.0 | ||
desc STRING "Focus distance in cm" | ||
|
||
houdini.label STRING "Focus Distance (cm)" | ||
|
||
|
||
[attr extra_sensor_shift] | ||
maya.name STRING "aiExtraSensorShift" | ||
min FLOAT -10.0 | ||
max FLOAT 10.0 | ||
default FLOAT 0.0 | ||
desc STRING "Additional Sensor shift (mm)" | ||
|
||
houdini.label STRING "Additional Sensor shift (mm)" | ||
|
||
|
||
[attr vignetting_retries] | ||
maya.name STRING "aiVignettingRetries" | ||
min INT 1 | ||
max INT 50 | ||
default INT 15 | ||
desc STRING "Number of times a ray will be tried to be shot in a random direction, in case the previous iteration got vignetted." | ||
|
||
houdini.label STRING "Number of times a ray will be tried to be shot in a random direction, in case the previous iteration got vignetted." | ||
|
||
|
||
[attr aperture_blades] | ||
maya.name STRING "aiApertureBlades" | ||
default INT 0 | ||
min INT 0 | ||
max INT 8 | ||
desc STRING "Number of aperture blades. < 3 is perfectly circular." | ||
|
||
houdini.label STRING "Aperture Blades" | ||
|
||
|
||
[attr proper_ray_derivatives] | ||
maya.name STRING "aiProperRayDerivatives" | ||
default BOOL true | ||
desc STRING "Enabling this option will trace 3 camera rays instead of 1 to calculate the proper ray derivatives, which are needed for efficient texture lookups. If left unchecked, texture I/O will suffer, but the camera shader speed will be faster." | ||
|
||
houdini.label STRING "Proper ray derivatives" |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import mtoa.ui.ae.templates as templates | ||
import pymel.core as pm | ||
import maya.cmds as cmds | ||
import mtoa.ui.ae.utils as aeUtils | ||
|
||
class aiPotaTemplate(templates.AttributeTemplate): | ||
|
||
def filenameEditBokeh(self, mData) : | ||
attr = self.nodeAttr('aiBokehEXRPath') | ||
cmds.setAttr(attr,mData,type="string") | ||
|
||
def LoadFilenameButtonPushBokeh(self, *args): | ||
basicFilter = 'All Files (*.*)' | ||
ret = cmds.fileDialog2(fileFilter=basicFilter, dialogStyle=2, cap='Select sample_bokeh file location',fm=0) | ||
if ret is not None and len(ret): | ||
self.filenameEditBokeh(ret[0]) | ||
cmds.textFieldButtonGrp("filenameBokehGrp", edit=True, text=ret[0]) | ||
|
||
def filenameNewBokeh(self, nodeName): | ||
path = cmds.textFieldButtonGrp("filenameBokehGrp", label="Bokeh AOV EXR path", changeCommand=self.filenameEditBokeh, width=300) | ||
cmds.textFieldButtonGrp(path, edit=True, text=cmds.getAttr(nodeName)) | ||
cmds.textFieldButtonGrp(path, edit=True, buttonLabel="...", | ||
buttonCommand=self.LoadFilenameButtonPushBokeh) | ||
|
||
def filenameReplaceBokeh(self, nodeName): | ||
cmds.textFieldButtonGrp("filenameBokehGrp", edit=True, text=cmds.getAttr(nodeName) ) | ||
|
||
|
||
def setup(self): | ||
self.beginLayout("Polynomial Optics", collapse=False) | ||
self.addControl("aiLensModel", label="Lens Model") | ||
self.addControl("aiSensorWidth", label="Sensor Width (mm)") | ||
self.addControl("aiWavelength", label="Wavelength (nm)") | ||
self.addControl("aiDof", label="Enable depth of field") | ||
self.addControl("aiFstop", label="F-stop") | ||
self.addControl("aiFocusDistance", label="Focus distance (cm)") | ||
self.addControl("aiExtraSensorShift", label="Extra Sensor shift (mm)") | ||
self.addControl("aiVignettingRetries", label="Vignetting retries") | ||
self.addControl("aiApertureBlades", label="Aperture blades") | ||
self.addControl("aiProperRayDerivatives", label="Proper Ray Derivatives") | ||
|
||
self.endLayout() | ||
|
||
""" | ||
self.addSeparator() | ||
self.addSeparator() | ||
self.addSeparator() | ||
self.addSeparator() | ||
self.addSeparator() | ||
self.addSeparator() | ||
self.beginLayout("AOV shader", collapse=False) | ||
self.addControl("aiBackwardSamples", label="Backwards samples") | ||
self.addControl("aiMinimumRgb", label="Minimum RGB") | ||
self.addCustom("aiBokehEXRPath", self.filenameNewBokeh, self.filenameReplaceBokeh) | ||
self.endLayout() | ||
""" | ||
|
||
|
||
|
||
templates.registerTranslatorUI(aiPotaTemplate, "camera", "pota") |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import mtoa.ui.ae.templates as templates | ||
import pymel.core as pm | ||
import maya.cmds as cmds | ||
import mtoa.ui.ae.utils as aeUtils | ||
|
||
class aiPotaTemplate(templates.AttributeTemplate): | ||
|
||
def filenameEditBokeh(self, mData) : | ||
attr = self.nodeAttr('aiBokehEXRPath') | ||
cmds.setAttr(attr,mData,type="string") | ||
|
||
def LoadFilenameButtonPushBokeh(self, *args): | ||
basicFilter = 'All Files (*.*)' | ||
ret = cmds.fileDialog2(fileFilter=basicFilter, dialogStyle=2, cap='Select sample_bokeh file location',fm=0) | ||
if ret is not None and len(ret): | ||
self.filenameEditBokeh(ret[0]) | ||
cmds.textFieldButtonGrp("filenameBokehGrp", edit=True, text=ret[0]) | ||
|
||
def filenameNewBokeh(self, nodeName): | ||
path = cmds.textFieldButtonGrp("filenameBokehGrp", label="Bokeh AOV EXR path", changeCommand=self.filenameEditBokeh, width=300) | ||
cmds.textFieldButtonGrp(path, edit=True, text=cmds.getAttr(nodeName)) | ||
cmds.textFieldButtonGrp(path, edit=True, buttonLabel="...", | ||
buttonCommand=self.LoadFilenameButtonPushBokeh) | ||
|
||
def filenameReplaceBokeh(self, nodeName): | ||
cmds.textFieldButtonGrp("filenameBokehGrp", edit=True, text=cmds.getAttr(nodeName) ) | ||
|
||
|
||
def setup(self): | ||
self.beginLayout("Polynomial Optics", collapse=False) | ||
self.addControl("aiLensModel", label="Lens Model") | ||
self.addControl("aiSensorWidth", label="Sensor Width (mm)") | ||
self.addControl("aiWavelength", label="Wavelength (nm)") | ||
self.addControl("aiDof", label="Enable depth of field") | ||
self.addControl("aiFstop", label="F-stop") | ||
self.addControl("aiFocusDistance", label="Focus distance (cm)") | ||
self.addControl("aiExtraSensorShift", label="Extra Sensor shift (mm)") | ||
self.addControl("aiVignettingRetries", label="Vignetting retries") | ||
self.addControl("aiApertureBlades", label="Aperture blades") | ||
self.addControl("aiProperRayDerivatives", label="Proper Ray Derivatives") | ||
|
||
self.endLayout() | ||
|
||
""" | ||
self.addSeparator() | ||
self.addSeparator() | ||
self.addSeparator() | ||
self.addSeparator() | ||
self.addSeparator() | ||
self.addSeparator() | ||
self.beginLayout("AOV shader", collapse=False) | ||
self.addControl("aiBackwardSamples", label="Backwards samples") | ||
self.addControl("aiMinimumRgb", label="Minimum RGB") | ||
self.addCustom("aiBokehEXRPath", self.filenameNewBokeh, self.filenameReplaceBokeh) | ||
self.endLayout() | ||
""" | ||
|
||
|
||
|
||
templates.registerTranslatorUI(aiPotaTemplate, "camera", "pota") |
Binary file not shown.
Oops, something went wrong.