The reason why this is a problem is that I can't set the explicit bound for displacement in Vray. For some reason Vray has a color swatch input for these values, when it should really be a float input? So because of this poor Vray implementation, and the Maya 2016 color swatch limitation I am stuck.
As a temporary solution:
If the color swatch values are made available in the chanel box (using the channel control editor), then a negative number can be typed in, and is held. The very dangerous downside of this is that if the color swatch is touched in the attribute editor, then the inputted negative values are wiped, and reset to zero.
If you lock the negative values in the channel box, then the color swatch is no longer accessable in the attribute editor, and cannot therefore be accidently touched, causing the values to be reset to zero.
The color swatch picker is the trouble maker here, and really needs to be returned to the fuctionality of Maya 2015, which allowed any value...
Thanks,
Dave.
i didn´t try it but one thing coming to mind is to use a multiply divide node. set it to 1 multiplied by -1 and plug this in your color swatch. hope it helps.
Hello @Anonymous,
Thank you for posting to the Area forums.
I think @_sebastian_f has got the right idea. I think plugging in a multiply with a negative one would do the trick, but then again I am not super familiar with Vray.
It is strange that Vray uses a color swatch instead of a float or integer if that particular attribute expects a negative number.
I looked in 2014 and 2016 and both work in the same manner for color swatches. They do not allow negative values.
Glad to hear you have somewhat of a workaround though.
Cheers,
Does anyone know if there will be a fix for this? It's a little concerning for procedural shading particularly in regards displacement. I get your point @santd that a floating point or integer value would make sense... but what about the case in which a user would want to use negative displacement? For instance where a range is not defined between 0 - 1 but -0.5 - 0.5 or even -1 - 1. It's pretty inconvenient to throw a mult by -1 into the mix for fairly obvious reasons. What about your positive displacements?
I was just experimenting with the RenderMan for Maya plug-in and what a bit disappointed when my scene broke moving from maya 2015 (negative values work in this version) to maya 2016 due to this non negative value issue. What's even crazier to me is that when I loaded the scene into 2016 any negative values that I had are completely zeroed out.
Is there a reason why negative values are not allowed? Maybe throwing a checkbox or a flag that can be enabled through a command somewhere would fix the issue for those concerned? 😉
Also as a personal request, is this something located in a header file somewhere or some qt code that I could edit and fix for myself?
Best,
Justin
Hello @Anonymous,
The following workflow may be helpful in those situations:
Create a Set Range Node and a Multiply Divide Node. Set the following values for the Set Range:
Min = -1
Max = 1
Old Min = 0
Old Max = 1
Connect the Out Alpha of the image to the Value X of the Set Range.
Connect the Out Value X to Input1 X of the Multiply Divide Node then Connect the Out 1X into the Displacement. You should be able to use the Input 2 X of the Multiply Divide node to control the amount of displacement.
I have attached an image showing the connections.
Cheers,