We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi all!
I want to do something like this in processing:
https://mir-s3-cdn-cf.behance.net/project_modules/disp/7d7bf511219015.560f42336f0bd.gif
I have one image which I use as a texture and I'm constructing complicated plane with beginShape(TRIANGLE_STRIP) to reach
a similar effect, but it's quite difficult to render texture with letters on such complicated object.
I thought that it would be much easier to have one rect with this inscription and after that blent this rectangle in different ways.
But I have no idea how to do this?
I will be very thankful for any suggestion!
Answers
i don't think you need to do much more than change the z position of bits of the text to get that effect. which means the texture mapping is quite easy.
pick a point on the top edge and a point on the bottom edge. move these towards the camera. create a quad using the left hand corners and the moved edge and another using the moved edge and the right hand quarters.
actually, looking at frames from that, it is 9 sections, 3 for each line, with a diagonal cut across each of those 9 sections. BUT the texture coords for those don't change, just the positions of the corners.
@koogs Does it mean that I should have 9 texture images and 9 separated shapes for this? I mean I shouldn't use beginShape function parameters like TRIANGLE_STRIP or QUAD_STRIP ? Thanks for help!
TRIANGLES will be easier to get working, i think. i don't think you can do it in one TRIANGLE_STRIP
and use
vertex(x, y, z, u, v)
u and v are just combinations of 0.0, .333, .666, 1.0, assuming you're using
textureMode(NORMAL);
the image, image.png, is 640x480 but it should handle other sizes.
press a key to distort the text.
@koogs wow! thanks a loooot!