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

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: 1536
    • 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: 1536
    • 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