Page 1 of 1

quartz random NOT random!

Posted: Tue Aug 14, 2012 01:06
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.

Re: quartz random NOT random!

Posted: Tue Aug 14, 2012 02:07
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?

Re: quartz random NOT random!

Posted: Tue Aug 14, 2012 09:55
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.

Re: quartz random NOT random!

Posted: Tue Aug 14, 2012 12:58
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?

Re: quartz random NOT random!

Posted: Tue Aug 14, 2012 13:23
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.

Re: quartz random NOT random!

Posted: Tue Aug 14, 2012 14:04
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

Re: quartz random NOT random!

Posted: Tue Aug 14, 2012 14:05
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

Re: quartz random NOT random!

Posted: Tue Aug 14, 2012 14:21
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.

Re: quartz random NOT random!

Posted: Tue Aug 14, 2012 14:59
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!

Re: quartz random NOT random!

Posted: Fri Aug 17, 2012 16:07
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!