Page 1 of 1

OSL RandomBitmap

Posted: Wed Aug 04, 2021 4:37 am
by DartFrog
I'm on 2020 1.5 / 10.20 for 3dsmax

I've been messing with the existing OSL shaders that come with max 2021. Some of the ones I want to work natively with Octane just error out. I'm trying to get a functioning Random Bitmap placer (like a decal placer that rotates and scales as it populates). I can get the 3dsmax one to work in the bitmap slot but its resolution is entirely dependent on the values you set in the RGB image since it's basically just baking it. Octane has a native OSL texture node but most things I've tried don't work with it. I commented out some code that was giving the error but I can't get RandomBitmap.osl to actually do anything I want once its open. Is there a decent library of OSL shaders out there for Octane?

Re: OSL RandomBitmap

Posted: Wed Aug 04, 2021 10:21 am
by pxlntwrk
Hi,
for random bitmap, you can use an Octane random texture node plugged to a Octane gradient node in complex mode.

Cheers

Re: OSL RandomBitmap

Posted: Wed Aug 04, 2021 11:27 am
by DartFrog
I set it up like the attached image. Is this right? I want the rotation and position to be sort of randomized.

Re: OSL RandomBitmap

Posted: Wed Aug 04, 2021 1:40 pm
by pxlntwrk
re,

for rotation and transform plugg the texture to an UVW transform node and plugg it to the gradient next slot and redo for more randomness...
Sorry I'm not in front of screen, I will post an example , but it will after summer break.

Cheers

Re: OSL RandomBitmap

Posted: Wed Aug 04, 2021 6:31 pm
by DartFrog
Okay - I'm still messing with it but I don't know how to randomize the UV placement. Whenever you get back, see if you can set something up.

Re: OSL RandomBitmap

Posted: Mon Sep 13, 2021 2:16 pm
by pxlntwrk
Hi,
sorry for the latency, I struggled to recover from vacation :)
Here is an example of how to randomize textures and rotation over clone scatter.
Image

Image

you can use the same method by adding translation and / or scale values in the values of the UVW-Transform node, and also add or remove transformation steps by changing the number of variations of the gradient.

I attach the Orbx file in case

Cheers