first: the mathematical expression patch is where you want to be, so much easier than the tiger standard math patch. also if i find my brain melting with this kind of maths, i sometimes bust out osx's equation editor which has been a quick way to restore sanity: you can see the equation and so the remapping visually.

second: if you want a more visual approach or a non-linear relationship, try the timeline or interpolation (with external timebase) patches.

On 18 Apr 2008, at 13:55, aaron trinder wrote:

This is a real noob question i'm sure, but how do i go about redefining negative value data i'm getting (within the range -0,5 to 0.5) so that it works on a scale of 1.0>2.0 ? I can't do this through multiplication in the math patch, and i encounter this type of thing all the time (due to alot of data sources using negative values).

thanks

aaron


On 18 Apr 2008, at 07:21, [EMAIL PROTECTED] wrote:

Send Quartzcomposer-dev mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.apple.com/mailman/listinfo/quartzcomposer-dev
or, via email, send a message with subject or body 'help' to
        [EMAIL PROTECTED]

You can reach the person managing the list at
        [EMAIL PROTECTED]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Quartzcomposer-dev digest..."


Today's Topics:

 1. Re: Queue patch bug (Christopher Wright)
 2. Data depdendent for statements are unsupported (Mike Lewis)
 3. Re: Data depdendent for statements are unsupported
    (Christopher Wright)
 4. Re: Data depdendent for statements are unsupported (Mike Lewis)
 5. Re: Data depdendent for statements are unsupported
    (Christopher Wright)


----------------------------------------------------------------------

Message: 1
Date: Thu, 17 Apr 2008 22:17:20 -0700
From: Christopher Wright <[EMAIL PROTECTED]>
Subject: Re: Queue patch bug
To: signedup <[EMAIL PROTECTED]>
Cc: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

Has anyone noticed that when you use the Queue, the depth is set
differently if you close and the reopen your composition? This
occurs when i set the depth to 2 (onlu two slots). When i reopen the
composition, the depth is set to 1. This also happens when i am
duplicating a Queue. It sets the depth to one less that original. I
do not see any old posts on this.


I'm not seeing this behaviour;  can you elaborate a bit on the setup
to duplicate this?

A while back, the sphere patch had similar problems (it still might, I
haven't used it in a while) -- please include version information as
well, just to help refine the problem.

--
[ christopher wright ]
[EMAIL PROTECTED]
http://kineme.net/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2419 bytes
Desc: not available
Url : 
http://lists.apple.com/pipermail/quartzcomposer-dev/attachments/20080417/699c1057/smime.bin

------------------------------

Message: 2
Date: Thu, 17 Apr 2008 22:54:54 -0700
From: "Mike Lewis" <[EMAIL PROTECTED]>
Subject: Data depdendent for statements are unsupported
To: [email protected]
Message-ID:
        <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

I'm new to quartz composer, and I'm trying to write a simple convolve blur
filter, but I seem to be having this strange issue.

When I have this as my code (I've been able to recreate it previously too)

kernel vec4 awesome(sampler image,   float radius )
{
  int size = int(radius-.5)+1;
  float total = size * size;
  vec4 sum = vec4(0.0);
  for( int i = -size; i <= size; i++ ) {
      for( int j = -size; j <= size; j++ ) {
          sum += sample(image, samplerTransform(image,
xy+vec2(float(i),float(j))));
      }
  }
  return sum;
}

I get the error "Data depdendent for statements are unsupported"
and it highlights the close paren for the outer for loop.

Any reason why I'd be seeing this occur often?

Thanks in advance,
Mike Lewis
--
Michael Lewis
lolrus.org
[EMAIL PROTECTED]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.apple.com/pipermail/quartzcomposer-dev/attachments/20080417/9a0457f6/attachment.html

------------------------------

Message: 3
Date: Fri, 18 Apr 2008 02:04:53 -0400
From: Christopher Wright <[EMAIL PROTECTED]>
Subject: Re: Data depdendent for statements are unsupported
To: "Mike Lewis" <[EMAIL PROTECTED]>
Cc: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

[... code ...]
I get the error "Data depdendent for statements are unsupported"
and it highlights the close paren for the outer for loop.

Any reason why I'd be seeing this occur often?


You cannot have a for loop with a non-static number of iterations.
It's non-static here because radius is an input, not a constant.
Behind the scenes, CoreImage unrolls the loops, and this unrolling
isn't possible on the fly when the user is in charge of the for-loop
conditional.

Your loop is based on going from -size to +size, and size is
calculated from the first line, which uses input data.  Hence the
"data dependent" statement.

--
[ christopher wright ]
[EMAIL PROTECTED]
http://kineme.net/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2419 bytes
Desc: not available
Url : 
http://lists.apple.com/pipermail/quartzcomposer-dev/attachments/20080418/884aeb77/smime.bin

------------------------------

Message: 4
Date: Thu, 17 Apr 2008 23:14:18 -0700
From: "Mike Lewis" <[EMAIL PROTECTED]>
Subject: Re: Data depdendent for statements are unsupported
To: "Christopher Wright" <[EMAIL PROTECTED]>
Cc: [email protected]
Message-ID:
        <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

Thanks for the info. Two questions then... (I tried googling the answers, but no avail). What would be the best way to write say a gaussian blur
filter with variable parameters.

Also, kind of off topic, is there a way to edit the GLSL kernel code in a more robust IDE and have it integrate with Quartz? It's a bit annoying that every time you click on another patch it resizes the window to the default.

My goal right now is to write a bilateral filter in quartz composer, and I'm not familiar with the tools or GLSL so I'm taking baby steps (actually, my
real goal is to implement an HDR mapping algorithm).

Thanks again,
Mike Lewis
On Thu, Apr 17, 2008 at 11:04 PM, Christopher Wright <[EMAIL PROTECTED] >
wrote:

[... code ...]
I get the error "Data depdendent for statements are unsupported"
and it highlights the close paren for the outer for loop.

Any reason why I'd be seeing this occur often?



You cannot have a for loop with a non-static number of iterations. It's non-static here because radius is an input, not a constant. Behind the scenes, CoreImage unrolls the loops, and this unrolling isn't possible on
the fly when the user is in charge of the for-loop conditional.

Your loop is based on going from -size to +size, and size is calculated from the first line, which uses input data. Hence the "data dependent"
statement.

--
[ christopher wright ]
[EMAIL PROTECTED]
http://kineme.net/




--
Michael Lewis
lolrus.org
[EMAIL PROTECTED]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://lists.apple.com/pipermail/quartzcomposer-dev/attachments/20080417/97fb4d08/attachment.html

------------------------------

Message: 5
Date: Fri, 18 Apr 2008 02:20:47 -0400
From: Christopher Wright <[EMAIL PROTECTED]>
Subject: Re: Data depdendent for statements are unsupported
To: "Mike Lewis" <[EMAIL PROTECTED]>
Cc: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

Thanks for the info.  Two questions then... (I tried googling the
answers, but no avail).  What would be the best way to write say a
gaussian blur filter with variable parameters.

I've been wondering this myself for a long time. My guess is that you
could sample a bunch of "rings" about the pixel you're working with,
and then have the sum use weights for each of the rings, with the
weights based on the input radius. You can do conditionals like this,
but the code looks ugly, and it does a lot of work that isn't
necessarily necessary.  Let me know if that makes sense;  if not, I
can try to whip up a lame example sometime.

Also, kind of off topic, is there a way to edit the GLSL kernel code
in a more robust IDE and have it integrate with Quartz?  It's a bit
annoying that every time you click on another patch it resizes the
window to the default.

You can edit it in the OpenGL Shader Builder, and then copy/paste the
code in.  I think you can also try using Shift-Cmd-I to get a static
code editor window for the patch you're interested in.

Hope that helps you take a few more steps in your goal! :)

--
[ christopher wright ]
[EMAIL PROTECTED]
http://kineme.net/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2419 bytes
Desc: not available
Url : 
http://lists.apple.com/pipermail/quartzcomposer-dev/attachments/20080418/599d92cf/smime.bin

------------------------------

_______________________________________________
Quartzcomposer-dev mailing list
[email protected]
http://lists.apple.com/mailman/listinfo/quartzcomposer-dev


End of Quartzcomposer-dev Digest, Vol 38, Issue 36
**************************************************



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected] )
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/lists%40tobyz.net

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to