Randomly Shuffled Texture Tiles

| 8 Comments | No TrackBacks

done2.jpg
This image was created with 3 randomly shuffled tiles. It uses discrete tiled noise

3Tiles2.jpg
...and a limited set of texture map tiles to create the illusion of randomness and variety.

tiledNoise.jpg
Let's begin.

Set up some discrete tiled noise as described here.
Or simply download the Maya 6 scene file discreteNoise.mb from here

You'll need that recipe -- be sure to follow that link!

3Ramps.jpg
Set up a number of V-ramps. You'll need as many ramps as you have tiles to shuffle. If you intend to shuffle 3 texture maps, you'll need three ramps. You are by no means limited to three.

Set the interpolation in the V-ramps to "None" and design them so that they are razor sharp black and white bands. Make sure the white portions of the bands (when all the ramps are considered together) exactly cover [0..1] V-parameter space without either underlapping or overlapping.

shaders1.jpg
Run the quantized noise through the V-ramps by connecting the red channel of the noise outColor to the vCoord of the ramp input.

shaders2.jpg
Notice what happens to the ramps after these connections are made. They become white blocks.

The "lower white-banded" ramp now becomes the set of all noise blocks that were dark gray.

The "middle white-banded ramp" now becomes the set of all noise blocks that were middle gray.

The "upper white-banded" ramp now becomes the set of all noise blocks that were bright gray.

Those blocks will become mattes that will control the presence or absence of one tile or another.

3Tiles.jpg
In effect we tile the objects three times over. Once with a solid grid of nothing but tile A, once with a solid grid of nothing but tile B, and once with a solid grid of nothing but tile C. Tricky compositing (from within the Maya shader) accomplishes the "shuffling."

By multiplying the grid of textures by the appropriate mattes, and by adding all the pieces together with the layered texture node, we cover the entire object with random textures.

almostDone.jpg
If you forget to "repeat tile" the textures, you'll end up with this. The noise is a grid of blocks, so the textures must be a matching grid of blocks.

The noise in this case is tiled into a 10x10 grid, so you'll need to make sure you go into the place2dTexture node of each map and set the "repeats" for the texture tiling so as to create the same 10x10 grid of repeated textures.

done1.jpg
Like so.

Remember: you can add more tiles and more ramps, just make sure you set the ramp spaces accordingly.

By adjusting the ramp ranges, you can skew the proportions by which each tile is represented.

done2.jpg
If you create off-center features in your tiles (like the stars and moons above) and if you enable the "mirror" option in the place2dTexture nodes, you can "jiggle the grid" a little more and further the illusion of variety.

I understand Renderman may have this "shuffled texture" functionality built into it. Maya should add it.

UPDATE 5/25/2009

Here's a Photoshop workflow version that makes an interesting 'maze' or 'circuit.'

No TrackBacks

TrackBack URL: http://www.digitalartform.com/cgi-bin/mt/mt-tb.cgi/44

8 Comments

I think you are missing some steps between 'set up the v ramps' and 'run the quantized noise'.

:)
quite interesting..
but i'm having a little bit of hard time getting mine to work
so, this discreet noise i manage, but it's a bit foggy really, what you've been doing afterwards...
i'm looking for a stain effect.. have an image dispersed like this on a surface
can you add a few more notes on how you 'jiggled' the grid :)
and can you think of a way to gain control on the scaling of each 'cell' - the image inserted in its respective tile..
thank you

"can you add a few more notes on how you 'jiggled' the grid :) "

I don't literally jiggle it in this example; I create the illusion that it is jiggled by putting the star or moon off center in the image. Then when the mirror option is on in the mapping, you never know whether you are getting the tile in which it is original, mirrored, upside-down, or upside-down and mirrored.

HAI,

I AM HAVING A PROBLEM WITH LAYERED SHADER &
LAYERED tEXTURE, RAMP TEXTURE & Ramp Shader.

can u plz give a solution.

Nice tutorial -- except I am having an issue with, of all things, the multiplyDivide node -- it is reading the stochastic noise ramp (with the white squares) as completely black. I tried plugging the ramp into the multiplyDivide node by itself and multiplying by 1, and it still is coming out black. I checked the expression connections, and made sure the operation in the multDiv node was set to multiply. Any ideas as to why the multDiv node would see the noise as black?

Strangely, if I plug the noise ramp into the colors of a checker texture, it comes out as the regular ramp as if it's ignoring the ramp's vcoord connection. If I plug the noise ramp into the colors of a grid texture, it looks correct, with the white squares against black background!

I am using Maya 2009

JCK

Thanks Jonathan.

I haven't upgraded Maya since 7.0 so I can't check it myself, but in general I find that I come across a lot of obscure bugs.

Maya seems to be supported for fairly basic use in a lot of ways, and the percentage of people who care about the errors I find is too small for Maya to care about.

It sounds like you found such an error.

---

off topic - here is a Photoshop variant on the idea you may like. It won't help with the Maya issue, but it's kind of fun...

http://www.digitalartform.com/archives/2009/05/make_a_maze_in.html

Hi Joseph,

I managed to solve my own problem, but the solution completely boggles my mind. I simply swapped the connections to the multiplyDivide node. Instead of plugging the file textures into input1 and the noise ramps into input2, I reversed it: noise ramps -> input1, file textures -> input2. And voila, it worked. So weird! I reversed them back to see if it happened again, and it does. The noise shows up if plugged into input1 of the multDiv node, but not input2. Funny, I always thought that multiplication was commutative, but I guess not in this case!

JCK

Very strange. How 'bout that non-commutative multiplication.

Glad you found it - that was a tricky one

Leave a comment

About this Entry

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

Discrete Tiled 2D Noise was the previous entry in this blog.

Ecorche Figure is the next entry in this blog.

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