I know that problem. That's happening because you are drawing a line from
one pixel to another on the 3D VAN, but between the coordinates on a UV map
that could be across the whole map!

So drawing a line from one triangle to another that may be across the map,
will actually draw a line on any triangles in between that.

I don't know of any fix, but you could try to minimize it a bit from
happening, by doing something like if(distance of last mouseX and mouseY >
somenumber) { then don't draw that line}.

Only way to completely stop that from happening is to allow people to draw
directly on the 2D map instead.

Another is not to allow lines to be drawn, but instead pixels that don't
connect to the last mouse position on UV map.

One other way is to make sure your whole UV map is one mesh although there
will be 1 seam somewhere that you might be able to skip by checking the
mouse distance.

-Pete

On Fri, May 13, 2011 at 9:29 AM, Albinal <[email protected]> wrote:

> Hi, I've got a model which I'm trying to draw on:
> http://www.albinal.com/van/
>
> I'm doing this by getting the UV coordinates through MouseEvent3D;
>
> UVX = event.uv.u * TexVan_mc.width;
> UVY = (1 - event.uv.v) * TexVan_mc.height;
> TexVan_mc.VanCanvas_mc.graphics.moveTo( UVX, UVY);
>
> All seems to be going well except that when you try and paint over
> certain seams (where the mesh has been cut to lay out the UV map) it
> goes a little funny. Try scribbling over where the cab joins the back
> box or the wheels. You should get something similar to this:
> http://www.albinal.com/van/van.jpg - with a few wild lines!?!
>
> On some seams though it's fine. Am I missing something?
>
> Many thanks.
>
> Ian




-- 
___________________

Actionscript 3.0 Flash 3D Graphics Engine

HTTP://AWAY3D.COM

Reply via email to