« Lollipop Mapping | Main | Randomly Shuffled Texture Tiles »
December 29, 2004
Discrete Tiled 2D Noise

If you quantize the noise function into discrete tiles, you can do all sorts of fun things with it. Let's look at how to do this here, and why you'd want to do this in the next entry.

Start with continuous 2D (UV-based) noise.

Disconnect the usual connection by which the noise function gets its UV information.

Open the Expression Editor, and enter the following equations:
noise1.uCoord=trunc(place2dTexture1.outU*10)/10;
noise1.vCoord=trunc(place2dTexture1.outV*10)/10;
The Hypershade will create an Expression Node and connect it accordingly.
Congratulations, you now have quantized noise. If you use it right, you can do things like create "shuffled" texture tiles.
Posted by digital artform at December 29, 2004 04:31 PM
Comments
This is an excellent technique, I put it into a script and have been toying with different combinations.... it does appear to cause maya to crash when used in conjunction with transparency though??? not sure if its something that I am doing wrong
Posted by: charles at May 12, 2005 03:50 PM
Thanks.
Does it crash? I'm not surprised. I had trouble with related workflows. Any time you stray too far away from the standard Maya workflow, you rapidly run into bugs.
Posted by: Joseph Francis at May 12, 2005 04:56 PM
OK I have just now gotten around to getting in the texturing space again, and have been trying to figure out this crashing issue...... it appears that a crash can occur by just having this setup be in the same scene twice.... so I wonder if that eludes to anything. I discovered this be trying to add/multiply the networks together.
Posted by: charles at October 8, 2005 08:14 PM
hi i am new. i am trying to folow this tut in order to acheave a bricked wall texture. however when i enter the equations in the script editor returns an error smthing like :
// Error: noise1.uCoord=trunc(place2dTexture1.outU*10)/10;
//
// Error: Invalid use of Maya object "place2dTexture1.outU". //
// Error: noise1.vCoord=trunc(place2dTexture1.outV*10)/10;
//
// Error: Invalid use of Maya object "place2dTexture1.outV". //
and of course it doesn't create the equation node. am i missunderstanding smthing? or is it because i am using maya 7.0?
10x
Comma
Posted by: comma at October 15, 2005 06:22 AM
Do you think that you could add a projection node (with possibly a place3DTexture node) to add another form of control further down the network? I tried doing this and am not sure that I know what I am doing.
Posted by: charles at December 23, 2005 08:27 PM
The point is that I just cant figure out how to truncate a value with standard Maya nodes.
No crashes on my system but I think the issue is because mel is not evaluated conveniently in time. Maybe gotta trick the time or wait for mathNodeExpand for Maya 7 for a nodal (non-mel)implementation wich may even work with Mental Ray I hope... Stuck there.
Posted by: UrbnCTZn at January 6, 2006 08:35 AM
