question

Mads Drøschler avatar image
Mads Drøschler asked ·

Show & Share(tm) - your OSL shaders!

I figured it could be useful to share some shaders among users.
You know, get it going :)

Here is my first, it's a simplex selfcontained art shader that can be used for camera projections on volumes for example to create interesting procedural forms, you may have seen examples made by Lee Griggs utilizing the technic in the online manual and as private projects.

Link to viewport render of the procedural, I set time scale quite small so large structures remain somewhat unchanged while finer stuctures move, tried to zone in on that blue river in the middle as it has some interesting development. The motion is Fractal Brownian based.
https://i.imgur.com/01ttifU.gifv


Shader is currently 152 code lines long.

Looking forward to see some of your guys shaders!

If your shader is finished, please share the code!

1.jpg (1.3 MiB)
2.jpg (1.3 MiB)
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Mads Drøschler avatar image
Mads Drøschler answered ·

Code to do a nice Albedo extraction from badly lit textures.
I had to look around for some days, until I understood the concept and had a hole through to a useful output.


This is the main blender, which is essentially a highpass filter with a lumniosity blend, the latter was what created some head scratching, but got it working.

If you want to patch in content make sure your Arnold Auto Mip is set to ON, as the texture calls needed needs to be mipable.

So you need to do a highpass filter that gets blended correctly.


Ill ship a stand alone Albedo texture generator soon.



color luminosity( color s, color d )
{
float dLum = dot(d, color(0.3, 0.59, 0.11));
float sLum = dot(s, color(0.3, 0.59, 0.11));
float lum = sLum - dLum;
color c = d + lum;
float minC = min(min(c[0], c[1]), c[2]);
float maxC = max(max(c[0], c[1]), c[2]);
if(minC < 0.0) return sLum + ((c - sLum) * sLum) / (sLum - minC);
else if(maxC > 1.0) return sLum + ((c - sLum) * (1.0 - sLum)) / (maxC - sLum);
else return c;

}

shader Luminosity
(
color source = 0,
color backdrop = 0,
output color Out = 0,

)
{

Out = luminosity(source,backdrop);

}



vvv.gif (1.9 MiB)
Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Mads Drøschler avatar image
Mads Drøschler answered ·

OSL Triplanar map in the works!

Got all kinds of sub features, propegrate random instances with different random values and a pass generator, Extracting PBR data from the input.


Here is shown some practical auto things like getting rid og super bad lit texture light, as well as removing seams, making the ugly input texture a decent uniform texture almost automatically.


Slides into a PBR chain.



qweqwe.gif (1.1 MiB)
xx.png (103.3 KiB)
Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Mads Drøschler avatar image
Mads Drøschler answered ·

Kif fractal base. 3dsmax viewport, no PBR. Displaced and diffuse colored only.

This thing can morph into all kinds of things and it's very easy to get something going from default setup.

Ill probably do some iterations on it and upload some more examples at a point and the shader of course.


qwe.png (1.7 MiB)
Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Mads Drøschler avatar image
Mads Drøschler answered ·

Working on an OSL Curvature shader.
Using Arnold Curvature as refference.
I still have some things to solve, but it's looking better today than it did yesterday.



aaaaa.png (1.3 MiB)
3 comments Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

I am up to test this if you need some beta testers ;)

I use curvature a lot for my materials

0 Likes 0 · ·

Ah, great.
Ill make sure you get your hands on it soon :)
I REALLY need to make a new update on the arnold converter, been putting it off for too long, got a long list of mails from people complaining about 2021 support among other things.

0 Likes 0 · ·

I am just using Max 2021 now, so I can give you hand with that. I will check with you on Discord.

0 Likes 0 · ·
Zeno Pelgrims avatar image
Zeno Pelgrims answered ·

Great idea, cool shader.

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Paolo Giandoso avatar image
Paolo Giandoso answered ·

What a great idea!

Does anyone have a Parallax Occlusion shader working for mtoa?

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.