Discrete Tiled 2D Noise

| 8 Comments

tiledNoise.jpg
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.

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

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

discreetNoise2.jpg
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.

Download Maya 6 scene file discreteNoise.mb

done2.jpg
Read on to see how

8 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

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.

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.

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

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.

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.

You need to use the expression editor, not the script editor (Window -> Animation editors -> Expression editor). Expression syntax is different from script syntax. If you want to do it in the script window, you need to use the setAttr and getAttr commands.

JCK

But its not working with mentalray. Why ?

Leave a comment

About this Entry

This page contains a single entry by published on December 29, 2004 4:31 PM.

Lollipop Mapping was the previous entry in this blog.

Randomly Shuffled Texture Tiles is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.