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