shift parts of an image

tmp's picture

Hello everyone!

I want to realize a patch that shifts parts of an image like the picture in the attachment shows. I also want to change the size of these tiles and rotate them. How would you realize that? On cubes inside a 3d space? It is important that it saves the cpu :)

Thanks for your help!

PreviewAttachmentSize
qc.png
qc.png960 bytes

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

riviera's picture
Re: shift parts of an image

for a start - have a look at 'Image Texturing Properties Grid.qtz' found in /developer/library/quartz composer/examples/patches

(file attached - but good to check out other examples)

hope it helps

PreviewAttachmentSize
Image Texturing Properties Grid.qtz11.76 KB

psonice's picture
Re: shift parts of an image

I'd say just chop the image up. Create however many sprites you need, and either split the image outside of QC, use Crop, or use image texturing properties as riviera suggests.

Then animate manually, or with javascript, or whatever. Using an iterator might make life easier, using lots of separate macros will be easier on the CPU. It's not likely to eat much CPU time either way unless you're using a LOT of slices, or doing something really complex with them.

tmp's picture
Re: shift parts of an image

ok thank you! that helps alot. but there are still 2 problems:

  1. before the image is tiled to row x column billboards I want to repeat the image like it is made in the "Image Texturing Properties Texture Tiling.qtz". otherwise there will be gaps. I don't know how to achieve this.

  2. I want to rotate the rows/columns but the image has to stay in its original orientation. then also diagonal shifts would be possible. Is this also possible with the approach from the "Image Texturing Properties Grid.qtz" example?

Sorry for my cheap questions, but I just started with QC and have to learn alot :) So thank you very much!

tmp's picture
Re: shift parts of an image

ok I got the idea how to make these tiles. but when I increase the number of rows the height doesn't work. how could I fix this?

and I still have no idea how to rotate this so that I can for example have diagonal instead of horizontal movement.

PreviewAttachmentSize
tilestest.qtz17.23 KB

tmp's picture
Re: shift parts of an image

Ok now nearly everything works fine. With this solution there seems to be a small problem - the image gets a bit blurry. I think that has something to do with the image in render. Does anyone have an idea how to fix it?

PreviewAttachmentSize
tmp_shifter.qtz21.07 KB

tmp's picture
Re: shift parts of an image

small update :)

PreviewAttachmentSize
tmp_shifter.qtz20.89 KB

jersmi's picture
Re: shift parts of an image

Hey, really nice job with that one...

tmp's picture
Re: shift parts of an image

has no one any idea how to fix the blurriness? :)

kimba23's picture
Re: shift parts of an image

Hey i just checked, nice work, if you make the "target" to default in the image textures properties patch inside iterator, it gets a little better.

gtoledo3's picture
Re: shift parts of an image

Does that rotation control work on your system?

For some reason, with a sprite, it doesn't work for me! It only works with a Billboard. This is really odd...when I "hover" to look at the tooltip, it shows that the image is tiled and at an angle, but it doesn't render that way on the Sprite. For some reason, the angle that is happening on that Sprite in the RII gets ignored for me.

That mipmapping setting, which causes the slight unfocused look, is something that you would usually enable to get rid of moire effect, like if you were tiling a "floor" with a repeating pattern; stuff that is distant starts getting a moire effect that's hard on the eyes and looks unrealistic. Enabling mipmapping smooths out the areas that exhibit that effect; it's a key to high quality visuals.

However, one should be somewhat careful using it, because it's not supported on all machines, and instead of falling back, stuff usually either won't render, or will look glitchy, depending on what patches are involved. I don't believe there are any info patches that will show if it works or not on a given machine either, which makes it hard to figure out how to program to bypass it on a non-supported machine. If anyone knows how to setup some logic for that, it would be cool to hear about.