Hi!
I'm new on this forum, but i'm here to learn more about scripting. What determined me to aproach scripting was to create some new tools for my work.
I am an architect and i have a concrete question ... how to write a script that would help me creating some hedge. I want the tool to be something like a spacing tool from 3d max but the objects created to be rotated on the z axis randomly.
Something like this in the picture(hedge created with 3 mesh modules) .
Forum topic · Scripts Wanted
I'm a begginer - need a script
By apunctg · 2007-09-06
Downloads
- img.jpg — img.jpg124 KB
Description
Comments (6)
apunctg · 2007-10-19
i encounted some problems with my script ... and i need help
i posted a thread on cgtalk about this,
http://forums.cgsociety.org/showthread.php?f=98&t=551985
"my script shoud do basicaly a hedge from a module that i allready have, the script is based on for loops copying, scaleing and rotating the module along a spline. My problem is that with basic objects like a box or a cylinder it works fine (as i intended) but with my module it doesn't, at high setings ... because of an error ... that i don't know . i will post here the print screens ...
Can anyone explaine me how to solve this problem please !"
Attachments
- no_error.jpg — no_error.jpg29 KB
- error.jpg — error.jpg70 KB
apunctg · 2007-10-03
I've came up with this script after looking in maxscript reference and some tutorials but something does'n work as it should. the scale is not very predictable in the given values.
And i have a question related to this ... how do I make an editable poly or mesh with all the elements joind into one.
linie = $line01
len = curvelength linie
x = 10
uStep = x / len
for u = 0.0 to 1.0 by uStep do
(
pozitie = lengthInterp linie u
tan = lengthTangent linie u
n = random 0 360
z = random 0.9 1.1
rot = eulerangles 0 0 n
copy $ pos:pozitie wirecolor:red isSelected:on
rotate $ rot
rot = eulerangles 0 0 n
scale $ [z,z,z]
)
apunctg · 2007-09-06
it would've been nice that the Advanced Painter on the Scatter rollout to have some scale spinners like the ones for orientation and offset. But it's also very usefull as it is .
vsai · 2007-09-12
the best beginner tutorials i've found are the cg-academy DVD's, as they cover a good bit of the programatic 'thinking' involved also in the very beginning, then build pretty steady.
as for free stuff, just asking questions, both here, and at the cgtalk maxscript forum will generally get you answers when you can't find a script thats reasonably close to what you are trying to do to read and pick apart :)
apunctg · 2007-09-06
thank you Christopher for those links !
can u recommend me some tutorials at a very "beginner" level ... beside the maxscript reference ...
Christopher Grant · 2007-09-06
Hello and welcome to ScriptSpot. I actually work at an Architectural firm spending my days doing renderings.
There are 2 scripts in particular that I use (although there are others as well) to accomplish something similar to what you're looking for:
- Advanced Painter (a great tool that lets you spray geometry around onto other geometry, even randomly selecting between multiple source objects. I use it to place plants and 2d people when necessary)
http://www.scriptspot.com/3ds-max/advanced-painter
- Random Transform (one of Neil Blevins' great scripts and part of his script pack that everyone should have installed) man
http://www.scriptspot.com/3ds-max/transformrandomizer