<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Cyrille&nbsp;<div><br></div><div>Thanks for mentioning the motion blur features in gem. I've been messing about with these for a while and I thought I'd show off some pretty patching that's resulted.&nbsp;</div><div><br></div><div>As always, constructive criticism is appreciated&nbsp;<br><br>&gt; Date: Sat, 23 Jan 2010 01:15:09 +0000<br>&gt; From: claudiusmaximus@goto10.org<br>&gt; To: james@4thharmonic.com<br>&gt; CC: pd-list@iem.at<br>&gt; Subject: Re: [PD] Drawing lines in gem with alpha fade<br>&gt; <br>&gt; James Dunn wrote:<br>&gt; &gt; Thanks - it's interesting but doesn't seem to do quite what I need. Even <br>&gt; &gt; with a maximum alpha value, I still want the lines to stay on full <br>&gt; &gt; brightness for longer. Also, I'm drawing some fine lines and there are <br>&gt; &gt; some weird artefacts like blocks appearing in the trail. Is there <br>&gt; &gt; something else I could try?<br>&gt; <br>&gt; This is probably caused by the texture being 8-bit per channel, so decay <br>&gt; coefficients are quantized in 1/256 increments, which makes long decay <br>&gt; times hard to achieve (the slowest decay's coefficient is 255/256, which <br>&gt; isn't as close to 1.0 as you want, I guess).<br>&gt; <br>&gt; You could keep some data about the history of each line segment <br>&gt; (position, time created, colour, etc), and draw them all fresh each <br>&gt; frame - this will be much less efficient than texture feedback but you <br>&gt; would have more control over the fade, with  the possibility to do <br>&gt; things like change colour (not just alpha) over time with <br>&gt; other-than-exponential decay curves, etc.<br>&gt; <br>&gt; Probably pd/doc/Gem/02.advanced/20.double-gemhead_vs_repeat.pd helps.<br>&gt; <br>&gt; If that gets too slow you could combine the drawing of the line segments <br>&gt; into one glBegin/End block at the price of some flexibility.  And if <br>&gt; that gets too slow, there's probably something that can be done with <br>&gt; vertex arrays/buffers or whatever they're called (if it's even possible <br>&gt; in Gem - I'm not sure, but I'd like to find out!).<br>&gt; <br>&gt; <br>&gt; Claude<br>&gt; <br>&gt; &gt; <br>&gt; &gt; Quoth cyrille henry, on 22/01/10 21:45:<br>&gt; &gt;&gt; have a look at example 07.texture/08.MotionBlur.pd<br>&gt; &gt;&gt; all you have to do is remplace the teapot with a line that you can <br>&gt; &gt;&gt; draw or not (to make it fade out)<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Cyrille<br>&gt; &gt;&gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; James Dunn a écrit :<br>&gt; &gt;&gt;&gt; I've been sending x/y values to [curve] to draw some lines in gem and <br>&gt; &gt;&gt;&gt; the only way I've been able to get them to stay rendered is to use <br>&gt; &gt;&gt;&gt; single buffer mode using [buffer 1( messaged to [gemwin].<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; Can someone suggest a better method using double buffer perhaps? I <br>&gt; &gt;&gt;&gt; would like the lines to fade out after some seconds. I looked at <br>&gt; &gt;&gt;&gt; pix_snap2tex and gemframebuffer but could only get one line rendered. <br>&gt; &gt;&gt;&gt; Is this possible with the particle objects?<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; thanks<br>&gt; &gt;&gt;&gt;<br>&gt; &gt;&gt;&gt; James<br>&gt; <br>&gt; -- <br>&gt; http://claudiusmaximus.goto10.org<br>&gt; <br>&gt; _______________________________________________<br>&gt; Pd-list@iem.at mailing list<br>&gt; UNSUBSCRIBE and account-management -&gt; http://lists.puredata.info/listinfo/pd-list<br></div>                                               <br /><hr />Not got a Hotmail account? <a href='http://clk.atdmt.com/UKM/go/197222280/direct/01/' target='_new'>Sign-up now - Free</a></body>
</html>