Author Topic: Corona can't interpret OSL 'screen' space properly  (Read 1007 times)

2018-09-01, 22:42:42

chopmeister

  • Active Users
  • **
  • Posts: 59
    • View Profile
    • Polymachine
So, in 3dsmax 2019 (obviously) when you're using OSL shaders, you have several spaces available such as 'raster', 'world', 'object' and 'screen'.

I was trying to write a shader which maps an image from edge to edge in screen space and couldn't seem to do it, until I tried a different renderer and realized my shader was good all along, and it was Corona mishandling it.

To reproduce: Plug a named space node into a bitmap lookup, and set the space to 'screen'. Plug the bitmap into any kind of material and render with Corona VS any other renderer. I tested Arnold, Scanline and Vray, which all render it correctly.

Test video with Arnold:

https://drive.google.com/open?id=11prmlt8SAwfL0-S5S4K41saW4pUlp2jg

Test with Corona:

https://drive.google.com/open?id=1naitThKPvlPSSk6R1mwUES0gwxZ6bRfv

2018-09-04, 16:59:03
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9845
  • Marcin
    • View Profile
Thanks for a nice report. We will try to reproduce this, and will get back to you if we need some help (personally I haven't touched OSL yet...).

2018-09-04, 17:12:28
Reply #2

chopmeister

  • Active Users
  • **
  • Posts: 59
    • View Profile
    • Polymachine
Any time. :) I have a suspicion that anything coming from an OSL map doesn't work in a CoronaMtl bump slot either, but I gotta test this some more and see if it may be easily circumvented somehow.
 

2018-09-05, 13:10:13
Reply #3

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9845
  • Marcin
    • View Profile
Reproduced the 1st issue with screen mapping.
If you can confirm the 2nd one with bump maps, please let us know, and then we will look into it.

2018-09-05, 13:46:38
Reply #4

pokoy

  • Active Users
  • **
  • Posts: 1499
    • View Profile
Any time. :) I have a suspicion that anything coming from an OSL map doesn't work in a CoronaMtl bump slot either, but I gotta test this some more and see if it may be easily circumvented somehow.
Bump should work in general, I've tested this. At some point OSL bump was way weaker than other standard maps, so you may have to crank up bump to see it. then again, I couldn't see it happen later when 2019 was rolled out.

2018-09-05, 16:08:09
Reply #5

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9845
  • Marcin
    • View Profile

2018-09-05, 16:30:13
Reply #6

chopmeister

  • Active Users
  • **
  • Posts: 59
    • View Profile
    • Polymachine
So... By default something IS wrong with the bump. It works with BumpConverter though.

This is just a sphere with the default OSL_Rivets shader, with the Bump output plugged into the material's bump slot.
(Never mind the lighting differences, couldn't be bothered so rendered Arnold with default lights... :P )

2018-09-05, 17:09:23
Reply #7

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9845
  • Marcin
    • View Profile

2018-09-05, 17:36:34
Reply #8

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 6534
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Looks like yet another case where autodesk releases shaders that works only with their integrated renderer. How typical.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2018-09-05, 17:39:20
Reply #9

chopmeister

  • Active Users
  • **
  • Posts: 59
    • View Profile
    • Polymachine
Well... It does work with Vray. And even with other plugins with pluggable maps like ForestPack. So I wouldn't just outright assume it's an ADSK problem by default. :)

2018-11-22, 16:05:49
Reply #10

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9845
  • Marcin
    • View Profile

2019-01-08, 14:07:11
Reply #11

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9845
  • Marcin
    • View Profile