wParallax products

3D Studio Max Plugin (Export Script Plugins developed by [gk] and KilaD; Integrated Plugin developed by Karba)
Forum rules
Please post only in English in this subforum. For alternate language discussion please go here http://render.otoy.com/forum/viewforum.php?f=18
User avatar
roeland
OctaneRender Team
Posts: 1823
Joined: Wed Mar 09, 2011 10:09 pm

As far as I can tell, this shader works the same in Octane versions 2022, 2023, and 2024.

Starting from https://github.com/julsVFX/osl/tree/main/jiWindowBox, take the jiWindowBox_LWOctane.osl version. This version works in Octane but it requires planes to be oriented along the XY plane in object space.

You can make it work with any orientation as long as it has UV coordinates by finding these lines:

Code: Select all

    //global variables & remapping 
    vector objI = transform("object", -I);
…and replacing it with this.

Code: Select all

    //global variables & remapping
    // convert world space to tangent space
    vector objI = -vector(
        dot(normalize(dPdu), I),
        dot(normalize(dPdv), I),
        dot(normalize(N), I));
Example ORBX:
jiWindowBox example.orbx
(8.05 MiB) Downloaded 92 times
The more technical explanation: this line of code defines how to interpret the viewing direction. The rest of the shader expects the viewing direction relative to the surface, in a coordinate space where the X and Y axes are tangent, and the Z axis is along the normal. I is originally in world coordinates. The original gives you I in object coordinate space, that is why that version only works with planes that are oriented in the XY plane. The replacement gives I in so-called tangent space, this space is defined as having the X and Y axes on the surface, and the Z axis along the normal. So it works for any orientation as long as there are suitable UV coordinates.

None of this should have changed in any recent versions of Octane, if there is a regression can you attach an ORBX file with an example?
User avatar
SSmolak
Licensed Customer
Posts: 1157
Joined: Sat Feb 07, 2015 5:41 pm
Location: Poland
Contact:

Roeland thank you for explanation. I did some changes to the code to make it works with additional layers and alpha for curtains to make them work with color correction node for individual curtain brightness control but I never knew how to change these axes.

I reviewed last C4D OSL versions and it works fine if MultiPlanarObj parameter is DISABLED. I don't know how OSL interface looks in 3D Max but please try to disable it. Anyway in C4D it works fine after that :
Attachments
wParallax_C4D.zip
(297.08 KiB) Downloaded 87 times
Last edited by SSmolak on Mon Jul 01, 2024 3:20 pm, edited 1 time in total.
Architectural Visualizations http://www.archviz-4d.studio
User avatar
paride4331
Octane Guru
Posts: 3813
Joined: Fri Sep 18, 2015 7:19 am

Hi guys,
Pulled out from Roeland's ORBX.
Regards
Paride
Attachments
jiWindowBoxVRay.osl
(5.46 KiB) Downloaded 90 times
2 x Evga Titan X Hybrid / 3 x Evga RTX 2070 super Hybrid
HHbomb
Licensed Customer
Posts: 1376
Joined: Wed Jun 30, 2010 8:45 pm
Contact:

Hi roeland !
Can you please look at this file ?
It would be nice to see where the problem is.
Thanks a lot.
Attachments
wParallax_Scene_OSL_octane PB.orbx
(2.72 MiB) Downloaded 82 times
YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |
HHbomb
Licensed Customer
Posts: 1376
Joined: Wed Jun 30, 2010 8:45 pm
Contact:

"Hi guys,
Pulled out from Roeland's ORBX.
Regards
Paride"


Hi paride.
I tried with the file you provide, it don't seem to work ( ? )
YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |
User avatar
SSmolak
Licensed Customer
Posts: 1157
Joined: Sat Feb 07, 2015 5:41 pm
Location: Poland
Contact:

Try this C4D OSL. I don't know if it will works in 3ds max.
Attachments
wParallax_1.61.osl
(10.07 KiB) Downloaded 83 times
Architectural Visualizations http://www.archviz-4d.studio
HHbomb
Licensed Customer
Posts: 1376
Joined: Wed Jun 30, 2010 8:45 pm
Contact:

hi SSmolak !
Sorry not to be very responsible....
Thank you very much, your OSL for C4D seems to works fine with Max !!!
Best regards.
YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |
Post Reply

Return to “Autodesk 3Ds Max”