Generate Grass - Vray Fur
Hello everyone ! I'm a beginner at MAXScripting, and I'm trying to make a script to generate a Vray Fur with specific parameters, as you can see on the screenshot. However, I'm facing a problem with units and scale. With some scenes it works fine, but with some others(with different units), it goes wrong, either with having my grass scaled down or the previous elements of the scene scaled up like x1000.
So I'd like it to work with these constant settings on ANY scene.
In addition, I would like to automatically affect a material in my library to this Vray Fur.
Here's the script I've written :
<code>
macroScript MAKEGRASS
category:"MAKE GRASS"
tooltip:""
(
units.displaytype = #metric
units.SystemType = #Meters
for selectedobject in selection do (
VRayFur sourceNode:selectedobject length:0.045 thickness:0.004 gravity:-0.00505 Bend:3.5 numKnots:8 flatNormals:on directionVar:0.2 lengthVar:0.2 thicknessVar:0.2 gravityVar:0.2
$VRayFur001.Distribution = 1
$VRayFur001.perArea = 0.12
$VRayFur001.placement = 0
$VRayFur001.generateWcoord = on
$VRayFur001.viewport_preview = on
)
select $VRayFur001
)
<code>
THANK YOU.
Attachment | Size |
---|---|
fur_settings.jpg | 102.39 KB |
Comments
UP !
UP !