Image Texture - messy

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
shoepie
Posts: 144
Joined: Wed Dec 13, 2006 8:43 pm
Location: UK
Contact:

Image Texture - messy

Post by shoepie »

Hi,

Anyone know if I doing something wrong here? I'm getting some annoying texture problems.

http://www.shoepie.co.uk/misc/dancing_pirate_1.mov

The trousers (pants to any Americans :) ) are one shape with a jpg image stretched (tiled has same problem too). Then animated actions with bones and some small point fixing (although i had the problem before point fixing too).

Source:
http://www.shoepie.co.uk/misc/pirate.zip

Any help fixing it would be appreciated.
ShoePie.co.uk - My animations.
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

Well, the problem seems to be that if you warp the texture too much, the fill color will "bleed in".

I've tried to fix this by creating a copy of the bone layer, copy the extreme to frame zero, and mold the vector layer to fit the bones. Next, I switched between both copies at the appropriate frame. However, this resulted in a sudden change in the texture fill.

Image

The first 12 frames are without layer switching, and the yellow fill of the trouser and blue fill of the shoes "bleed in". The next 12 frames of this animation switches between the two bone layers. Note that the second animation is off model, meaning that this method doesn't work at all.

My advice is to select your fill color wisely and do some point animation to move away the patches of fill color at the edges.
User avatar
synthsin75
Posts: 9968
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

I don't really think that the image texture was intended to be used with distorting shapes. I tryied everything I could think of, but you seem to have the best it can do. The problem seems to be that when two parts of the same image texture shape overlap they cancel each other.
Your problem is occuring just before an 'overlap'.

I think the original feature request for this was taken a bit too literally. The original request example was of a image texture that could be rotated by a single bone. Multiple bone distortions seem to cause either this overlap you're seeing or white edges to appear.

:cry:
User avatar
shoepie
Posts: 144
Joined: Wed Dec 13, 2006 8:43 pm
Location: UK
Contact:

Post by shoepie »

Thanks for taking a look guys. That's a shame it doesn't like the overlapping. I hadn't noticed the 'bleed in' problem but I see what you mean now.

I tried splitting the trouser's into two simpler shapes for each leg but the same overlap problem still happens across shapes. Oh well, I'll just have to give the character a nice checkered waistcoat instead.
ShoePie.co.uk - My animations.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

The problem is where the legs overlap. When one leg goes up next to the other leg part of the image overlaps.

Two ways I would fix this:


Option 1
Create a new image that has an alpha that hides some of the overlap that would appear there and it should take care of it. You will need to save as a PNG instead of jpg. You need an alpha mask.

You don't want to create an alpha channel for the image that is tightly bound to the legs shape in AS, just enough of a mask to avoid the overlap.

Imagine the whole image being distorted by the bones. The WHOLE image not just the parts that show through the shape of the legs. When that leg bends up, part of the image that should be hidden is going to show through.

Using option 1 you won't be able to have the legs "overlap" at all. The image texture is continuous through the shape.

Option 2
What I would do is have TWO shapes and two images for the legs split in the middle. Then each shape is separate and there is no overlap problems.

-vern
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Oops!

I made a mistake. I thought the above solution would work in this case but it doesn't.

Here's the scoop on image distortion with bones:

Region Binding
Region binding is more of a "block" type distortion. It almost forms a sort of "stiff" box around the image. You get "corners" that overlap causing that problem with the leg.

Flexible Binding
Flexible bone binding blends all the bones distortion evenly creating a smoother flexible distortion that eliminates the overlap problem.

I have yet to really play around with all the issues surrounding image distortion with bones. That overlap problem with region binding is a real pain. It wouldn't be a problem if the colors didn't get so dark in the overlap area. If it just bunched up and "looked" funny that would be fine. It is the "multiplying" or weird boxiness of the color that makes it a problem.

I want to experiment with STRETCHING the image and using bone offset at some point.

-vern
User avatar
shoepie
Posts: 144
Joined: Wed Dec 13, 2006 8:43 pm
Location: UK
Contact:

Post by shoepie »

Thanks for taking a look Heyvern.

I was using Region binding, I'll try point binding next but I'm not hopeful. I tried Option 2 but as you said it doesn't work.

Good idea about bone offset! I never use it so I forgot about it, but that could work, i'll give it a try in the morning.
ShoePie.co.uk - My animations.
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

If you don't mind the pattern to remain at the same location, relatively to the background, this is a possible technique: I exported the individual frames without fills to PNG files, filled with a pattern in an image editor and re-imported the image-sequence into Anime Studio, using the import image sequence script. It is a strange effect, and for that alone, it might be useful.

(BTW If you select the empty fill, enlarge the selection by 2 pixels, so you don't get any closure errors at the edges.)

I created this pattern file to fill:

Image

BTW2 I tried both region binding and flexible binding, and both have the fill bleeding into the edges if you warp your texture fill too far. The effect is less in flexible binding, because it doesn't warp the vectors as far as region binding. If you bend a little bit further, so you get the same distortion as region binding, things get just as bad with flexible binding.

BTW3 Perhaps the best method is to export to PNG files, do some image editing, to remove the irregularities, and re-import as an image sequence.
User avatar
synthsin75
Posts: 9968
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

:lol: Wow, that sounds like a lot of work to duplicate the ASP5.5 behavior. This is exactly why I kept my 5.5 :roll:
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

synthsin75 wrote::lol: Wow, that sounds like a lot of work to duplicate the ASP5.5 behavior. This is exactly why I kept my 5.5 :roll:
Still, the 5.6 version looks a lot better than the 5.5 version (if you just remove those bad pieces).

For a comparison, see this version I rendered using Anime Studio Pro 5.4 (I never downloaded version 5.5): I hope that in the next release this bleeding of the fill color into the edges will be fixed.
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

shoepie wrote: I was using Region binding, I'll try point binding next but I'm not hopeful. I tried Option 2 but as you said it doesn't work.
Point binding won't make any difference. You need to set the bone layer to either region or flexible. Flexible works better with images, region works better in general with vectors.

Actually some "extra" bones in strategic places would eliminate some the overlap problems. The problem is when big huge "chunks" of image overlap. If all parts of the image are controlled by a bone (as they would be with flexible binding) there is NO overlap at all... ever. Region binding forces parts of the image to double on itself when there aren't enough bones.

-vern
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

Wasn't there an example in which Mike Clifton showed how to bind points to bones and have exact control? IIRC each bone had exactly 2 points, one on each side of a shape. Also, symmetric shapes bend more predictable than asymmetric shapes.
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

Here is the influence of the number of points:

Image

I created four files with each three identical bone layers, the master/slave script to sync the layers, an image of a grid, and two vector rectangles with 4, 8, 16 and 32 points (number points differ per file), respectively. The two vector rectangles were filled with the image texture, one tiled and the other stretched. I also created four layers inside each bone layer, that represent each bone. The bone strength of each bone covers the entire rectangle.

As you can see, the yellow vector rectangle is warped differently than texture fill. However, the more points you add to the rectangle, the better the texture fill looks like the warped image at the far left.

You can download the project files here: I'm curious if a problematic shape filled with image texture improves if you increase the number of points significantly. Here I needed 8 times as much points as is needed to create the rectangle.

I'm sure that you need to place your vector points strategically in your image texture filled vector shape. I haven't tested this yet, though.
Post Reply