The tiling is the whole idea here. except your params are probably wrong.
Because its directly linked to the geometry constructor.
depending on Plane rotation the source must represent the same orientation.
So if you have a definition thinking in height, where both 1/2 parts on on top
of each other. so must be the source as well.
or the offsets you pass. otherwize you indeed get repeats or a blow up fx.
If I were you I would just concentrate on one plane first.
apply the offset until you get the upper or left (depending on layout) 1/2 of
your movieclip
then do same for the other except you add a factor offset for the second 1/2.
tiling:
the plane is mapped with a value range of 0 to 1 on both x/u and y/v
so when you assign the map, the plane will do all it can to display the whole
source
by saying .5 you reduce by 50% this
on second one its the same except you "scroll" the uv's with an addition of .5.
If your source is exactly representing 1/1 of the two planes, you might not
even need to set the LockH and W...
Fabrice
On Apr 27, 2010, at 3:53 PM, Colir wrote:
> Hi fabrice,
> im really sorry but i try what you say, and i get the result i
> except...the movieMaterial are tilled...
> here is my code:
>
>
> var topMatClip = new Rectangle(0,0,1182,525)
> var bottomMatClip = new Rectangle(0,525,1182,1050)
>
> var rainningMatTop:MovieMaterial = new MovieMaterial(rainningPlan,
> {smooth:true,precision:2,lockH:525,clipRect:topMatClip});
> var rainningMatBottom:MovieMaterial = new MovieMaterial(rainningPlan,
> {smooth:true,precision:2,lockH:525,clipRect:bottomMatClip,offsetY:
> 525});
>
> var topPlane = new
> Plane({material:summerMatTop,back:rainningMatBottom,bothsides:true,width:
> 1182,height:525,segmentsW:3,segmentsH:3});
> var bottomPlane = new
> Plane({material:summerMatBottomBack,back:summerMatBottom,bothsides:true,width:
> 1182,height:525,segmentsW:3,segmentsH:3});
>
> wahts wrong with this ?
>
> thanks you very much
>
> On 24 avr, 14:59, Fabrice3D <[email protected]> wrote:
>> MovieMaterial has LockH and W and a clipRect. Both planes with
>> 500,500 locks. On clip rect with 0,500 on H, the other 500,1000. Set
>> on second material offsetY to .5.
>> So you have two materials using same mc but clipping is different.
>>
>> Note that cliprect defines the region that will be updated.
>>
>> Fabrice
>>
>> On Apr 24, 2010, at 10:00, Colir <[email protected]> wrote:
>>
>>> so the only solution i found is this one:
>>
>>> context :
>>> i have 2 plane and one texture as MovieMaterial to use on it. i want
>>> to split my texture.
>>
>>> my planes is 500px height and my Movie material is 1000px height.
>>> I want my bottom texture to be 180° flipped
>>
>>> here is my code for the texture :
>>
>>> var summerMatTop:MovieMaterial = new MovieMaterial(summerPlan,
>>> {smooth:true,precision:2,lockH:747});
>>> var summerMatBottom:MovieMaterial = new MovieMaterial(summerPlan,
>>> {smooth:true,precision:2,scaleY:-2,offsetY:2988});
>>
>>> i dont know if is the best way to do this.
>>
>>> Can you give me your feedback ?
>>
>>> On 22 avr, 19:04, Colir <[email protected]> wrote:
>>>> hello,
>>>> i'm looking for a solution to give an negative offsetY value to a
>>>> movieMaterial that i use on a plane.
>>
>>>> i have two MovieMaterial and one plane.
>>>> My plane is half height from the movieMaterial
>>
>>>> The idea is to use the top part of the first MovieMaterial for the
>>>> front, and use the bottom part of the second for the back.
>>
>>>> MoviesMaterials must be bigger than the plan (2x plane height),
>>>> because i will invert the part of them during the animation i create
>>
>>>> The problem is that when i setup a negativeoffset, the texture is
>>>> tilled, cause i also setup the lockH property to keep aspect ratio of
>>>> the movie clip
>>
>>>> here is my code :
>>
>>>> var summerPlan:MovieClip = new SummerPlan() as MovieClip;
>>>> var rainningPlan:MovieClip = new RainningPlan() as MovieClip;
>>
>>>> var summerMatTop:MovieMaterial = new MovieMaterial(summerPlan,
>>>> {smooth:true,precision:2,lockH:742});
>>>> var rainningMatBottom:MovieMaterial = new MovieMaterial(rainningPlan,
>>>> {smooth:true,precision:2,lockH:742,offsetY:-742});
>>
>>>> How i can fix this please?
>>
>>>> thank you very much.
>>
>>>> --
>>>> Subscription settings:http://groups.google.com/group/away3d-dev/
>>>> subscribe?hl=en