Hi again. I'm developing an application to do photoframing. So, I've
four cube/trapezoids that frames a picture:

http://marcosamedida.tecnopixel.com/paint.jpg

I need to apply the texture without deformation, simulating a real
wood piece, And ideally, i would use TransformBitmapMaterial for
tiling.

I've added Projector.project('left',cube) to my code, but it doesn't
look well.

Thanks for expend your time to help a newbie...



On 4 nov, 12:15, Fabrice3D <[email protected]> wrote:
> well, if you want your texture projected on the trapeze sides 1/1 as  
> your texture
> Take a look at Projector.as in away3d.materials.utils
> all you need is in there.
>
> The only thing you need to do is like in previous code, sort on sides,  
> and alter the faces uv's sharing same plan.
>
> btw note that in my previous code, you can get rid of dictionary  
> check, I was busy with other similar code where
> vertexes were not unique. in your case they are are since its the  
> vertices list...
>
> Fabrice
>
> On Nov 4, 2009, at 11:52 AM, Makc wrote:
>
>
>
> > I do not understand this problem. Is it not exactly what is supposed
> > to happen? See, for example, attached picture - suppose you move the
> > vertex of left-bottom face - why would there be any reason for texture
> > in top-right face to change? So, naturally there is texture break at
> > the edge after vertex is moved.
>
> > The simple way to "fix" this is to split the face in the net of small
> > faces (increase cube subdivisions) and move all of them in proportion.
> > This can be done with as3dmod, for example. Alternatively, you can
> > write clever material utilizing t-s in uvt data to change distortion,
> > or pixel bender shader (neither is easy).
> > <trapezoid.gif>

Reply via email to