quartz random NOT random!

FFGL, OSC, GLSL. If you like abbreviations, this is the forum for you
Post Reply
User avatar
mowgli
Is seriously in love with Resolume. Met the parents and everything
Posts: 379
Joined: Wed Aug 05, 2009 17:28
Location: UK

quartz random NOT random!

Post by mowgli »

I have several sprites with their position controlled by 2 different randoms per sprite, one for x and one for y.
Sometimes ALL the sprites follow exactly the same motion although they are controlled by different randoms!
the randoms are set to local timebase. It doesn't always happen but it happens often enough to be a problem.
I've tried using an interpolator to switch on the sprites in a staggered manner but what I get is the sprites following the same path with a time delay. I'm very confused, any help welcome.

User avatar
mowgli
Is seriously in love with Resolume. Met the parents and everything
Posts: 379
Joined: Wed Aug 05, 2009 17:28
Location: UK

Re: quartz random NOT random!

Post by mowgli »

This is getting worse. I'm trying to resolve the issue and the behaviour of my quartz patches within resolume is just unusable ie they only work "sometimes" and not very often. I'm testing with a quartz patch with a single sprite which works fine in the quartz environment but it doesn't work at all in resolume. Why can this be?

Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5185
Joined: Fri May 22, 2009 11:38

Re: quartz random NOT random!

Post by Joris »

Random on a computer is never really random (don't get me started on this, I will go on for hours because I've been fascinated with it since the eighties).

If you are getting different behaviour between the QC editor and Resolume, it's best to send us the patch or post it here.

User avatar
mowgli
Is seriously in love with Resolume. Met the parents and everything
Posts: 379
Joined: Wed Aug 05, 2009 17:28
Location: UK

Re: quartz random NOT random!

Post by mowgli »

I was aware of the "non random" issue but is there a way to resolve this? basically three sprites controlled by their own "randoms" are doing exactly the same!, maybe if I feed extra "randoms" to some sprites?

Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5185
Joined: Fri May 22, 2009 11:38

Re: quartz random NOT random!

Post by Joris »

I'm guessing you put them in a macro then? In that case, you can hit CMD-2 and change their variability a little bit.

User avatar
mowgli
Is seriously in love with Resolume. Met the parents and everything
Posts: 379
Joined: Wed Aug 05, 2009 17:28
Location: UK

Re: quartz random NOT random!

Post by mowgli »

besides the lack of random motion, the patch seems to have some strange behaviours within resolume which "I think" are related to the quartz screen size setting. I'm confused about this. I thought that if set to "custom" the quartz patch would adjust itself to any composition size within resolume yet that's not what happens. I'm a bit lost as to what the right settings should be as there are multiple combinations, I have:

quartz screen size setting
resolume render width and height
resolume width and height

User avatar
mowgli
Is seriously in love with Resolume. Met the parents and everything
Posts: 379
Joined: Wed Aug 05, 2009 17:28
Location: UK

Re: quartz random NOT random!

Post by mowgli »

goto10 wrote:I'm guessing you put them in a macro then? In that case, you can hit CMD-2 and change their variability a little bit.
thanks, I'll try that

Joris
Doesn't Know Jack about VJ'ing or Software Development and Mostly Just Gets Coffee for Everyone
Posts: 5185
Joined: Fri May 22, 2009 11:38

Re: quartz random NOT random!

Post by Joris »

Regarding the resolutions:

QC uses a different coordinate system than pixels.

Left edge of the screen is always -1, right side is always 1. So far so good.
Top and bottom edges depend on the aspect ratio of the patch. On 4:3 it's 0.75 and -0.75, on 16:9 it's -0.5625 and 0.5625. So your sprites can fall off the top and bottom of the screen if you change resolutions. You can use the Rendering Destination Dimensions to get access to this data.

When running the patch in Resolume, it takes its resolution from the render width and height settings. They default to the current comp resolution settings, but you can adjust them to anything you want. QC then does the calculating, places all your sprites accordingly and passes the resulting image to Resolume as a texture.

Then you can use the clip and layer width and height to change the scale of this texture. At this point in the chain, this is identical to taking a video and scaling it.

I hope that explains things a bit.

User avatar
mowgli
Is seriously in love with Resolume. Met the parents and everything
Posts: 379
Joined: Wed Aug 05, 2009 17:28
Location: UK

Re: quartz random NOT random!

Post by mowgli »

that's exactly what I was after. Thanks a lot. I was working under the assumption that the -1to 1 ranges were for both height and width!

User avatar
mowgli
Is seriously in love with Resolume. Met the parents and everything
Posts: 379
Joined: Wed Aug 05, 2009 17:28
Location: UK

Re: quartz random NOT random!

Post by mowgli »

I figured out that the lack of randomness was due to copy-pasting the random module as when doing so the same seed number is used to work out the random numbers. I have to say that it wasn't easy to find this information!

Post Reply