Author Topic: Exterior windows OSL shader  (Read 20910 times)

2018-04-19, 12:37:12

Monkeybrother

  • Active Users
  • **
  • Posts: 232
    • View Profile
Hi. Anyone here proficient in OSL? Maybe someone could convert this to work with Corona?, it would be an incredible time saver. I tried myself, but no luck.
https://lesterbanks.com/2017/10/free-windowbox-shader-map-interiors/

2018-04-19, 19:45:13
Reply #1

danio1011

  • Active Users
  • **
  • Posts: 361
    • View Profile
That looks amazing and would be a huge help...

2018-04-19, 21:12:47
Reply #2

pokoy

  • Active Users
  • **
  • Posts: 1861
    • View Profile
Did you try in max 2019 and it doesn't work with Corona or is this a general request? If a request, have a look here, OSL shader for max 2019: http://forums.cgsociety.org/showthread.php?p=8390295#post8390295

2018-04-20, 07:25:01
Reply #3

Monkeybrother

  • Active Users
  • **
  • Posts: 232
    • View Profile
Did you try in max 2019 and it doesn't work with Corona or is this a general request? If a request, have a look here, OSL shader for max 2019: http://forums.cgsociety.org/showthread.php?p=8390295#post8390295

That's the one I tried, and linked to. It comes with versions for Blender, Arnold and VRay, but none of them do anything in Corona.

2018-04-20, 07:26:09
Reply #4

Monkeybrother

  • Active Users
  • **
  • Posts: 232
    • View Profile
That looks amazing and would be a huge help...

Yes, it would save so much work for exterior shots.

2018-04-20, 08:29:03
Reply #5

Philip kelly

  • Active Users
  • **
  • Posts: 513
    • View Profile
    • Sketchrender
would be very handy.
Dell Precision T7910

2018-05-03, 13:29:11
Reply #6

STHA

  • Active Users
  • **
  • Posts: 22
    • View Profile
Has anyone managed to use the OSL shaders in Max2019?.

It seems the compiled 2019 berconmaps keeps crashing , so I just managed to get the OSL noise working, but it only works in the displacement of corona mtl and not the bump?.

Sounds way too technical for me, even after watching Zaps tutorials.

Anyone have a solution it would be appreciated. Thanks.

2018-05-03, 13:43:54
Reply #7

pokoy

  • Active Users
  • **
  • Posts: 1861
    • View Profile
Check if you need to increase the bump amount. I remember OSL bump output was *very* weak for some reason, I thought it was fixed but maybe not.

Also, if you only need the noises form BerconMaps, try the free Siger Noise map, it's based on Bercon and gets actively updated/recompiled:
https://www.sigerstudio.eu/sigertexmaps-sigernoise/

2018-05-03, 14:07:47
Reply #8

STHA

  • Active Users
  • **
  • Posts: 22
    • View Profile
Yes, I tried pushing the bump to the maximum and it doesnt work. Strange.

I forgot about sigernoise, but currently it is only upto 2018. I guess I will have to wait once he has recompiled.

Thanks.

2018-05-03, 14:31:15
Reply #9

pokoy

  • Active Users
  • **
  • Posts: 1861
    • View Profile
Yes, I tried pushing the bump to the maximum and it doesnt work. Strange.

I forgot about sigernoise, but currently it is only upto 2018. I guess I will have to wait once he has recompiled.

Thanks.
I thought the 2019 were available already, sorry.

Can you save out a simple scene with the OSL noise where bump doesn't work? I'd like to inspect and have someone look at it.

2018-05-03, 15:01:46
Reply #10

STHA

  • Active Users
  • **
  • Posts: 22
    • View Profile
sorry, I deleted the file as it was just a test. I recreated it.

Scene is Just a sphere, with two lights.

Here are some screen grabs.
Max 2019
Corona 1.7 (4)


2018-05-03, 15:07:09
Reply #11

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8834
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Did you try to plug it trough CoronaBumpConverter map? Would that help?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2018-05-03, 15:45:58
Reply #12

STHA

  • Active Users
  • **
  • Posts: 22
    • View Profile
Yes, that seems to have solved the problem.

Thanks Romullus.

2018-05-03, 16:07:42
Reply #13

pokoy

  • Active Users
  • **
  • Posts: 1861
    • View Profile
Ok, some thoughts - I've tested all noises and they worked (in beta), only OSL bump output was very weak, not only for Corona but for all renderers. When I tested after 2019 release the bump output was stronger, so that was probably fixed.

In your case, the 3D OSL noise should work as this one works in object space - please test this one.

The OSL noise you're using is 2D, so you may have to define the mapping by connecting an OSL UVW node to the UVW slot of the 2D noise. See if that works without the BumpConverter.
Then again, OSL defaults to map channel 1 if no UVW input is defined so it should have worked since the sphere primitive defines UVs for channel 1 by default as well. So not sure why it didn't work for bump while it works for displacement... Still, try with a UVW node in the OSL noise UVW slot and see if that helps.

2018-05-03, 17:11:13
Reply #14

STHA

  • Active Users
  • **
  • Posts: 22
    • View Profile
No, it does not work.

I tried both Noise and Noise 3D. without bumpconvertor there is no reaction.

OSL - Named Coord Space reacts with displacement and so does UvWrowoffset when plugged in with Named Coord Space.

Thanks.


2018-05-03, 18:28:22
Reply #15

pokoy

  • Active Users
  • **
  • Posts: 1861
    • View Profile
Ah well, it definitely worked before with Corona. Wonder what happened in between. I guess it works with Scanline/Arnold... will need to test that for myself. Thanks!

2018-05-14, 11:29:10
Reply #16

Monkeybrother

  • Active Users
  • **
  • Posts: 232
    • View Profile
I got it working enough to be usable. You need to make some very minor changes to the VRay version to make it work in Corona: remove the first line and go through the code and remove references to VRay. If anyone wants it, I can upload the modified file later.

The attached image is a bunch of instanced planes with a Corona Multimap randomizing the diffuse bitmap.

2018-05-14, 11:34:53
Reply #17

NicolasC

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 539
  • CG supervisor / teacher / artist
    • View Profile
Amazing, Monkeybrother ! I'm definitely interested in testing your modified file, please :)

Regards.
Nicolas Caplat
CG supervisor / teacher / artist

2018-05-14, 14:18:19
Reply #18

Monkeybrother

  • Active Users
  • **
  • Posts: 232
    • View Profile
Amazing, Monkeybrother ! I'm definitely interested in testing your modified file, please :)

Regards.

Sure, attaching .osl file. It seems to be a bit sensitive, as in you have to do things the right way. If I made a big subdivided box and added a "per face" uvw map, it doesn't work (even if I unwelded vertices or even detached every face), and if I resize the polygon after applying the uv map it stretches and bends (it shouldn't happen, but I haven't investigated). So for best result: create a plane with the correct size, apply material and uv's ("per face" or "planar"), instance it. I've just done some quick tests, so I'm sure there's an explanation.

I'm not 100% sure that the attached file is the latest one, the one I'm using, but let me know if it doesn't work. Hopefully someone can make a less hacky version.

2018-05-14, 15:05:11
Reply #19

NicolasC

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 539
  • CG supervisor / teacher / artist
    • View Profile
Thank you ! I'll give it a try as soon as I my current project is over ;)
Nicolas Caplat
CG supervisor / teacher / artist

2018-05-15, 14:27:20
Reply #20

Christa Noel

  • Active Users
  • **
  • Posts: 911
  • God bless us everyone
    • View Profile
    • dionch.studio
hi, is there any way to make older max compatible with osl? something like plugins??

2018-05-15, 14:54:56
Reply #21

Monkeybrother

  • Active Users
  • **
  • Posts: 232
    • View Profile
hi, is there any way to make older max compatible with osl? something like plugins??

I don't think so, it was the only big update in Max 2019 (if you don't like 90's looking procedural wood).

2019-09-10, 13:43:52
Reply #22

demkin

  • Users
  • *
  • Posts: 4
    • View Profile
I got it working enough to be usable. You need to make some very minor changes to the VRay version to make it work in Corona: remove the first line and go through the code and remove references to VRay. If anyone wants it, I can upload the modified file later.

The attached image is a bunch of instanced planes with a Corona Multimap randomizing the diffuse bitmap.

So, what should the material look like in the coronarendor so that the OSL would work

2019-10-09, 06:57:54
Reply #23

danio1011

  • Active Users
  • **
  • Posts: 361
    • View Profile
I realize this thread is a little old but I'm hoping to make this work.  I downloaded the OSL and plugged it into the diffuse slot on a Corona material and got an error.  I notice the OSL file still has a number of references to VRay in it.  Has anyone had any luck here?  I'll keep tweaking in the meantime...

Thanks!
Daniel

2019-10-09, 13:18:20
Reply #24

burnin

  • Active Users
  • **
  • Posts: 1537
    • View Profile
Fun fact: Corona doesn't support OSL. ;)

Check forum posts:

support OSL
Ondra: "lets close this until corona goes VFX way"

Better OSL Support for 3dsmax 2019
Ondra: "Hi,
there is no OSL API for 3dsmax 2019 published. We (and any other renderer) have no way to support the required trace() call other than doing OSL support from scratch, independently from Autodesk, and just using its UI. Same thing with fluids - no API, means we cannot support it"


2019-10-09, 17:14:50
Reply #25

danio1011

  • Active Users
  • **
  • Posts: 361
    • View Profile
Fun fact: Corona doesn't support OSL. ;)

Check forum posts:

support OSL
Ondra: "lets close this until corona goes VFX way"

Better OSL Support for 3dsmax 2019
Ondra: "Hi,
there is no OSL API for 3dsmax 2019 published. We (and any other renderer) have no way to support the required trace() call other than doing OSL support from scratch, independently from Autodesk, and just using its UI. Same thing with fluids - no API, means we cannot support it"


Are you sure that info is still valid?  Aside from Monkeybrother's screenshot showing it working in Corona I'm able to render out some of the stock OSL maps in Max 2020 (checker, candy, etc.)  I might be wrong but it seems like it's working to me.  It's just the Window OSL that is kicking an error.

Thanks,
Daniel

2019-10-09, 20:04:30
Reply #26

burnin

  • Active Users
  • **
  • Posts: 1537
    • View Profile
Indeed, I'm wrong.

Quote
OSL works in any renderer supporting the regular 3ds Max shading API (Scanline, vRay, Corona, etc.). It also works outside of renderers, anywhere in 3ds Max where a regular map is requested, such as in the Displacement modifier.
(source)

My bad.

2019-10-09, 22:36:39
Reply #27

Monkeybrother

  • Active Users
  • **
  • Posts: 232
    • View Profile
I forgot about this post. I've been away from Max/Corona for a while, but if I update it (before someone else does it), I'll post the file and an example scene.

2019-10-10, 03:31:28
Reply #28

danio1011

  • Active Users
  • **
  • Posts: 361
    • View Profile
I forgot about this post. I've been away from Max/Corona for a while, but if I update it (before someone else does it), I'll post the file and an example scene.

Oh, great!  Thank you!!

2019-11-06, 12:08:31
Reply #29

peterguthrie

  • Active Users
  • **
  • Posts: 250
    • View Profile
    • Peter Guthrie Visualisation

2019-11-06, 14:05:46
Reply #30

sprayer

  • Active Users
  • **
  • Posts: 794
    • View Profile
anyone managed to get this working?
Here working scene in corona
https://we.tl/t-BDu28lchBs

place before OSL file in C:\Program Files\Autodesk\3ds Max 20xx\OSL

2019-12-17, 16:06:35
Reply #31

artmaknev

  • Active Users
  • **
  • Posts: 147
    • View Profile
    • about me
Do you still have that link? would be helpful!
Thanks,

2021-03-12, 20:43:35
Reply #32

artmaknev

  • Active Users
  • **
  • Posts: 147
    • View Profile
    • about me
Hello guys,

Well, I have been obsessed with parallax for the past year, and finally got some nice results. 

Will have more info soon :)





« Last Edit: 2021-03-12, 20:47:57 by artmaknev »

2021-03-13, 15:04:56
Reply #33

NicolasC

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 539
  • CG supervisor / teacher / artist
    • View Profile
Wow !! nice result, artmaknev :)
So you managed to get it working with Corona ? pretty interested in that stuff ;)
Nicolas Caplat
CG supervisor / teacher / artist

2021-03-13, 16:34:50
Reply #34

artmaknev

  • Active Users
  • **
  • Posts: 147
    • View Profile
    • about me
hi NicolasC, yes it works for corona, I am putting together a free scene and will share it here in couple of days.

glad you like it :)

2021-03-13, 21:00:15
Reply #35

dfcorona

  • Active Users
  • **
  • Posts: 292
    • View Profile
That's great, I couldn't get it working.

2021-03-14, 11:49:55
Reply #36

NicolasC

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 539
  • CG supervisor / teacher / artist
    • View Profile
hi NicolasC, yes it works for corona, I am putting together a free scene and will share it here in couple of days.

glad you like it :)
Amazing ! vey kind from you, I can't wait ;)

Regards.
Nicolas Caplat
CG supervisor / teacher / artist

2021-03-14, 16:38:34
Reply #37

Mohammadreza Mohseni

  • Active Users
  • **
  • Posts: 152
    • View Profile
    • Instagram
a little play with it. I will have so much fun with it.

« Last Edit: 2021-03-14, 16:45:40 by Mohammadreza Mohseni »

2021-03-15, 21:50:53
Reply #38

artmaknev

  • Active Users
  • **
  • Posts: 147
    • View Profile
    • about me
Hi all, here is the free scene!

https://gum.co/YyRmU

It is part of wParallax.com you can check it out :D

Enjoy!

2021-03-16, 09:46:12
Reply #39

NicolasC

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 539
  • CG supervisor / teacher / artist
    • View Profile
You rule !
Thanks a lot for sharing, artmaknev :)
Nicolas Caplat
CG supervisor / teacher / artist