Any way to randomise gamma within texture tiling?

I want to add a bit pf patchy variation across a fabric surface to simulate panels stitched together. Im looking for a way either with corona or some OSL shaders that would let me randomise the gamma of a single tiling bitmap so every time it tiles its slightly different. Has anyone got any ideas on how this might be achieved?

I wouldn’t over-complicate it with gamma?

That being said: Some combination of MultiMap plugged into the UVW?

Or do a floor-gen on the object (so long as it’s a flat surface, probably isn’t?) and do a multimap onto that?

Its swagged fabric for large canvas tents like circus tents so im trying to get it to look slightly patchy so floorgen just wouldnt work.
I cant see a way that multimap would be able to provide randomisation to normal tiling as there isnt a mode for it which is why i wonder about the OSL route but i have no idea how much of OSL corona supports.

Is it possible for you to attach a scene file or a reference Image showcasing what exactly you are trying to achieve?

Looking forward to it.

Regards,
Avi

Multimap has gamma randomization which you can use even with a single item.
If you are using the UVW Randomizer for the tiling randomization, you can plug this UVW Randomizer into Multimap, enable the gamma variation, profit!

@Maru - This will only work on instances, primitives or mesh elements. NOT on a surface.

I believe OP is asking for a slight color-variance on every repeated bitmap/tile, based on the map-size/UV-size rather than geometry. Would be usefull to give more natural variation on f.ex. grass, dirt and fabric.

I think there is an OSL map dooing this - but I’m not sure.

Regards

Would be cool if there would be a simple OSL solution. Currently I would still do that kind of variation (and more) using BerconTile + MultiMap.

Good Luck

While it’s probably doable with OSL - not sure if any map shipping with Max currently can do this - a Per-Tile mode, where each tile gets handled differently would be a neat addition to the MultiMap. It could be used to add some variance in any regularly tiling map like fabric, grids etc with ease.

Maybe you should apply KISS principle here? You can randomize everything that way, gamma, hue, saturation, etc. Imagination is the limit :]


Hi romullus. Looks great. How is this set up?

Yeah, thought about this as well, but you need the bitmap to be bigger than what you’ll show because this one will tile as well. Might work depending on the case, but it’s probably really easy to setup.

Okay - figured it out. But this will not work with the UVW-Randomnizer on top.

Personally I would love a solution where one could patch and randomnize sveral different bitmaps on one surface.

Regards

There’s nothing to it, really. Bitmap is tiled 10 times, so to match this i set tiles count to 10 by 10 (note that tiling in coordinates rollout needs to be left at default in order to get proper randomisation), then it’s up to you how you want it to mix it with bitmap, in this case i used Corona mix in softlight blend mode, but you can use native mix, composite, or even RGB multiply, mask and any combination of them.

The bitmap is tiling the same number of times as the tiles map in this case, but it’s not crucial, since the bitmap is seamless so you don’t have to match their tiling. One can be tiled 5 times and the other 7 times and you won’t notice anything strange.

Why would you need UVW randomizer in this example? You can’t randomize transformation of fabric texture and get sensible result anyway.

no, I don’t need it in this example. But with other things like f.ex. ground materials that would be neet :smiley:

But why would you want straight square random gamma/hue patches on ground material? Doesn’t sound very realistic to me :] Wouldn’t it be better to apply same principle like above, just replace tiles map with noise, or some grunge texture? I’m struggle to think about scenario where random texture transformation would also require HSL randomisation per tile, but even if there are such, they probably are highly specific and wouldn’t justify cluttering already crowded UI of UVWRandomization texmap.

No, you are right. Square random gamma/hue patches on ground material doesn’t make much sence. Unless we get a way to add noise to the randomization edges - like the OSL randomization-map.

Regards

Let’s say you have a regular pattern for displacement, something that tiles of course, a grid for example, and you need to introduce some irregularities. I’d use that tiled map and compose a noise map over it, using a circular mask which blends to black on its borders so the noise isn’t visible on tile borders. The multimap would introduce different brightness/gamma to that circular map so each grid tile center would get variable contribution from the noise.

Maybe you remember the disco tile map from cebas, it was part of finalrender a long time ago. I had one job where I needed exactly this map. This mode would allow easy creation without workarounds. Of course, it was doable in other ways but not as easily.

I don’t want to clutter the thread with my own thoughts but I happen to think that a way to randomize map properties without randomizing UVs might indeed be useful.

You don’t clutter the thread at all. If there’s a need to improve funcionality of Corona tools, then users discussions is one of the way to make developers notice that.

Hi everyone I believe we have something similar logged that should cover this as well.

(Report ID=CRMAX-734)