Gridshape Iterations in 3D?

Aug 27, 2008 at 4:28am

Gridshape Iterations in 3D?

Hi listers,

I’ve been working on this patch for a few weeks now and I’m at a point
where I need some direction.

The attached jpeg shows typical settings for the sliders and toggles.
The patcher (attached) produces a continuous iteration of spheres that
vary in scale, position and color using sliders on oscillators. Each
modulator has two sinewave frequency sliders and one amplitude slider.
The camera has a zoom slider and two other position flonums.

When the sequence of spheres is rendered, the current sphere is
rendered in 3D. However, the previously generated spheres are rendered
in 2D. How can I render/generate the entire sequence in 3D?

I want to be able to move the camera around the 3D sequence of spheres
while they are being generated.

I experimented with jit.multiple but that just replicates a single 3D
sphere in a 2D array. Poly~ seems very CPU intensive for the amount of
duplication required. Is there a way to render a 3D object in frame 1
and add another 3D object to frame 1 for frame 2 etc.?

I posted this problem before and got some good advice about iterations
that got me this far. I hope someone can point me in the right
direction on this next step.

Cheers, Chuck Henry

#39451
Aug 27, 2008 at 3:11pm

Hi Chuck,

I’m not seeing the jpeg you mentioned. Can’t help without that or a patch.

Zachary

#138974
Aug 27, 2008 at 4:14pm

Hi Zachary,
Are you seeing the two zipped files? Can you unzip them? If so, one is
the .jpeg and the other is a .maxpat I sent these in the unzipped
form but they were not posted. I guess they were too large.

Has anyone else been able to see or open the zipped files that were
attached to my post: Gridshape Iterations in 3D?

I can open them on my PC with:
1) Move the zipped files to another location on your hard drive
2) right click/Open With/UnZip Wizard

If you can’t see them or open them I can send them to your email
address. If this is OK, I’m at: crhenry@i-c.net

Thanks for your efforts.
Cheers, Chuck Henry

—–Original Message—–
From: jitter-bounces@cycling74.com
[mailto:jitter-bounces@cycling74.com] On Behalf Of Zachary Seldess
Sent: Wednesday, August 27, 2008 11:11 AM
Subject: [jitter] Re: Gridshape Iterations in 3D?

Hi Chuck,

I’m not seeing the jpeg you mentioned. Can’t help without that or a
patch.

Zachary

http://www.zacharyseldess.com

#138975
Aug 27, 2008 at 4:45pm

you can download the attachment here:

http://www.cycling74.com/pipermail/jitter/2008-August/016800.html

chuck, usually attachments posted from the mailing list don’t make it to the forum. best to paste the text of your patch inline using the copy compresses method.

i took a look at your patch. it’s nice. not really sure what you want to do. not sure if you have your metro set to 300 for a reason. if you want smooth camera movements, you’ll have to decrease that value to 30 or so.

camera movements can be achieved with the “camera” and “lookat” attributes to gl.render. if you want more control, take a look at zachary’s navigator patches.

beyond that, you don’t really want to be rendering your opengl to a matrix to display in the window. this uses the software renderer, and is much slower. render directly into the window instead. go back through the opengl tutorials if this is unclear.

-rob

#138976
Aug 27, 2008 at 7:19pm

Hi Rob,
Thanks for your comments.

—–Original Message—–
From: jitter-bounces@cycling74.com
[mailto:jitter-bounces@cycling74.com] On Behalf Of Robert Ramirez
Sent: Wednesday, August 27, 2008 12:45 PM
Subject: [jitter] Re: RE: Re: Gridshape Iterations in 3D?

you can download the attachment here:

http://www.cycling74.com/pipermail/jitter/2008-August/016800.html

chuck, usually attachments posted from the mailing list don’t make it
to the forum. best to paste the text of your patch inline using the
copy compresses method.

How do I do that? I tried opening the patcher as text. Then
copying and pasting into the body of a post and it was huge.

i took a look at your patch. it’s nice. not really sure what you
want to do. not sure if you have your metro set to 300 for a reason.
if you want smooth camera movements, you’ll have to decrease that
value to 30 or so.

As each sphere is generated the current sphere is visible in
3D so when the camera moves it rotates around that sphere but the
trail of spheres is like a 2D backdrop to the current sphere and
it moves with the camera as a backdrop to the current sphere. I
want to render all of the spheres in 3D space so I can move the
camera into and around that 3D construction of spheres.

The 300 is to make more separation between the spheres … so
it looks like a sequence of spheres rather than a continuous
ribbon. Since I’m not that interested in a realtime presentation,
I can live with the slow rendering and make up for it with the
playback speed of the recorded animation.

camera movements can be achieved with the “camera” and “lookat”
attributes to gl.render. if you want more control, take a look at
zachary’s navigator patches.

beyond that, you don’t really want to be rendering your opengl to a
matrix to display in the window. this uses the software renderer, and
is much slower. render directly into the window instead. go back
through the opengl tutorials if this is unclear.

I tried to render directly to the jit.pwindow and it just
stayed black. I’ll have to go back to the gl tutorials.

Thanks again for your thoughts and any additional tips you may
suggest.

Cheers, Chuck Henry

#138977
Aug 28, 2008 at 5:30pm

> How do I do that? I tried opening the patcher as text. Then
> copying and pasting into the body of a post and it was huge.

Select all on your patch.
Edit -> Copy Compressed

> As each sphere is generated the current sphere is visible in
> 3D so when the camera moves it rotates around that sphere but the
> trail of spheres is like a 2D backdrop to the current sphere and
> it moves with the camera as a backdrop to the current sphere. I
> want to render all of the spheres in 3D space so I can move the
> camera into and around that 3D construction of spheres.

ok. that makes sense, but you must understand the what the erase_color attribute is doing. it’s not saving your 3d object in 3d space. all it’s doing is not erasing the pixels that your 3d object was rasterized to from the previous frame. these pixels are in 2d screen space, not 3d world space.

to achieve what you’re after, you will have to set up some kind of system that generates a new gridshape with the properties received from the audio signals. poly~ is your good friend for this kind of situation. an even better friend would be gl.multiple~. you could have all the yet to be instantiated objects have a scale of 0 0 0, so they remain invisible.

you also might want to have the objects opacity fade each time a new object is generated, which will cause it to eventually fade all the way out, and therefore it can be recycled to generate a new gridshape.

-rob

#138978
Aug 29, 2008 at 2:17pm

Hi Rob,

—–Original Message—–
From: jitter-bounces@cycling74.com
[mailto:jitter-bounces@cycling74.com] On Behalf Of Robert Ramirez
Sent: Thursday, August 28, 2008 1:30 PM
Subject: [jitter] Re: RE: Re: RE: Re: Gridshape Iterations in 3D?

> How do I do that? I tried opening the patcher as text. Then
> copying and pasting into the body of a post and it was huge.

Select all on your patch.
Edit -> Copy Compressed

I don’t see Copy Compressed after I Select All … is that a
Mac thing? … I’m on a PC Max 5.0 … Is there another way on a
PC?

to achieve what you’re after, you will have to set up some kind of
system that generates a new gridshape with the properties received
from the audio signals. poly~ is your good friend for this kind of
situation. an even better friend would be gl.multiple~. you could
have all the yet to be instantiated objects have a scale of 0 0 0, so
they remain invisible.

It sound like I’m back to square 1 … I’m going to have to
find a way to generate a sequence of gridshape spheres and get them
into jit.gl.multiple. Do I keep the jit.Iter to step through the
iterations or do I have to remove that stage?

I looked at the tutorial on jit.gl.multiple before and it’s a
jungle in there. It’s so complex I couldn’t get to first base with
it. I’m going to search the archives for other examples.

you also might want to have the objects opacity fade each time a new
object is generated, which will cause it to eventually fade all the
way out, and therefore it can be recycled to generate a new gridshape.

This is graduate level work … I’m still in 5th grade …
I’ll keep at it though. Thanks for your efforts.

Cheers, Chuck

#138979
Aug 29, 2008 at 5:18pm

> Select all on your patch.
> Edit -> Copy Compressed
>
> I don’t see Copy Compressed after I Select All … is that a
> Mac thing? … I’m on a PC Max 5.0 … Is there another way on a
> PC?

update to latest version of max 5.

> It sound like I’m back to square 1 … I’m going to have to
> find a way to generate a sequence of gridshape spheres and get them
> into jit.gl.multiple. Do I keep the jit.Iter to step through the
> iterations or do I have to remove that stage?

well, generally if you’re using gl.multiple, you won’t need jit.iter because multiple takes matrices at it’s inputs and jit.iter converts matrices to lists. the trick is to have the matrices formatted in a way so gl.multiple will do what you want.

i will try to come up with basic example later.

> This is graduate level work … I’m still in 5th grade …
> I’ll keep at it though. Thanks for your efforts.

yup, that’s all you can do. your hardwork will be rewarded soon enough. good luck

-rob

#138980
Aug 30, 2008 at 4:35pm

Hi Rob,

I updated last night and all is well with Copy Compressed … Thanks!!

I’m about half way through the 483 listings in the forums that refer
to jit.gl.multiple … There are some clearings in the jungle in there
but your mention of making an example using gridshape and multiple
would help lots. Thanks again,
Cheers, Chuck

—–Original Message—–
From: jitter-bounces@cycling74.com
[mailto:jitter-bounces@cycling74.com] On Behalf Of Robert Ramirez
Sent: Friday, August 29, 2008 1:18 PM
Subject: [jitter] Re: RE: Re: RE: Re: RE: Re: Gridshape Iterations in
3D?

> Select all on your patch.
> Edit -> Copy Compressed
>
> I don’t see Copy Compressed after I Select All … is that a
> Mac thing? … I’m on a PC Max 5.0 … Is there another way on a
> PC?

update to latest version of max 5.

> It sound like I’m back to square 1 … I’m going to have to
> find a way to generate a sequence of gridshape spheres and get them
> into jit.gl.multiple. Do I keep the jit.Iter to step through the
> iterations or do I have to remove that stage?

well, generally if you’re using gl.multiple, you won’t need jit.iter
because multiple takes matrices at it’s inputs and jit.iter converts
matrices to lists. the trick is to have the matrices formatted in a
way so gl.multiple will do what you want.

i will try to come up with basic example later.

> This is graduate level work … I’m still in 5th grade …
> I’ll keep at it though. Thanks for your efforts.

yup, that’s all you can do. your hardwork will be rewarded soon
enough. good luck

-rob

#138981
Aug 30, 2008 at 7:24pm

hey chuck. first off, please continue studying the tutorials and other patches you’ve found.

here’s one way to employ multiple in your patch framework. i believe it does what you envisioned. i like it better with a faster shape metro speed, and a slight erase_color bleed.

open the GenGlParams patch to get started.

please note that the master render metro is decoupled from the shape generation.

if you run into performance problems, get rid of the pwindows. they are just there to illustrate how the control matrices are being filled (ie one row at a time).

it’s left up to you to figure how to adjust the number of iterations of the shape. when you do figure it out, don’t forget the counter object. it needs to be one less than the number you decide with (currently 50).

patch below.

– Pasted Max Patch, click to expand. –
#138982
Aug 31, 2008 at 1:51pm

Rob,
Well done mate! I’ve just read this thread and feel sure that Chuck is one
happy guy after your considerate responses to his question.

pelado

On Sat, Aug 30, 2008 at 9:24 PM, Robert Ramirez wrote:

>
> hey chuck. first off, please continue studying the tutorials and other
> patches you’ve found.
>
> here’s one way to employ multiple in your patch framework. i believe it
> does what you envisioned. i like it better with a faster shape metro speed,
> and a slight erase_color bleed.
>
> open the GenGlParams patch to get started.
>
> please note that the master render metro is decoupled from the shape
> generation.
>
> if you run into performance problems, get rid of the pwindows. they are
> just there to illustrate how the control matrices are being filled (ie one
> row at a time).
>
> it’s left up to you to figure how to adjust the number of iterations of the
> shape. when you do figure it out, don’t forget the counter object. it
> needs to be one less than the number you decide with (currently 50).
>
> patch below.
>
>

– Pasted Max Patch, click to expand. –

>
>
>
>

http://www.pelado.co.uk

#138983
Aug 31, 2008 at 4:40pm

Hi Rob,
Holy Communion!!! This patcher is great!!! You have saved me thousands
of hours of trialing and erroring … I would never have gotten this
from my searching and guessing. There is much yet to learn and I’m
quite excited to get this head start on this project.
I found the count control and I’ve gotten as many as 500 so far. And I
tried the pac camera control and the entire trail of spheres remains
stationary in space as the camera pans around. Yippppie!!!!

I’ll keep you posted on other developments as they occur. Yes I’m one
happy camper. Thank you very much for this help, Rob.
Cheers X 3, Chuck

P. S. I’m puzzled by the one sphere that leads the trail … it is
most visible in the full screen mode. I can’t turn it off. See below.

—–Original Message—–
From: jitter-bounces@cycling74.com
[mailto:jitter-bounces@cycling74.com] On Behalf Of Robert Ramirez
Sent: Saturday, August 30, 2008 3:24 PM
Subject: [jitter] Re: Gridshape Iterations in 3D?

hey chuck. first off, please continue studying the tutorials and
other patches you’ve found.

here’s one way to employ multiple in your patch framework. i believe
it does what you envisioned. i like it better with a faster shape
metro speed, and a slight erase_color bleed.

open the GenGlParams patch to get started.

please note that the master render metro is decoupled from the shape
generation.

if you run into performance problems, get rid of the pwindows. they
are just there to illustrate how the control matrices are being filled
(ie one row at a time).

it’s left up to you to figure how to adjust the number of iterations
of the shape. when you do figure it out, don’t forget the counter
object. it needs to be one less than the number you decide with
(currently 50).

====================================

– Pasted Max Patch, click to expand. –
#138984
Sep 15, 2008 at 1:27am

Here’s a method using the Jitter particle system –> jit.gl.multiple. Check out presets 6, 7, and 8 for a similar effect to Rob’s patch.

best,
Zachary

– Pasted Max Patch, click to expand. –
#138985
Sep 15, 2008 at 4:03pm

Hi Zachary,
This patch is very instructive!! It will take lots of experimenting to
find the limits and potential in each of the variables. The nice thing
about the particle system, among other things, is the combination of
multiple with forces. It makes for a very sensual image creation
experience. Thank you very much for this I’ll be working/playing with
it for a long time.
Cheers X 3, Chuck Henry

—–Original Message—–
From: jitter-bounces@cycling74.com
[mailto:jitter-bounces@cycling74.com] On Behalf Of Zachary Seldess
Sent: Sunday, September 14, 2008 9:28 PM
Subject: [jitter] Re: RE: Re: Gridshape Iterations in 3D?

Here’s a method using the Jitter particle system –> jit.gl.multiple.
Check out presets 6, 7, and 8 for a similar effect to Rob’s patch.

best,
Zachary

– Pasted Max Patch, click to expand. –

http://www.zacharyseldess.com

#138986
Sep 15, 2008 at 4:06pm

Hi Zachary,
This patch is very instructive!! It will take lots of experimenting to
find the limits and potential in each of the variables. The nice thing
about the particle system, among other things, is the combination of
multiple with forces. It makes for a very sensual image creation
experience. Thank you very much for this I’ll be working/playing with
it for a long time.
Cheers X 3, Chuck Henry

—–Original Message—–
From: jitter-bounces@cycling74.com
[mailto:jitter-bounces@cycling74.com] On Behalf Of Zachary Seldess
Sent: Sunday, September 14, 2008 9:28 PM
Subject: [jitter] Re: RE: Re: Gridshape Iterations in 3D?

Here’s a method using the Jitter particle system –> jit.gl.multiple.
Check out presets 6, 7, and 8 for a similar effect to Rob’s patch.

best,
Zachary

– Pasted Max Patch, click to expand. –

http://www.zacharyseldess.com

#138987
Sep 15, 2008 at 4:11pm

Hi Zachary,
This patch is very instructive!! It will take lots of experimenting to
find the limits and potential in each of the variables. The nice thing
about the particle system, among other things, is the combination of
multiple with forces. It makes for a very sensual image creation
experience. Thank you very much for this I’ll be working/playing with
it for a long time.
Cheers X 3, Chuck Henry

—–Original Message—–
From: jitter-bounces@cycling74.com
[mailto:jitter-bounces@cycling74.com] On Behalf Of Zachary Seldess
Sent: Sunday, September 14, 2008 9:28 PM
Subject: [jitter] Re: RE: Re: Gridshape Iterations in 3D?

Here’s a method using the Jitter particle system –> jit.gl.multiple.
Check out presets 6, 7, and 8 for a similar effect to Rob’s patch.

best,
Zachary

– Pasted Max Patch, click to expand. –

http://www.zacharyseldess.com

#138988
Dec 10, 2009 at 5:08am

Hello All,

I’m very new to 3D, gl and specially particles.
I have been looking at Zachary’s patch here and wonder how its possible to make a 4 char matrix or some sort of capture to convert the particles images rendered to be able to use it on a gl.slab. More specficially I would like to use a gaussian shader on the particles and then composite with a qt.movie – gl.slab. Hope this makes sens !

#138989
Dec 10, 2009 at 8:56am

Hi Marie-Helene,

You can use [jit.gl.asyncread] – then do your blurring compositing on the CPU or GPU depending on your preference.

best,
Zachary

– Pasted Max Patch, click to expand. –
#138990
Dec 10, 2009 at 6:49pm

Wow Zachary ! It works
I’m so happy …. much thanks
merci beaucoup !

Do you know if on the overall performance Asynchread will use more CPU usage if
I go directly to a slab and a videoplane ?

I read of another possible technique which I really don’t understand … something about @capture
to map as gl.texture. Would that work also with this exemple ? I tried and couldn’t come with anything.
GL is so complex to me outside slabs ;-)

#138991
Dec 10, 2009 at 9:13pm

Hello Zachary

Here’s the patch I made.
I’m definately doing something wrong. Not even sure
if its something feasable.
I have put comments.
If you could put me on track !?

– Pasted Max Patch, click to expand. –
#138992

You must be logged in to reply to this topic.