Forum Groups
  All forums
    Help & Feedback
      Questions
      Work in progress
      Finished Art
      Non-Max related
    Community
      Offtopic
      News
    Hardware
    Photography



Maxunderground news unavailable

My MaxScript learning thread
show user profile  Paunescudanutz
I want to add a noise modifier to my object

code:
NoiseMod = Noise()
AddModifier MyTerrain NoiseMod


For some reason it does not work with Noise, but it seems to work with other modifiers just right
Anyone has any idea? couldn't find anything about noise.

Thanks!

PS:using 3ds max 2010

Portfolio

<---~( Daniel )~--->


read 646 times
8/27/2012 1:13:26 PM (last edit: 8/27/2012 1:14:32 PM)
show user profile  Weetabix
modPanel.addModToSelection (Noisemodifier ()) ui:on

?
read 634 times
8/27/2012 1:37:48 PM (last edit: 8/27/2012 1:38:06 PM)
show user profile  Paunescudanutz
actually it worked using my code but instead of Noise() it was supposed to be NoiseModifier() like in your example
So thanks!

And one more question: is the method you are using more efficient? or is it basically the same thing?

Portfolio

<---~( Daniel )~--->


read 629 times
8/27/2012 1:41:47 PM (last edit: 8/27/2012 1:41:47 PM)
show user profile  Weetabix
Pretty much the same thing. Both end up with a noise modifier on the object. I guess what you did is technically better, especially in large programs. Mine is pretty much using the listener output.

Glad you got your answer :)
read 627 times
8/27/2012 1:44:31 PM (last edit: 8/27/2012 1:45:49 PM)
show user profile  Garp
Weetabix's method mimics doing it in the UI. So it's slower.
But if it's just done a few times, who cares?!

Edit: btw, noise() is the constructor for the noise texture map ;)




read 618 times
8/27/2012 2:00:42 PM (last edit: 8/27/2012 2:03:32 PM)
show user profile  Paunescudanutz
thanks! ;)

Portfolio

<---~( Daniel )~--->


read 615 times
8/27/2012 2:05:17 PM (last edit: 8/27/2012 2:05:17 PM)
show user profile  Paunescudanutz
Got another one:

I want to make some verts to randomly pop out of my plane mesh but only UP, I thought i could do it like this:

-I create a subdivided plane

-I add noise to the plane, the noise will move my verts on the Z axes (up and down), what i want to do is to take the verts that are moved below 0 and bring them back to 0, and also take the outer most edge and align all the verts to 0 as well.

Moving verts around doesn't look so easy, didn't understood too much from Max's Help file and i don't know where to start? any ideas?

A simple example on how to move verts around should do it i guess, but any help is welcome

Thanks!




Portfolio

<---~( Daniel )~--->


read 598 times
8/27/2012 3:57:30 PM (last edit: 8/27/2012 3:57:30 PM)
show user profile  Garp
Well, if you have to access the verts though script, you might as well skip the noise modifier altogether (unless you need some wavy shape).

For an editable poly (selected):
- setting vert v to position [a, b, c]: polyOp.setVert $ v [a, b, c]
- moving vert v of vector [a, b, c] :polyOp.setVert $ v ((polyOp.getVert $ v) + [a, b, c])

edit: and I realized I wasn't really answering your question.
for i = 1 to polyOp.getNumVerts $ do
if (p = polyOp.getVert $ i).z < 0 do polyOp.setVert $ i (p * [1, 1, 0])





read 595 times
8/27/2012 4:06:42 PM (last edit: 8/27/2012 4:20:30 PM)
show user profile  Paunescudanutz
thanks a lot, it worked nicely :D

Portfolio

<---~( Daniel )~--->


read 576 times
8/28/2012 10:19:27 AM (last edit: 8/28/2012 10:19:27 AM)
#Maxforums IRC
Open chat window


Support Maxforums.org