Overview of OSL Shaders in Octane

Forums: 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.

Re: Overview of OSL Shaders in Octane

Postby FrankPooleFloating » Thu Dec 21, 2017 1:55 am

FrankPooleFloating Thu Dec 21, 2017 1:55 am
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
User avatar
FrankPooleFloating
Licensed Customer
Licensed Customer
 
Posts: 1669
Joined: Thu Nov 29, 2012 3:48 pm

Re: Overview of OSL Shaders in Octane

Postby leehenshall » Mon Feb 05, 2018 5:35 pm

leehenshall Mon Feb 05, 2018 5:35 pm
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
Licensed Customer
 
Posts: 183
Joined: Sun Oct 25, 2015 5:44 pm
Location: England

Re: Overview of OSL Shaders in Octane

Postby leehenshall » Mon Feb 05, 2018 5:43 pm

leehenshall Mon Feb 05, 2018 5:43 pm
Found this?

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

Can this be applied to Octane?

blendertoon.JPG
leehenshall
Licensed Customer
Licensed Customer
 
Posts: 183
Joined: Sun Oct 25, 2015 5:44 pm
Location: England

Re: Overview of OSL Shaders in Octane

Postby leehenshall » Mon Feb 05, 2018 6:13 pm

leehenshall Mon Feb 05, 2018 6:13 pm
leehenshall
Licensed Customer
Licensed Customer
 
Posts: 183
Joined: Sun Oct 25, 2015 5:44 pm
Location: England

Re: Overview of OSL Shaders in Octane

Postby SergKlyosov » Mon Apr 02, 2018 9:16 pm

SergKlyosov Mon Apr 02, 2018 9:16 pm
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
SergKlyosov
Licensed Customer
Licensed Customer
 
Posts: 126
Joined: Wed Mar 01, 2017 9:33 am

Re: Overview of OSL Shaders in Octane

Postby roeland » Fri Apr 06, 2018 2:03 am

roeland Fri Apr 06, 2018 2:03 am
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?
User avatar
roeland
OctaneRender Team
OctaneRender Team
 
Posts: 1810
Joined: Wed Mar 09, 2011 10:09 pm

Re: Overview of OSL Shaders in Octane

Postby SergKlyosov » Thu Apr 12, 2018 11:55 am

SergKlyosov Thu Apr 12, 2018 11:55 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
SergKlyosov
Licensed Customer
Licensed Customer
 
Posts: 126
Joined: Wed Mar 01, 2017 9:33 am

Re: Overview of OSL Shaders in Octane

Postby coilbook » Thu Apr 12, 2018 1:56 pm

coilbook Thu Apr 12, 2018 1:56 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
coilbook
Licensed Customer
Licensed Customer
 
Posts: 2985
Joined: Mon Mar 24, 2014 2:27 pm

Re: Overview of OSL Shaders in Octane

Postby paride4331 » Fri Apr 13, 2018 7:17 am

paride4331 Fri Apr 13, 2018 7:17 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?
https://render.otoy.com/forum/viewtopic.php?f=27&t=66015
Regards
Paride
2 x Evga Titan X Hybrid / 3 x Evga RTX 2070 super Hybrid
User avatar
paride4331
Octane Guru
Octane Guru
 
Posts: 3689
Joined: Fri Sep 18, 2015 7:19 am

Re: Overview of OSL Shaders in Octane

Postby coilbook » Fri Apr 13, 2018 4:14 pm

coilbook Fri Apr 13, 2018 4:14 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?
https://render.otoy.com/forum/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
coilbook
Licensed Customer
Licensed Customer
 
Posts: 2985
Joined: Mon Mar 24, 2014 2:27 pm
PreviousNext

Return to Development Build Releases


Who is online

Users browsing this forum: No registered users and 7 guests

Thu Apr 18, 2024 3:30 am [ UTC ]