Re: Gradient in PPG

2014-01-22 Thread Mathias N
 isn't the SDK documentation awesome.

Impeccable (屮゚Д゚)屮

So, int for type, 8 groups pf RGB(A?), position float ...

Both the ICE gradient and the fxtree gradient have 16 colors though, with
the former also having mid points in addition to the positions.

Do I have to set those? What about the number of markers?

Do I create an actual array of parameters and pass it, or just create a
bunch of parameters and pass the first as with .AddColor?

The number of possible combinations to try without XSI giving you any real
feedback boggles the mind.



On Wed, Jan 22, 2014 at 12:07 AM, Luc-Eric Rousseau luceri...@gmail.comwrote:

 you need to create an array of parameters with the right types and add
 the control on the first parameter. So it's just like the color
 widget.
 Check the Gradient operator in the fxtree.  Open its .spdl file to see
 how it works.

 it's something like, one integer for type, and 8 groups of rgb color
 and a float for their position. something like that.

 isn't the SDK documentation awesome.

 On Tue, Jan 21, 2014 at 5:13 PM, Mathias N mdawn...@gmail.com wrote:
  Evening
 
  Would any of you happen to know how to add a gradient (siControlGradient)
  item to a PPG layout?
 
  With any of the standard data types it is pretty straight forward:
  parameter, label, UI type.
  A color item is given its own method, where instead of pointing to a
 single
  parameter you point to float parameter representing red and it handles
 the
  rest.
 
  But how exactly does this function with gradients? By definition it
 cannot
  be linked to only a single parameter, but there is no special method for
 it
  like with color.
 
  The docs would suggest that it is possible, but provides no information
 as
  to how. Blindly flinging arguments at it has gotten me nowhere.
 
 http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_om/siPPGControlType.html
 
  Cheers



Re: Gradient in PPG

2014-01-22 Thread julien carmagnac
Hello,

I recently try the AddProxyParameter command with a gradient param in
reference (from an ICE Compound), and it automatically crash Softimage
(2014 SP2).

I probably may create a new gradient parameter to drive the ICE one.
So I'm very interested by your request because I found nothing in the doc.



2014/1/22 Mathias N mdawn...@gmail.com


 isn't the SDK documentation awesome.

 Impeccable (屮゚Д゚)屮

 So, int for type, 8 groups pf RGB(A?), position float ...

 Both the ICE gradient and the fxtree gradient have 16 colors though, with
 the former also having mid points in addition to the positions.

 Do I have to set those? What about the number of markers?

 Do I create an actual array of parameters and pass it, or just create a
 bunch of parameters and pass the first as with .AddColor?

 The number of possible combinations to try without XSI giving you any real
 feedback boggles the mind.



 On Wed, Jan 22, 2014 at 12:07 AM, Luc-Eric Rousseau 
 luceri...@gmail.comwrote:

 you need to create an array of parameters with the right types and add
 the control on the first parameter. So it's just like the color
 widget.
 Check the Gradient operator in the fxtree.  Open its .spdl file to see
 how it works.

 it's something like, one integer for type, and 8 groups of rgb color
 and a float for their position. something like that.

 isn't the SDK documentation awesome.

 On Tue, Jan 21, 2014 at 5:13 PM, Mathias N mdawn...@gmail.com wrote:
  Evening
 
  Would any of you happen to know how to add a gradient
 (siControlGradient)
  item to a PPG layout?
 
  With any of the standard data types it is pretty straight forward:
  parameter, label, UI type.
  A color item is given its own method, where instead of pointing to a
 single
  parameter you point to float parameter representing red and it handles
 the
  rest.
 
  But how exactly does this function with gradients? By definition it
 cannot
  be linked to only a single parameter, but there is no special method
 for it
  like with color.
 
  The docs would suggest that it is possible, but provides no information
 as
  to how. Blindly flinging arguments at it has gotten me nowhere.
 
 http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_om/siPPGControlType.html
 
  Cheers





Re: Gradient in PPG

2014-01-22 Thread Luc-Eric Rousseau
Sorry, I checked into this further, and the Gradient control expects a
hierarchy of parameters (color.red, color.green, etc) and not flat
list. Creating hierarchy of parameters on a custom property has never
been exposed to the SDK, so you can't construct one, and therefore
could never use this widget in its current form

On Tue, Jan 21, 2014 at 6:07 PM, Luc-Eric Rousseau luceri...@gmail.com wrote:
 you need to create an array of parameters with the right types and add
 the control on the first parameter. So it's just like the color
 widget.
 Check the Gradient operator in the fxtree.  Open its .spdl file to see
 how it works.

 it's something like, one integer for type, and 8 groups of rgb color
 and a float for their position. something like that.

 isn't the SDK documentation awesome.

 On Tue, Jan 21, 2014 at 5:13 PM, Mathias N mdawn...@gmail.com wrote:
 Evening

 Would any of you happen to know how to add a gradient (siControlGradient)
 item to a PPG layout?

 With any of the standard data types it is pretty straight forward:
 parameter, label, UI type.
 A color item is given its own method, where instead of pointing to a single
 parameter you point to float parameter representing red and it handles the
 rest.

 But how exactly does this function with gradients? By definition it cannot
 be linked to only a single parameter, but there is no special method for it
 like with color.

 The docs would suggest that it is possible, but provides no information as
 to how. Blindly flinging arguments at it has gotten me nowhere.
 http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_om/siPPGControlType.html

 Cheers


Re: Gradient in PPG

2014-01-22 Thread Daniel Brassard
Just a thought, how about using FCurves to drive the colors?


On Wed, Jan 22, 2014 at 1:03 PM, Luc-Eric Rousseau luceri...@gmail.comwrote:

 Sorry, I checked into this further, and the Gradient control expects a
 hierarchy of parameters (color.red, color.green, etc) and not flat
 list. Creating hierarchy of parameters on a custom property has never
 been exposed to the SDK, so you can't construct one, and therefore
 could never use this widget in its current form

 On Tue, Jan 21, 2014 at 6:07 PM, Luc-Eric Rousseau luceri...@gmail.com
 wrote:
  you need to create an array of parameters with the right types and add
  the control on the first parameter. So it's just like the color
  widget.
  Check the Gradient operator in the fxtree.  Open its .spdl file to see
  how it works.
 
  it's something like, one integer for type, and 8 groups of rgb color
  and a float for their position. something like that.
 
  isn't the SDK documentation awesome.
 
  On Tue, Jan 21, 2014 at 5:13 PM, Mathias N mdawn...@gmail.com wrote:
  Evening
 
  Would any of you happen to know how to add a gradient
 (siControlGradient)
  item to a PPG layout?
 
  With any of the standard data types it is pretty straight forward:
  parameter, label, UI type.
  A color item is given its own method, where instead of pointing to a
 single
  parameter you point to float parameter representing red and it handles
 the
  rest.
 
  But how exactly does this function with gradients? By definition it
 cannot
  be linked to only a single parameter, but there is no special method
 for it
  like with color.
 
  The docs would suggest that it is possible, but provides no information
 as
  to how. Blindly flinging arguments at it has gotten me nowhere.
 
 http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_om/siPPGControlType.html
 
  Cheers



Re: Gradient in PPG

2014-01-22 Thread julien carmagnac
Bad news,
but thanks for the info.

FCurve may be ok but the fact that we don't visualise color isn't cool.

Anyway, on my side i will try to make my own representation, perhaps with
the three FCurves too.

Cheers.


2014/1/22 Eric Mootz e...@mootzoid.com

  Yep, that was my workaround a while ago after I discovered that
 gradients could not be used in PPGs.
 It works, but three FCurves are rather uncool compared to a good ol'd
 gradient control. But it works.

 Cheers,
 Eric





RE: Gradient in PPG

2014-01-21 Thread Matt Lind
Gradients are intended for use with shader PPGs.

I'm tempted to say there was work done in the 2012 release to make them 
available for custom property/operator PPGs, but I cannot say for sure.  I do 
know there is a bug with some of the scripting languages for defining a 
gradient as siControlGradient (or whatever the enum is) doesn't work.  You have 
to use the string 'gradient' instead.  Same issue applies to texture projection 
widget for choosing which texture projection to use.

Like with any other PPG Layout control, the parameter(s) the control is 
expected to drive must exist before it'll appear on the PPG layout.  The 
gradient control expects at least 3 different scalars before it'll draw.  One 
for position (_pos), another for the interpolant (_mid), and one for the value 
driven by the other two.  The gradient can accept up to 8 scalars for each.



Matt






From: softimage-boun...@listproc.autodesk.com 
[mailto:softimage-boun...@listproc.autodesk.com] On Behalf Of Mathias N
Sent: Tuesday, January 21, 2014 2:14 PM
To: softimage
Subject: Gradient in PPG

Evening

Would any of you happen to know how to add a gradient (siControlGradient) item 
to a PPG layout?
With any of the standard data types it is pretty straight forward: parameter, 
label, UI type.
A color item is given its own method, where instead of pointing to a single 
parameter you point to float parameter representing red and it handles the rest.
But how exactly does this function with gradients? By definition it cannot be 
linked to only a single parameter, but there is no special method for it like 
with color.

The docs would suggest that it is possible, but provides no information as to 
how. Blindly flinging arguments at it has gotten me nowhere.
http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_om/siPPGControlType.html
Cheers


Re: Gradient in PPG

2014-01-21 Thread Luc-Eric Rousseau
you need to create an array of parameters with the right types and add
the control on the first parameter. So it's just like the color
widget.
Check the Gradient operator in the fxtree.  Open its .spdl file to see
how it works.

it's something like, one integer for type, and 8 groups of rgb color
and a float for their position. something like that.

isn't the SDK documentation awesome.

On Tue, Jan 21, 2014 at 5:13 PM, Mathias N mdawn...@gmail.com wrote:
 Evening

 Would any of you happen to know how to add a gradient (siControlGradient)
 item to a PPG layout?

 With any of the standard data types it is pretty straight forward:
 parameter, label, UI type.
 A color item is given its own method, where instead of pointing to a single
 parameter you point to float parameter representing red and it handles the
 rest.

 But how exactly does this function with gradients? By definition it cannot
 be linked to only a single parameter, but there is no special method for it
 like with color.

 The docs would suggest that it is possible, but provides no information as
 to how. Blindly flinging arguments at it has gotten me nowhere.
 http://download.autodesk.com/global/docs/softimage2014/en_us/sdkguide/si_om/siPPGControlType.html

 Cheers