AWS Thinkbox Discussion Forums

Quicksilver & iRay - new renderers for 3dsMax

Hi,
With the annual Autodesk release of their extensions (advantage pack), 3dsMax has a new renderer, iRay and also 3dsMax2011 has the additional “Quicksilver” renderer.
Would be good to add renderer specific advanced settings to the 3dsMax-Deadline submission system:

iRAY:

[code]ir = renderers.current
showproperties ir

mental_ray_iray_Renderer:mental_ray_iray_Renderer
.durationInSeconds : integer
.durationPasses : integer
.durationMode : enum
.displacementView : boolean
.displacementSmoothing : boolean
.displacementEdgeLength : float
.displacementMaximum : float
.displacementSubdivisionLevel : integer
.overrideMaterialEnabled : boolean
.overrideMaterial : material
.lightBouncesLimited : boolean
.lightBouncesMaximum : integer
.imageFilterType : enum
.imageFilterWidth : float
.hardwareReport : string
.version : string[/code]

Here’s what the GUI looks like for matching to the Options file:

Also, see attached zip file which contains a Maxscript file which shows how to access some extra Maxscript functionality to control the CPU/GPU usage on a machine. I was thinking that these extra functions could also be exposed to the Deadline options, post submision to allow control of jobs if they go to higher/lower spec CPU/GPU machines on the farm, whilst taking into account whatever the default values are.Iray-mgr1.2.zip (1.51 KB)
open source code here:

[code]–v1.2

(
rollout MR_rollout “:: IRay manager ::”
(

	global systinf = sysinfo.cpucount
	local m = mental_ray_string_options
	local lsitem = 1

	label hh "::   I R A Y  M A N A G E R  1.2 ::"	 align:#center
	group ""
	(
		label h0a "Set Iray Renderer and"	align:#left offset:[3,0]
		label h0b "MentalRay Material Editor" align:#left offset:[3,-5]
		button rdr "SETUP IRAY"width:172 height:30 offset:[0,0]
	)
	checkbutton chkCPU "CPU" checked:true width:80 offset:[-47,0] 
	checkbutton chkGPU "GPU" checked:true width:80 offset:[45,-26]
	

	
	group ""
	(
		label h1 " Choose the GPU's you want to use"align:#left 
		label h2 " and the number of CPU threads" align:#left offset:[0,-5]
		
		multilistbox lstGPU "GPU" items:#("GPU 1","GPU 2","GPU 3", "GPU 4") selection:#(1) height:4 across:2
		spinner corenumb "CPU:" range:[1,systinf,systinf] type:#integer fieldwidth:30  

	)
	checkbox chkCLAY "CLAY RENDER"  checked:false offset:[40,10]
	button rdr2 "Render Active View" width:162 height:40 offset:[-1,0]

hyperlink hl “:::::::: L o R a n /” address:“http://loran-cg.blogspot.com/” offset:[-44,10] align:#center
color:(color 50 150 255)
hoverColor:(color 50 150 255) visitedColor:(color 50 150 255)
hyperlink hl3 “Artur Leão :::::::” address:“http://dimensao3.com/al/” offset:[44,-20] align:#center
color:(color 50 150 255)
hoverColor:(color 50 150 255) visitedColor:(color 50 150 255)

--ACTION
	
	fn setIrayOptions =
	(
		clearlistener()
		if chkCPU.state == true then
		(
			print "CPU Enabled"
			m.addoption "iray threads" corenumb.value
		)
		else 
		(
			print "CPU Disabled"
			m.addoption "iray threads" 0
		)
		
		if chkGPU.state == true then
		(
			print "GPU Enabled"
			sdevs = ""
			gdevs = lstgpu.selection as array
			--for i=0 to lstGPU.items.count-1 do print 
			for i=1 to gdevs.count do
			(
				sdevs+=(gdevs[i]-1) as string
				if i!=gdevs.count then sdevs+=" "
			)
			mental_ray_string_options.addoption "iray devices" sdevs
		)
		else
		(
			print "GPU Disabled"
			mental_ray_string_options.addoption "iray devices" ""
		)
	)

	on MR_rollout open do
	(
		setIrayOptions()
	)
	
	--IRAY RENDERER + MR Material Editor--
	
	on rdr pressed do
	(
		local rdso = false
		if RenderSceneDialog.isOpen() then 
		(
			rdso = true
			renderSceneDialog.Close()
		)
		
		renderers.medit_locked = false
		ir =mental_ray_iray_Renderer()
		mr=mental_ray_Renderer()
		renderers.current = ir	
		renderers.medit = mr
		
		if rdso == true then renderSceneDialog.Open()
	)
	
	on rdr2 pressed do
	(
		max quick render
	)
	
	on chkCPU changed state do
	(
		
		if chkGPU.state != false then
		(
			setIrayOptions()
		) else chkCPU.state = true
	)
	
	on chkGPU changed state do
	(
		if chkCPU.state != false then
		(
			setIrayOptions()
		) else chkGPU.state = true
	)
	
	on corenumb changed value do setIrayOptions()
	
	on lstGPU selected val do
	(
		lsitem=val
		tt=lstgpu.selection as array
	)
	
	on lstGPU selectionEnd do
	(
		if lstGPU.selection.isEmpty then lstGPU.selection=lsitem
		setIrayOptions()
	)

--CLAY RENDER--	
	
	on chkCLAY changed theState do
	(
		if theState then
		(
			claymat= Arch___Design__mi()
			claymat.name = "Clay Override"
			claymat.diff_color = color 255 255 255
			claymat.refl_weight =  0
			renderers.current.overrideMaterialEnabled = true
			renderers.current.overrideMaterial = claymat
			renderSceneDialog.commit()
			renderscenedialog.update()
		)
		else
		(
			renderers.current.overrideMaterialEnabled = false
			renderSceneDialog.commit()
			renderscenedialog.update()
		)
	)
)--end 

createDialog MR_rollout 200 380

)[/code]

QUICKSILVER:

[code]qs = renderers.current
showproperties qs

Quicksilver_Hardware_Renderer:Quicksilver_Hardware_Renderer
.AmbientOcclusionEnabled : bool
.AmbientOcclusionRadius : float
.AmbientOcclusionIntensity : float
.HardwareSamplingQuality : enum
.SoftwareSamplingQuality : enum
.DepthOfFieldEnabled : bool
.DepthOfFieldMode : enum
.NearPlane : float
.FarPlane : float
.FocalPlane : float
.IndirectIlluminationEnabled : bool
.IndirectIlluminationLODEnabled : bool
.IndirectIlluminationShadowEnabled : bool
.IndirectIlluminationMultiplier : float
.IndirectIlluminationSamples : float
.IndirectIlluminationRSMSize : integer
.IndirectIlluminationShadowSize : integer
.IndirectIlluminationShadowRange : integer
.UseDefaultLights : bool
.UseShadows : bool
.SoftShadowMultiplier : float
.ReflectionsEnabled : bool
.TransparencyEnabled : bool
.TransparencyMode : enum
.LightingMode : enum
.ShadingMode : enum
.UseShaderCacheFileSystem : bool[/code]

Here’s what the GUI looks like for matching to the Options file:

Additional info can be found in the3dsmax.chm / maxscript.chm and ALSO the iRay system online @ download.autodesk.com/us/3dsmaxp … index.html

Thanks,
Mike

Hi Mike

Thanks for the info! We’ve added this to the wish list.

Cheers,

  • Ryan
Privacy | Site terms | Cookie preferences