Overview of OSL Shaders in Octane

A forum where development builds are posted for testing by the community.
Forum rules
NOTE: The software in this forum is not %100 reliable, they are development builds and are meant for testing by experienced octane users. If you are a new octane user, we recommend to use the current stable release from the 'Commercial Product News & Releases' forum.
Post Reply
User avatar
FrankPooleFloating
Licensed Customer
Posts: 1669
Joined: Thu Nov 29, 2012 3:48 pm

Has anyone used osl/toon stuff to do any technical drawing type renders by any chance?.. I have to bang out a couple in the next couple weeks, and ordinarily I would render something and trace it in AI, which is rather time-consuming...
Win10Pro || GA-X99-SOC-Champion || i7 5820k w/ H60 || 32GB DDR4 || 3x EVGA RTX 2070 Super Hybrid || EVGA Supernova G2 1300W || Tt Core X9 || LightWave Plug (v4 for old gigs) || Blender E-Cycles
leehenshall
Licensed Customer
Posts: 184
Joined: Sun Oct 25, 2015 5:44 pm
Location: England
Contact:

Outlines via OSL might be a good companion for the new toon shader. I've not seen any OSL shaders for this type of thing yet.
leehenshall
Licensed Customer
Posts: 184
Joined: Sun Oct 25, 2015 5:44 pm
Location: England
Contact:

Found this?

https://www.blendswap.com/blends/view/67827

Can this be applied to Octane?
blendertoon.JPG
SergKlyosov
Licensed Customer
Posts: 126
Joined: Wed Mar 01, 2017 9:33 am

Hi guys,

Can anyone write OSL which allows to use UDIM inside octane?
I think is highly requested feature and seems it won't be implemented soon as core function, so maybe there is some way to do it with OSL now?

Thank you
Win 10 64 | RTX 3090 | i9 9980XE | 64GB RAM
User avatar
roeland
OctaneRender Team
Posts: 1822
Joined: Wed Mar 09, 2011 10:09 pm

It won't be a core feature in 3.08.

You can achieve tiling with OSL but you'd have to create a long shader which picks the right tile from a list of inputs.

Code: Select all

shader Tiles_2_by_4(
    string Tile_1_1 = "",
    string Tile_1_2 = "",
    string Tile_1_3 = "",
    string Tile_1_4 = "",
    string Tile_2_1 = "",
    string Tile_2_2 = "",
    string Tile_2_3 = "",
    string Tile_2_4 = "",
    output color c = 0)
{
    string f;
    float modU = u * .25;
    modU -= floor(modU);
    float modV = v * .50;
    modV -= floor(modV);
    
    if (modU < .25)
    {
        if (modV < .50) { f = Tile_1_1; }
        else            { f = Tile_2_1; }
    }
    else if (modU < .50)
    {
        if (modV < .50) { f = Tile_1_2; }
        else            { f = Tile_2_2; }
    }
    else if (modU < .75)
    {
        if (modV < .50) { f = Tile_1_3; }
        else            { f = Tile_2_3; }
    }
    else
    {
        if (modV < .50) { f = Tile_1_4; }
        else            { f = Tile_2_4; }
    }
    
    c = texture(f, u - floor(u), v - floor(v), "wrap", "clamp");
}
In practice in the standalone you'd build up that shader with a Lua script.

The next step is getting the image files connected. How much tiles would you have in the typical UDIM shader, and how do you get them in and out of other programs?
SergKlyosov
Licensed Customer
Posts: 126
Joined: Wed Mar 01, 2017 9:33 am

Thank you a lot, Roeland!
It is magnificent! :)

BTW, I have one question
In Octane we have two different type of image nodes: RGB Image and Greyscale image
And there is a pretty huge difference of using VRAM between those two types.
1)If I'm using the same monochrome 8K map from MARI and plug it in to RGB image - scene cost 1.3GB of VRAM
2) if I'm using the same monochrome 8K map from MARI and plug it in to Greyscale image - scene cost 0.5GB of VRAM

So how I can change type of output in that OSL code? Cause obviously if I use this OSL with bump, roughness etc - I don't need RGB image output

Thank you so much for the help

Cheers
Attachments
VramUsage.jpg
Win 10 64 | RTX 3090 | i9 9980XE | 64GB RAM
coilbook
Licensed Customer
Posts: 3031
Joined: Mon Mar 24, 2014 2:27 pm

can anyone make a sparkle shader like for snow? Or can otoy do it? I think it is a very necessary shader Thank you
User avatar
paride4331
Octane Guru
Posts: 3797
Joined: Fri Sep 18, 2015 7:19 am

coilbook wrote:can anyone make a sparkle shader like for snow? Or can otoy do it? I think it is a very necessary shader Thank you
Hi coilbook,
could flake osl to help?
viewtopic.php?f=27&t=66015
Regards
Paride
2 x Evga Titan X Hybrid / 3 x Evga RTX 2070 super Hybrid
coilbook
Licensed Customer
Posts: 3031
Joined: Mon Mar 24, 2014 2:27 pm

paride4331 wrote:
coilbook wrote:can anyone make a sparkle shader like for snow? Or can otoy do it? I think it is a very necessary shader Thank you
Hi coilbook,
could flake osl to help?
viewtopic.php?f=27&t=66015
Regards
Paride
Thanks Paridie but how can you make those flakes sparkle. I tried mix texture with flake as a mix texture and they still dont sparkle at angles like in this video https://youtu.be/qpPQk5fNrho?t=1m10s

also I thought it is a procedural material why mapping looks off where circles are oval.

Thank you
Attachments
flake color.jpg
mapping .jpg
Post Reply

Return to “Development Build Releases”