Announcement

Collapse
No announcement yet.

OSL goodness in Vray

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • mayanic
    replied
    Originally posted by t.petrov View Post
    @mayanic:
    Your problem is that you're using the wrong node type - VRayPluginNodeTex:TexOSL instead of VRayTexOSL.
    If you create the correct node it will work as expected. After you change the output as mentioned by others.
    sorry for the delay
    i still don't get the k value to show up

    there is a node (Create > V-Ray > Create form V-Ray Plugin) called OSLTex. should i use that one?

    Leave a comment:


  • hsz
    replied
    Network locations as well. Thank you for your response!

    Leave a comment:


  • oliver.sullivan
    replied
    Originally posted by t.petrov View Post
    Are you both using the installer or are you using V-Ray from a network location?

    Do you have a variable like VRAY_OSL_PATH_MAYA2014_x64 set?
    It should point to the folder that contains oslutil.h and stdosl.h files.
    Network location here - that explains it..! Thx

    Leave a comment:


  • t.petrov
    replied
    Are you both using the installer or are you using V-Ray from a network location?

    Do you have a variable like VRAY_OSL_PATH_MAYA2014_x64 set?
    It should point to the folder that contains oslutil.h and stdosl.h files.

    Leave a comment:


  • oliver.sullivan
    replied
    Originally posted by hsz View Post
    Im getting this error, where do I set up the path?

    // Error: OSL shader error: OSL include path not set
    Did you work out why this was happening? Same thing here, can't find any info on it...

    Leave a comment:


  • t.petrov
    replied
    @mayanic:
    Your problem is that you're using the wrong node type - VRayPluginNodeTex:TexOSL instead of VRayTexOSL.
    If you create the correct node it will work as expected. After you change the output as mentioned by others.
    Last edited by t.petrov; 28-07-2015, 02:58 AM.

    Leave a comment:


  • sharktacos
    replied
    Originally posted by R2J2 View Post
    hmm I did test it in maya 2014 and an older version of VRay, nightly pre 3.2.
    do you know what it was that was causing problems in maya?
    I'll test again later when we are all up to date here.
    "Col_Out" needs to be called "result"

    Leave a comment:


  • R2J2
    replied
    Originally posted by sharktacos View Post
    I tweaked it so it would work in Maya
    hmm I did test it in maya 2014 and an older version of VRay, nightly pre 3.2.
    do you know what it was that was causing problems in maya?
    I'll test again later when we are all up to date here.

    Leave a comment:


  • hsz
    replied
    Im getting this error, where do I set up the path?

    // Error: OSL shader error: OSL include path not set

    Leave a comment:


  • sharktacos
    replied
    Originally posted by hsz View Post
    what about if you want to use the fabric one where will you connect it?
    thx

    just follow the instructions here:
    http://docs.chaosgroup.com/display/O.../Fabric+shader

    Leave a comment:


  • hsz
    replied
    what about if you want to use the fabric one where will you connect it?
    thx

    Leave a comment:


  • sharktacos
    replied
    Originally posted by doark View Post
    You need to turn off the Use Fresnel button and change in VRayTexOSL in Color Output of result for Col_Out. The same as this:
    [ATTACH=CONFIG]25185[/ATTACH]

    I hope this helps.
    Right. It would probably be good to update the shader from this:


    output color Col_Out = color(0.5))
    {
    float thetaCos = abs(dot(-I,N));
    float red=fresnel(n[0], k[0], thetaCos);
    float green=fresnel(n[1], k[1], thetaCos);
    float blue=fresnel(n[2], k[2], thetaCos);
    Col_Out=color(red, green, blue);
    }

    to this:

    output color result = color(0.5))
    {
    float thetaCos = abs(dot(-I,N));
    float red=fresnel(n[0], k[0], thetaCos);
    float green=fresnel(n[1], k[1], thetaCos);
    float blue=fresnel(n[2], k[2], thetaCos);
    result=color(red, green, blue);

    }

    that way it will work by default in Maya.

    Leave a comment:


  • doark
    replied
    Originally posted by mayanic View Post
    i already posted a pics of my node editor / ae ...

    i just connected the osl-texture to my reflection color and plugged a osl-file in there
    but nothing happened
    You need to turn off the Use Fresnel button and change in VRayTexOSL in Color Output of result for Col_Out. The same as this:
    Click image for larger version

Name:	TexOSL.png
Views:	1
Size:	46.5 KB
ID:	857899

    I hope this helps.

    Leave a comment:


  • mayanic
    replied
    i already posted a pics of my node editor / ae ...

    i just connected the osl-texture to my reflection color and plugged a osl-file in there
    but nothing happened

    Leave a comment:


  • sharktacos
    replied
    Can you post an image of the OSLTex in the attribute editor? Do you get an error message when you load the OSL?

    Leave a comment:

Working...
X