Notifications
Clear all

[Closed] Duplicate with different seed

 DDS

Hi!

I have an object with a noise scale controller in the scale.

Can anybody tell me, if it’s easy, how to duplicate this object increasing the seed parameter of the noise scale controller +1 in each duplicate, so they have a offset frequency?

Thanks a lot!

4 Replies

This creates a copy of the selected object and selects the copy so you can run it multiple times:

obj = copy selection[1] isselected:true
obj.scale.controller.seed += 1
  • Martijn
 DDS

Thank you a lot Martijn van Herk.

It didn’t work at the beggining because my controller was inside a list, and it worked a bit differently. I also made 179 copies every 2 degrees to make a whole circle (since the pivot was very separated from the object). It ended being:

for i = 1 to 179 do
(
rot_obj = eulerangles 0 0 -2
obj = copy selection[1] isselected:true
c = obj.scale.controller.Noise_scale
c.seed += 1
in coordsys local rotate obj rot_obj
)

but let me say that without you I wouldn’t have known where to begin from, since i don’t know anything about maxscript.

Thanks again dude

Glad I could help

Here’s a slightly modified version which might run a little bit faster. The isSelected part is left out the i loop defines the degrees of rotation. This makes it easy to adjust the number of copies (eg. for i = 5 to 355 by 5 do which obviously creates a copy every 5 degrees).


with redraw off
(
	for i = 2 to 358 by 2 do
	(
		obj = copy selection[1]
		obj.scale.controller.noise_scale.seed += 1
		in coordsys local rotate obj -i z_axis
	)
)

Cheers,
Martijn

 DDS

amazing! this is such a new and big universe. Glad I’m not losing my north from the beggining at least! (i.e. at least I understand your last script )