AWS Thinkbox Discussion Forums

krakatoa 2 maxscript access

i know i can show properties of a render by writing

showproperties renderers.current

but how can i access them?

ive had no problem writing a vray camera utility based on the frost script you wrote bobo, but now im trying to access the vray and krakatoa render engine to give me the most used parameters in a little window

like density for krakatoa, dmc subdivisions for vray, etc.

any tips on getting access to them?

im starting with vray but would like to do the same for krakatoa

[code] ollout roll8 “Render Settings”
(

			group "DMC Sampler" (
				spinner spn_Min "Min:" tooltip:"Minimum Subdivisions" range:[0,1000,1] units:#integer
				--.twoLevel_baseSubdivs : integer
				
				spinner spn_Max "Max:" tooltip:"Maximum Subdivions" range:[0,1000,8] units:#integer
				--.twoLevel_fineSubdivs : integer
				
				spinner spn_Noise "Noise:" tolltip:"Noise Threshold"
				
				spinner spn_Adaptive "Adap" range:[0,1,0.01] tooltip:"Adaptive Amount" units:#float
				--.dmc_earlyTermination_amount (mc_earlyTermination_amount) : float
				
				spinner spn_Samples "Smpl" tooltip:"Minimum Samples" range:[0,1,1] units:#integer
			--	.dmc_earlyTermination_minSamples (mc_earlyTermination_minSamples) : integer
				
				spinner spn_Multi "Mlti" tooltip:"Global Subdivions Multiplier" range:[0,100,1.0] units:#float
				-- .dmc_subdivs_mult (mc_subdivs_mult) : float
			)
			
			group "Global" (					
			
				
				spinner spn_emory "Memory:" tooltip:"Dynamic Memory Limit" range:[0,10000,4000] units:#integer
				--.system_raycaster_memLimit : integer
				
				spinner spn_Region "Region:" tooltip:"Render Region Size"  range:[0,512,64] units:#integer
			--	.system_region_x : integer
				
				spinner spn_Gamma "Gamma:" tooltip:"Gamma" range:[0,100,1.0] units:#float
				--.colorMapping_gamma : float
				
				checkbox chk_Stamp "Stamp" tooltip:"Frame Stamp" state:#false
			--	.system_frameStamp_on : boolean
				
				
			)

		   fn updateControls =
		   (
				local Vr = renderers.current
				-- local enableInViewport = 0
				
				
				local min = 0
				local max2 = 0
				local noise2 = 0
				local adaptive2 = 0
				local samples = 0
				local chk_stamp = 1
				local multi = 0
				local memory2 = 0
				local region = 0
				local gamma = 0
			
			
			
					
					for o in vr do
			  
						(
							if o.twoLevel_baseSubdivs > min do min = o.twoLevel_baseSubdivs
							if o.twoLevel_fineSubdivs > max2 do max2 = o.twoLevel_fineSubdivs
							--if o.f_number > spn_Noise do spn_Noise = o.f_number
							if o.dmc_earlyTermination_amount > adaptive2 do adaptive2 = o.dmc_earlyTermination_amount
							if o.dmc_earlyTermination_minSamples > samples do samples = o.dmc_earlyTermination_minSamples
						
							
							if o.system_frameStamp_on do chk_stamp+=1 
							
							if o.dmc_subdivs_mult > multi do multi = o.dmc_subdivs_mult
							if o.system_raycaster_memLimit > memory2 do memory2 = o.system_raycaster_memLimit
							if o.system_region_x  > region do region = o.system_region_x 
							if o.colorMapping_gamma > gamma do gamma = o.colorMapping_gamma
							-- if o.enableViewportMesh do  enableInViewport+=1
						)
			spn_Region.value = region
			spn_memory.value = memory2
					)
		
				on spn_Region changed val do
				(
				 for o in vr do o.system_region_x  = val
				)
				
				on spn_memory changed val do
				(
				 for o in vr do o.system_raycaster_memLimit  = val
				)
		
		
			
			
		
	

		
		on roll8 rolledup state do 
				( 
					mainDialog.autoResize()
					vr = renderers.current
				)
	)
	[/code]

would i do the same with krakatoa? it says the functions cannot be mapped

The whole Krakatoa Render UI is scripted just open it in the editor and start digging…

Just back-it-up-in-case-you-F!-it-up :wink:

If only there was some document that described these things… Oh wait!

thinkboxsoftware.com/krak-maxscript-access/

The following chapter shows the Krakatoa interface and all its functions including the ones used to read and write properties:
thinkboxsoftware.com/krak-fr … -interfac/

And then this one shows how to access the list of all properties exposed by Krakatoa, and also explains most of the existing properties:
thinkboxsoftware.com/krak-ma … rop-names/

FranticParticleRenderMXS.getPropNames() --returns all property names FranticParticles.GetProperty "RenderingMethod" -->"Particle Rendering" FranticParticles.GetBoolProperty "UseLighting" --> true FranticParticles.GetFloatProperty "VoxelSize" -->0.5 FranticParticles.GetIntProperty "VoxelFilterRadius" --> 1 FranticParticles.GetProperty "ColorOverride:Color" --> "(color 255 255 255)" FranticParticles.SetProperty "ColorOverride:Color" ((color 128 255 0) as string) --setting a value always expects a string execute (FranticParticles.GetProperty "ColorOverride:Color") --> (color 128 255 0) --you can use execute to turn a string to value

You can also say

for i in (FranticParticleRenderMXS.getPropNames()) do format "% = %\n" i (FranticParticles.GetProperty i)

and the result will be something like

RenderingMethod = Particle Rendering
IterativeRender = false
IterativeRender:ScaleFactor = 1
UseLighting = true
IgnoreSceneLights = false
BackgroundColor = (color 0 0 0 0)
UseEnvironmentColor = true
UseEnvironmentReflections = false
EnvironmentReflectionStrength = 1.0
UseFilterColor = false
UseEmissionColor = false
AdditiveMode = false
ColorOverride:Enabled = false
ColorOverride:Color = (color 255 255 255)
ColorOverride:BlendAmount = 100.0
AbsorptionOverride:Enabled = false
AbsorptionOverride:Color = (color 0 0 0)
AbsorptionOverride:BlendAmount = 100.0
EmissionOverride:Enabled = false
EmissionOverride:Color = (color 255 255 255)
EmissionOverride:BlendAmount = 100.0
DensityOverride:Value = 1.0
DensityOverride:Enabled = false
DensityOverride:BlendAmount = 100.0
PostDivideByAlpha = false
Density:LinkLightingAndRenderingDensity = true
Density:DensityMethod = Volumetric Density
DensityScalingSource = Material Opacity
Density:DensityPerParticle = 5
Density:DensityExponent = -1
Emission:Strength = 1
Emission:StrengthExponent = 0
Emission:UseStrength = false
Lighting:Density:DensityMethod = Volumetric Density
Lighting:Density:DensityPerParticle = 5
Lighting:Density:DensityExponent = -1
VoxelSize = 0.5
VoxelFilterRadius = 1
Voxel:NumDensitySamples = 2
Voxel:NumLightSamples = 2
PhaseFunction = Isotropic
PhaseEccentricity = 0
UseDepthMaps = true
DrawPointFilter = Bilinear
AttenuationLookupFilter = Bicubic
SortingThreads = 0
Performance:MT:Loading = true
Performance:MT:Sorting = true
Performance:MT:Lighting = true
Performance:MT:Drawing = true
EnableMotionBlur = false
EnableDepthOfField = false
EnableAttenuationMapSaving = false
MotionBlurSegments = 2
JitteredMotionBlur = false
DeformationMotionBlur = false
MatteMotionBlurSegments = 1
UseMatteMotionBlurSegments = false
ShutterAngleInDegrees = 180
ShutterBias = 0
DepthOfFieldSampleRate = 0.1
IgnoreMissingParticles = false
RenderParticleFlowGeometry = true
RenderParticleFlowBBox = false
RenderParticleFlowPhantom = true
RenderFumeFX = true
RenderPRTHair = true
RenderPRTCreator = true
RenderPRTSource = true
RenderMaxParticles = true
RenderThinkingParticles = false
RenderGeometryVertices = false
RenderKrakatoaLoaders = true
RenderGeometryVolumes = true
GlobalParticlePercentage = 100.0
UseGlobalDataHolder = true
GlobalDataHolder = 
Lighting:Specular:SpecularPower = 10.0
Lighting:Specular:Level = 100.0
Channel:Allocate:SpecularPower = false
Channel:Allocate:SpecularLevel = false
Channel:Allocate:PhaseEccentricity = false
Lighting:Specular:Anisotropy = 0.0
Lighting:Reflectance:Level = 100.0
EnableParticleCache = false
EnableLightingCache = false
CacheLastFrame = true
UseCacheInSlaveMode = false
ParticleMode = Render Scene Particles
ParticleFiles = 
ParticleFilesBase = 
ParticleFilesProject = 
ParticleFilesSequence = 
ParticleFilesTake = 
ParticleFilesName = 
Partition:Count = 10
Partition:IncrementPositionRandomSeeds = true
Partition:IncrementSpawnRandomSeeds = true
Partition:IncrementSpeedRandomSeeds = true
Partition:IncrementRotationRandomSeeds = true
Partition:IncrementFumeFXRandomSeeds = true
Partition:IncrementOtherRandomSeeds = true
Partition:IncrementLegacyRandomSeeds = true
Partition:IncrementThinkingRandomSeeds = true
Partition:IncrementBox3Geometry = true
Partition:IncrementBox3Random = true
Partition:IncrementBox3ScalarVector = true
Partition:IncrementBox3Icon = true
Partition:IncrementPRTModifiers = false
Partition:IncrementPRTVolumeModifiers = false
Partition:IncrementPRTFumeFXModifiers = false
Partition:IncrementGeometryModifiers = false
Partition:IncrementBox3DiskCacheNames = false
Partition:AffectSeedsInObjects = #()
Partition:IncrementSelectedOnly = false
Partition:BackupRootMode = 1
Partition:BackupRoot = 
SkipExistingParticleFiles = false
Memory:Channel:Velocity = float16
Memory:Channel:Color = float16
Memory:Channel:Density = float16
Memory:Channel:Normal = float16
Memory:Channel:Tangent = float16
Memory:Channel:Lighting = float16
Memory:Channel:Absorption = float16
Memory:Channel:Emission = float16
Memory:Channel:MBlurTime = float16
Memory:Channel:SpecularPower = float16
Memory:Channel:SpecularLevel = float16
Memory:Channel:PhaseEccentricity = float16
Memory:Channel:SpecularGlossiness = float16
Memory:Channel:SpecularShift = float16
Memory:Channel:Specular2Level = float16
Memory:Channel:Specular2Glossiness = float16
Memory:Channel:Specular2Shift = float16
Memory:Channel:GlintLevel = float16
Memory:Channel:GlintSize = float16
Memory:Channel:GlintGlossiness = float16
Memory:Channel:DiffuseLevel = float16
Memory:Channel:__Element_Diffuse = float16
Memory:Channel:__Element_Specular = float16
Memory:Channel:TextureCoord = float16
Memory:Channel:MXSVector = float16
Memory:Channel:MXSFloat = float16
Memory:Channel:MXSInteger = int16
Memory:Channel:Scale = float16
Memory:Channel:Acceleration = float16
Memory:Channel:DensityGradient = float16
Memory:Channel:SignedDistance = float16
Memory:Channel:Fire = float16
Memory:Channel:Fuel = float16
Memory:Channel:Temperature = float16
Memory:Channel:Age = int32
Memory:Channel:LifeSpan = int32
Memory:Channel:ID = int32
Memory:Channel:MtlIndex = int16
Memory:Channel:Mapping2 = float16
Memory:Channel:Mapping3 = float16
Memory:Channel:Mapping4 = float16
Memory:Channel:Mapping5 = float16
Memory:Channel:Mapping6 = float16
Memory:Channel:Mapping7 = float16
Memory:Channel:Mapping8 = float16
Memory:Channel:Mapping9 = float16
Memory:Channel:Mapping10 = float16
Memory:Channel:Mapping11 = float16
Memory:Channel:Mapping12 = float16
Memory:Channel:Mapping13 = float16
Memory:Channel:Mapping14 = float16
Memory:Channel:Mapping15 = float16
Memory:Channel:Mapping16 = float16
Memory:Channel:Mapping17 = float16
Memory:Channel:Mapping18 = float16
Memory:Channel:Mapping19 = float16
Memory:Channel:Mapping20 = float16
Memory:Channel:Mapping21 = float16
Memory:Channel:Mapping22 = float16
Memory:Channel:Mapping23 = float16
Memory:Channel:Mapping24 = float16
Memory:Channel:Mapping25 = float16
Memory:Channel:Mapping26 = float16
Memory:Channel:Mapping27 = float16
Memory:Channel:Mapping28 = float16
Memory:Channel:Mapping29 = float16
Memory:Channel:Mapping30 = float16
Memory:Channel:Mapping31 = float16
Memory:Channel:Mapping32 = float16
Memory:Channel:Mapping33 = float16
Memory:Channel:Mapping34 = float16
Memory:Channel:Mapping35 = float16
Memory:Channel:Mapping36 = float16
Memory:Channel:Mapping37 = float16
Memory:Channel:Mapping38 = float16
Memory:Channel:Mapping39 = float16
Memory:Channel:Mapping40 = float16
Memory:Channel:Mapping41 = float16
Memory:Channel:Mapping42 = float16
Memory:Channel:Mapping43 = float16
Memory:Channel:Mapping44 = float16
Memory:Channel:Mapping45 = float16
Memory:Channel:Mapping46 = float16
Memory:Channel:Mapping47 = float16
Memory:Channel:Mapping48 = float16
Memory:Channel:Mapping49 = float16
Memory:Channel:Mapping50 = float16
Memory:Channel:Mapping51 = float16
Memory:Channel:Mapping52 = float16
Memory:Channel:Mapping53 = float16
Memory:Channel:Mapping54 = float16
Memory:Channel:Mapping55 = float16
Memory:Channel:Mapping56 = float16
Memory:Channel:Mapping57 = float16
Memory:Channel:Mapping58 = float16
Memory:Channel:Mapping59 = float16
Memory:Channel:Mapping60 = float16
Memory:Channel:Mapping61 = float16
Memory:Channel:Mapping62 = float16
Memory:Channel:Mapping63 = float16
Memory:Channel:Mapping64 = float16
Memory:Channel:Mapping65 = float16
Memory:Channel:Mapping66 = float16
Memory:Channel:Mapping67 = float16
Memory:Channel:Mapping68 = float16
Memory:Channel:Mapping69 = float16
Memory:Channel:Mapping70 = float16
Memory:Channel:Mapping71 = float16
Memory:Channel:Mapping72 = float16
Memory:Channel:Mapping73 = float16
Memory:Channel:Mapping74 = float16
Memory:Channel:Mapping75 = float16
Memory:Channel:Mapping76 = float16
Memory:Channel:Mapping77 = float16
Memory:Channel:Mapping78 = float16
Memory:Channel:Mapping79 = float16
Memory:Channel:Mapping80 = float16
Memory:Channel:Mapping81 = float16
Memory:Channel:Mapping82 = float16
Memory:Channel:Mapping83 = float16
Memory:Channel:Mapping84 = float16
Memory:Channel:Mapping85 = float16
Memory:Channel:Mapping86 = float16
Memory:Channel:Mapping87 = float16
Memory:Channel:Mapping88 = float16
Memory:Channel:Mapping89 = float16
Memory:Channel:Mapping90 = float16
Memory:Channel:Mapping91 = float16
Memory:Channel:Mapping92 = float16
Memory:Channel:Mapping93 = float16
Memory:Channel:Mapping94 = float16
Memory:Channel:Mapping95 = float16
Memory:Channel:Mapping96 = float16
Memory:Channel:Mapping97 = float16
Memory:Channel:Mapping98 = float16
Memory:Channel:Mapping99 = float16
Memory:PreAllocation:Use = false
Memory:PreAllocation:ParticleCountInMillions = 10.0
ActiveParticleChannels = Position,float32,3,Velocity,float16,3,Density,float16,1,Color,float16,3,Normal,float16,3,ID,int32,1
SaveLightingAsEmission = false
ParticleCountMemoryCalculator:Count = 0.0
RenderElementsHolder = 
InactiveTPGroups = 
RenderTarget = Direct Render
XMLOutputFiles = 
Matte:UseMatteObjects = false
Matte:DepthMapFiles = 
Matte:UseDepthMapFiles = false
Matte:DepthMapNear = 0.0
Matte:DepthMapFar = 1000.0
Matte:DepthMapMode = Camera Space Z Depth
Matte:NamedSelectionSets = #()
Matte:RayDivisions = 1
Matte:SaveMultipleLayers = false
AmbientParticipatingMediumExtinction = [0.0233333,0.0032476,0.0029652]
ExtinctionRed = 66.1
ExtinctionGreen = 9.2
ExtinctionBlue = 8.4
ExtinctionStart = 0.0
ExtinctionDistance = 1000.0
PME:NamedSelectionSets = #()
PME:FreeMode = false
PME:UseExtinction = false
PME:ReferenceColor = color 255 255 255
GUI:Position = undefined
GUI:Size = [470,740]
GUI:PresetsRolloutOpen = false
GUI:RenderGlobalValuesRolloutOpen = false
GUI:MainControlsRolloutOpen = true
GUI:SaveParticlesRolloutOpen = false
GUI:ParticlePartitioningRolloutOpen = false
GUI:ParticleSystemsRolloutOpen = false
GUI:ShadowsRolloutOpen = false
GUI:ParticleChannelsRolloutOpen = false
GUI:ThinkingParticlesRolloutOpen = false
GUI:ParticleLoadersRolloutOpen = false
GUI:PRTHairExplorerRolloutOpen = false
GUI:PRTFumeFXExplorerRolloutOpen = false
GUI:PRTVolumeExplorerRolloutOpen = false
GUI:MatteObjectsRolloutOpen = false
GUI:RenderTargetRolloutOpen = false
GUI:PreferencesRolloutOpen = true
GUI:PreferencesColorsRolloutOpen = false
GUI:PreferencesSystemRolloutOpen = false
GUI:AmbientPMERolloutOpen = false
GUI:UserNotesRolloutOpen = false
GUI:AboutRolloutOpen = false
GUI:ShaderDynamicRolloutOpen = true
Presets:SaveRenderHistory = true
Presets:SaveImageSample = true
UserNotes = 
VFB:InteractiveUpdate = false
VFB:InteractiveUpdateThreshold = 2000
RenderElement:Phong Surface:Diffuse:Create = false
RenderElement:Phong Surface:Specular:Create = false
RenderElement:Kajiya-Kay Hair:Diffuse:Create = false
RenderElement:Kajiya-Kay Hair:Specular:Create = false
RenderElement:Marschner Hair:Specular:Create = false
Shader:Marschner Hair:SpecularLevel:Varying = false
Shader:Marschner Hair:SpecularLevel = 25
Shader:Marschner Hair:SpecularGlossiness:Varying = false
Shader:Marschner Hair:SpecularGlossiness = 300
Shader:Marschner Hair:SpecularShift:Varying = false
Shader:Marschner Hair:SpecularShift = 0.1
RenderElement:Marschner Hair:Specular2:Create = false
Shader:Marschner Hair:Specular2Level:Varying = false
Shader:Marschner Hair:Specular2Level = 90
Shader:Marschner Hair:Specular2Glossiness:Varying = false
Shader:Marschner Hair:Specular2Glossiness = 30
Shader:Marschner Hair:Specular2Shift:Varying = false
Shader:Marschner Hair:Specular2Shift = -0.1
RenderElement:Marschner Hair:Glint:Create = false
Shader:Marschner Hair:GlintLevel:Varying = false
Shader:Marschner Hair:GlintLevel = 400
Shader:Marschner Hair:GlintSize:Varying = false
Shader:Marschner Hair:GlintSize = 0.5
Shader:Marschner Hair:GlintGlossiness:Varying = false
Shader:Marschner Hair:GlintGlossiness = 10
RenderElement:Marschner Hair:Diffuse:Create = false
Shader:Marschner Hair:DiffuseLevel:Varying = false
Shader:Marschner Hair:DiffuseLevel = 100
OK
Privacy | Site terms | Cookie preferences