Jump to content

Add VrayDirt map to VRayExtraTex Render Element via maxscript?


braddewald
 Share

Recommended Posts

some extra steps in there, but I commented out what each line does for you :D Hope this helps.

 

(
   r = maxOps.GetCurRenderElementMgr()
   -- get current render element
   r.AddRenderElement (VRayExtraTex elementname:"VRayDirt")
   -- add vray extra text and name it VRayDirt
   elementCount = r.NumRenderElements()
   -- count how many render elements there are
   k = r.GetRenderElement (elementCount-1)
   -- set k as the last element created (VRayExtraTex)
   k.texture = VRayDirt() 
   -- add VRayDirt to texture
)

After adding the texture, you can probably set a specific setting for it, but that was not part of the question, but it should be script-able.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...