Ramp node in Arnold lacks position info when links to Gaffer

389 views
Skip to first unread message

Jiayu Liu

unread,
Apr 21, 2020, 2:50:00 AM4/21/20
to gaffer-dev
As shown in figures, the Ramp_rgb node in Arnold has the position value, which can be adjusted by "selected position" "selected color" and  "interpolation" together in Maya (see Figure1).
 
But when it goes to Gaffer, things look strange. We can't find any place to manage the position (see Figure2 left, on the right is original position code  of ramp_rgb in Arnold) .
 
Does anyone know how to adjust position of ramp_rgb in Gaffer? Or anyone has ever ran into similar problem?
Ramp in maya.png
Ramp in gaffer.png

Tom Cowland

unread,
Apr 21, 2020, 4:13:16 AM4/21/20
to gaffe...@googlegroups.com
Hey,

Sadly we don't have support for Arnold ramps in the Gaffer UI at the moment (or by transferring from maya). The nearest thing is to use the osl ColorSpline shader, which does allow the ramp to be edited in Gaffer. This comes up from time to time in production, but it's not been prioritised yet so I don't think we'll get to it any time soon. I think most people have made custom OSL shaders to cover any missing functionality.

Sorry about that!

'best
Tom

--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gaffer-dev/fdeb4a20-c375-44ef-adab-098c916e6224%40googlegroups.com.
<Ramp in maya.png><Ramp in gaffer.png>

Jiayu Liu

unread,
Apr 21, 2020, 5:40:03 AM4/21/20
to gaffer-dev
Thanks for the tip, our team haven't tried OSL shader in Gaffer yet, but it seems like a universal solution for missing functionality issues, we may try later.


On Tuesday, April 21, 2020 at 4:13:16 PM UTC+8, Tom Cowland wrote:
Hey,

Sadly we don't have support for Arnold ramps in the Gaffer UI at the moment (or by transferring from maya). The nearest thing is to use the osl ColorSpline shader, which does allow the ramp to be edited in Gaffer. This comes up from time to time in production, but it's not been prioritised yet so I don't think we'll get to it any time soon. I think most people have made custom OSL shaders to cover any missing functionality.

Sorry about that!

'best
Tom
On 21 Apr 2020, at 07:50, Jiayu Liu <ljy...@gmail.com> wrote:

As shown in figures, the Ramp_rgb node in Arnold has the position value, which can be adjusted by "selected position" "selected color" and  "interpolation" together in Maya (see Figure1).
 
But when it goes to Gaffer, things look strange. We can't find any place to manage the position (see Figure2 left, on the right is original position code  of ramp_rgb in Arnold) .
 
Does anyone know how to adjust position of ramp_rgb in Gaffer? Or anyone has ever ran into similar problem?

--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffe...@googlegroups.com.

William Eguienta

unread,
Apr 24, 2020, 1:07:05 AM4/24/20
to gaffer-dev
Hey, this is a topic I'm stuck on too
my main concern with the colorspline is that it output only the color value relative to X position value
I've tried to send u or v attribute in X to export a ramp but no success for now

I have the exact same  problem when i try righting it in an OSLcode node
any tricks to make colorspline output a ramp and not an unique value ?

cheers

John Haddon

unread,
Apr 24, 2020, 3:42:50 AM4/24/20
to gaffe...@googlegroups.com
Hi William,

I've attached a simple example where I've combined an OSLCode node with a ColorSpline to make a little box with options for Horizontal/Vertical/Radial/Linear ramps in UV space. This seems to be a pretty common request, so in the future we should probably just build that in to the node ColorSpline itself, but hopefully this can keep you moving in the meantime.

Cheers...
John



To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gaffer-dev/f0e84537-c1e4-4b24-9a75-859c6c56e8ea%40googlegroups.com.


--
John Haddon - R&D Programmer
Image Engine
studio: +1-604-874-5634 | jo...@image-engine.com | www.image-engine.com



15 West 5th Avenue, Vancouver, BC, V5Y 1H4, Canada

If you are not the intended recipient, disclosure, copying, distribution and use of this email is prohibited. Please notify us immediately and delete this email from your systems. You may contact us at in...@image-engine.com if you do not wish to receive further commercial electronic messages. We may still send you messages for which we do not require consent.

splineExample.gfr

William Eguienta

unread,
Apr 24, 2020, 4:45:06 AM4/24/20
to gaffer-dev
Hi John,
Thank you John, I get it now, i was missing the point part

Cheers

William Eguienta

unread,
Mar 9, 2021, 10:54:00 AM3/9/21
to gaffer-dev
Hi,
is there a specific way to add point and set a value to colorspline/floatspline in python ?
for now i'm using that I've seen from copy / paste :
node.addChild( Gaffer.ValuePlug( "p2", ...)
node.["p2"].addChild( Gaffer.FloatPlug( "x", ...)
node.["p2"].addChild( Gaffer.Color3fPlug( "y", ... )

It works but it's not really handy to manage and I'm pretty sure that there is a better way to create a point, set is position then add it's value

thanks

John Haddon

unread,
Mar 9, 2021, 11:21:52 AM3/9/21
to gaffe...@googlegroups.com
The SplinePlug API is one of the older ones, and it's not as friendly as it could be, but it is a little easier than what you're doing I think :

```

# Add a point and set its value

point = splinePlug.point( spline.addPoint() )

point["x"].setValue( 0.5 )

point["y"].setValue( imath.Color3f( 1, 0, 0 ) )


# Set the whole spline in one go

splineValue =

Gaffer.SplineDefinitionfColor3ff(
  (
    ( 0, imath.Color3f( 0, 0, 0 ) ),
    ( 0.2, imath.Color3f( 0.3, 0.3, 0.3 ) ),
    ( 0.4, imath.Color3f( 0.9, 0.9, 0.9 ) ),
    ( 1, imath.Color3f( 1, 1, 1 ) ),
  ),
   Gaffer.SplineDefinitionInterpolation.CatmullRom
)
splinePlug.setValue( splineValue )
```

Cheers...
John

To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gaffer-dev/bc6f027e-b326-43e2-918c-5af8cf254199n%40googlegroups.com.

William Eguienta

unread,
Mar 9, 2021, 12:14:48 PM3/9/21
to gaffer-dev
Hi John,

Thanks for your help,
yes it's already simpler that what i'm doing for now

Cheers
Reply all
Reply to author
Forward
0 new messages