Squeezing an image into a shape with a distorted grid

Post questions on how to use or achieve an effect in Inkscape.
ashes
Posts: 2
Joined: Wed Jun 13, 2012 7:02 pm

Squeezing an image into a shape with a distorted grid

Postby ashes » Wed Jun 13, 2012 7:43 pm

Hello.

I would like to apply this camouflage pattern:
Image

To the blowfish in this image:
Image

The camouflage pattern is reasonably pixelated, so it should take well to a grid. I want the camouflage pattern stretched and bent along the grid that makes up the blowfish.

After, I want to put that object on a camouflage background, so at a glance you don't notice the blowfish. It would only be noticeable with a concentrated look.

Thanks

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Squeezing an image into a shape with a distorted grid

Postby brynn » Wed Jun 13, 2012 9:38 pm

Image
Welcome to InkscapeForum!

Oh gosh! I don't think Inkscape can do that -- at least not automatically. I can think of a couple of general approaches, but they are untested, and probably won't achieve exactly what you want.

One would start with drawing a bunch of tiny squares. Give them various colors from the camo pattern. Then you'd have to move the squares into the grid (one by one) and after converting to paths, distort them to match the distortion of the grid. Snapping could be used to make it go faster, somewhat. I'd probably use tiled clones to create the original tiny squares. It would be tedious work, but you could probably achieve something pretty close to what you want, eventually.

Or....I don't know, you might be able to use either all the vertical lines or all the horizontal lines, and apply a pattern along the path, where the pattern consists of tiny squares with the camo pattern colors. That would be a pattern along path of all the horizontal or vertical lines. But the pattern of tiny squares would have to differ. Maybe you could use the pixelated camo pattern to create a bunch of linear patterns. The problem with this approach is that the patterns would only be distorted along either x or y, so you'd still have to do a lot of tweaking. The result would not be as good as my first thought.

Also, I see that both images are raster images. That means that the fish would have to be traced from the originals.....assuming you want a vector result. .....Unless you have the SVG already?

I don't know if Adobe Illustrator will do this or not. But if it does, it will probably be some automatic technique. I'm also thinking that Blender (a true 3D modeling program) might actually be the best app to use for this! I'm not terribly familiar with it, but I think it might be able to do this. I don't think it could be done from the PNG though. It would probably have to be vectorized first. But again, I'm so familiar with Blender or 3D modeling.

By the way, how did you create the grid that comprises the blowfish? However you did that would be the best bet, because essentially, you simply want that grid to have color (technically grayscale, I guess). So I'm thinking that wherever the grid came from would be able to do the same thing with color added. Unless you didn't actually make the grid, and it's an image that you found already complete?

Well, I wish I had better info for you. Maybe someone else will have better tips?

ashes
Posts: 2
Joined: Wed Jun 13, 2012 7:02 pm

Re: Squeezing an image into a shape with a distorted grid

Postby ashes » Fri Jun 15, 2012 2:18 pm

I didn't make the blowfish, and I understand it would become a lot easier if I could reproduce the blowfish. With my skill level, I think I will need to fill each square one by one. But even with this method, it would be a big help if software could choose the corners of each square for me, or the lines, with vectors.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Squeezing an image into a shape with a distorted grid

Postby brynn » Sat Jun 16, 2012 11:21 am

Well, I did think of one thing that might speed things up a little, since my last reply. Unless you already have a vector of the blowfish, you'll need to use Path menu > Trace Bitmap, to convert it to vector. Then instead of drawing a bunch of tiny squares, you can use the Paint Bucket tool to fill the squares in the grid. You'll still need to do a little tweaking of the paths that the bucket tool creates, but far less tweaking than if you started with tiny squares. Note the Grow/Shrink setting on the tool control bar, when you have the Paint Bucket tool engaged. You can use the grow setting to prevent some gaps that are common with that tool, that form between the new colored path and the grid lines (in this case).

And actually......hhhmmm, let me do some quick testing...... Ok, yes, I thought I remembered that the Paint Bucket tool could work on raster images, but I wasn't sure. But I just tried it, and yes, it can fill areas of a raster image. So unless you have a need for the whole thing to be vector, you can skip using Trace Bitmap altogether. Just place the tool over one of the grid cells and click. Note that zooming in until a grid cell fills the Inkscape window, will reduce the gap that I mentioned before. There still will be a gap, but not as much. And you can set a grow value of something between 0.5 and 1.0 to fill in the gap. Also, you may need to adjust the Threshold setting. I had to put it over 20, on the image I tested with. Perhaps you won't need to adjust it at all. But if you click, and nothing happens, look at the status bar and it will tell you what the problem is. If it says something like "area is unbounded, cannot fill" you can adjust the Threshold.

I'm not sure what you mean by this:
....it would be a big help if software could choose the corners of each square for me, or the lines, with vectors.

Whatever it means, maybe it will be irrelevant with the new technique that I just described?

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Squeezing an image into a shape with a distorted grid

Postby druban » Sat Jun 16, 2012 1:29 pm

If you are adventurous and flexible! you can download a development build and use the 'lattice' LPE. You will have to convert your camo pattern to distort one path at a time, but the LPE will save the settings so you can easily apply them again. It's not a perfect solution, but it does give you 16 (IIRC) control points.
Your mind is what you think it is.

llogg
Posts: 443
Joined: Tue Mar 11, 2008 7:30 am

Re: Squeezing an image into a shape with a distorted grid

Postby llogg » Sun Jun 17, 2012 5:17 am

This seems like something you would use Blender for. Make the 3D model of the fish then apply the camo texture.


Return to “Help with using Inkscape”