MASH: Change distribution of points on a grid?

419 views
Skip to first unread message

AK Eric

unread,
Nov 7, 2016, 2:15:28 PM11/7/16
to maya_he3d
Have really been enjoying the MASH conversations here.  Was sick for a few days last week and poured through a bunch of tutorials while at home.  Great stuff.

Here's something I haven't been able to figure out, but presumably this should be pretty easy:

It's trivial to do a evenly spaced grid of 100x100 points.

What I'd like to do is, have a distribution where I have fewer points in the middle, and more points at the exterior, presumably controlled by some color 2d gray-scale.  Doesn't have to be a grid distribution, could be randomly placed.

Basically it's like a particle emitter where the emission point is controlled via a gray-scale ramp:  light colors= higher probability for emission, dark colors = less probability for emission.

This seems like it should be super easy, but I'm just not finding it.

Any thoughts appreciated, thanks!

Steve Davy

unread,
Nov 7, 2016, 3:08:53 PM11/7/16
to maya...@googlegroups.com

Look into the strength map -- that's pretty much what it does. You could use a procedural texture such as noise, or can even interactively paint the placement/strength of your points.




From: maya...@googlegroups.com <maya...@googlegroups.com> on behalf of AK Eric <war...@sbcglobal.net>
Sent: Monday, November 7, 2016 11:15 AM
To: maya_he3d
Subject: [maya_he3d] MASH: Change distribution of points on a grid?
 
--
You received this message because you are subscribed to the Google Groups "maya_he3d" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maya_he3d+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

AK Eric

unread,
Nov 8, 2016, 12:17:59 AM11/8/16
to maya_he3d, stevi...@hotmail.com
So, that 'sort of' works:  I get the concept behind it.  Unfortunately in practice it doesn't do an even distribution of points within the space.  Unless I'm missing something / doing something wrong.  This is my test case:
  • 50x50 grid of 1-unit cubes on the XY plane (I'm Z-up) with a distance of 100x100.
  • I create a ramp as the weight map:  Make it circular, make the inside white, the outside black adjusting the sliders so it looks like a white circle surrounded by black.
  • What I'd expect to see is a bunch of full sized cubes in a circular shape in the middle, getting smaller as they go out.  
  • Instead, it actually draws it like a teardrop shape, with a bunch of small cubes getting smaller and smaller to the tip of the teardrop.  Which coincidently appears to be the 'origin' of the mash network: If you drag the 'strength' slider from 1->0, it's the point all the cubes shrink to.
I tried the same thing with a 2d noise texture:  Similar result:  There as a strange uneven distribution of the resultant cubes, with more showing up near the 'origin' than the periphery, almost looking like a garden-hose 'spraying out' the points into the noise.

Any other thoughts?  I'll keep tying other things.
Thanks!

AK Eric

unread,
Nov 8, 2016, 12:30:23 AM11/8/16
to maya_he3d, stevi...@hotmail.com
Also gave it a shot using a 'mesh / scatter' distribution and mapping the strength with both a ramp / noise.  Different behavior from above, but still not correct at all.  I'm not sure what it's doing in that case, but it doesn't' look anything like the map I applied ;)

Ian Waters

unread,
Nov 8, 2016, 4:13:06 AM11/8/16
to maya...@googlegroups.com, stevi...@hotmail.com
Hey Erik,

Sounds like there’s a couple of things missing here.

1. If you don’t add your ramp as a projection (right click on ramp > create as projection), you’ll want to check your Map Projection Axis is set to Y (default is Z on the Distribute node).
2. Uncheck the Position and Rotation checkboxes in the Strength roll down.


There’s a general maps tutorial here in case you missed it: https://www.youtube.com/watch?v=FpOkBWWGz5k

Best,
Ian

AK Eric

unread,
Nov 9, 2016, 11:07:18 PM11/9/16
to maya_he3d, stevi...@hotmail.com
Thanks for the info Ian.  And thanks again for all the great tutorials you've posted, they've been really helpful.

I was able to re-create your steps below and got the same result as you.  However, it's not the effect I'm after:  That effect makes all the points in the middle small, and all the points on the outside big based on a fixed distribution of points on a grid.  What I'm trying to do is have fewer points in the middle (where the circle ramp would be black), and more points on the outside (where the circle ramp would be white).  Imagine a magnet dropped the the middle of a box, and it's pushing all the little particles away from it to the edges.  So it's not an even distribution of points across a plane at all.  I would think that having the 'position' checked on and the 'scale' checked off would do that, but instead it turns them into a really odd parabola looking shape, which actually shows up in your video as well.

Maybe this isn't doable via Mash?  Or maybe is via a different method.  But either way I'm guessing you're the guy who knows ;)

Ian Waters

unread,
Nov 10, 2016, 6:05:57 AM11/10/16
to maya...@googlegroups.com, stevi...@hotmail.com
Ahh, I think I understand, this is something we’ll support directly in the future (I have to be careful what I say :)

You could always fake this though (the advantage being it’s very easy to art direct this way).

To make this a square rather then a radial distribution, zero out the Distribute node, then draw a curve square and use a curve node to distribute the boxes along the square curve (turn off the animation speed, and click ‘ignore step’ to fill the curve).

AK Eric

unread,
Nov 10, 2016, 11:22:00 PM11/10/16
to maya_he3d, stevi...@hotmail.com
Thanks again Ian:  I gave this a shot, but I don't have a 'strength' node:  Maybe this is a 2016.5/2017 issue?  I do have a 'mute' node that appears to have the same icon, so I gave it a shot.  Similar results to you, and closer, but still not what I'm after.  In the right direction, but the distribution is still a bit too... weird ;)
I gave the curve method a shot, and... didn't have much luck either.

It's all good.  If this ever gets added in for realz and you remember, post back here and maybe I'll have upgraded Maya by then ;)

thanks!

Hernan S

unread,
Nov 15, 2016, 10:36:22 AM11/15/16
to maya_he3d, stevi...@hotmail.com
Mute was replace for the strength node from 2017 on, its pretty much the same as the Mute node, but now you can control everything in one Node. Plus you have a couple of more options as well.
Reply all
Reply to author
Forward
0 new messages