these example is exact in terms of functionality
x+ will test the outmost maxX fopund as offset for the mirror, same nut 
reversed for x-

using mirror x is also correct, but that doesn't mean your model is.
let me explain: if you plan for instance to mirror on x, at 0,0,0
then because model will be exactly mirrored at that point, it means that your 
model should be excenter in your modeler so that x 0 is at side of your model.
plus , if you do not set the mirror mesh duplicate to false, you will get an 
additive result. the mirrored part become part of the original model.

your "i" comfirms the above, by looking at the shared space at the base 0,0,0 
of the geometry.

play around with the settings in Prefab, it's not having the unique mesh option 
there yet, but you should be able to test


Fabrice

On Mar 4, 2010, at 4:29 PM, Wex wrote:

> Okay, some Mirror testing; this is the scene creation code:
> 
>               private function buildMirrorTest():void
>               {
>                       var mat:ShadingColorMaterial = new 
> ShadingColorMaterial(0xFFFF00);
>                       var sphere:Sphere = new Sphere( { radius:4, 
> material:mat } );
>                       m_view.scene.addChild(sphere);
> 
>                       mesh = Max3DS.load("axis.3DS");
>                       mesh.addOnSuccess(flip);
>                       m_view.scene.addChild(mesh);
>               }
> 
>               private function flip(_event:Loader3DEvent):void
>               {
>                       var cube:LoaderCube = _event.target as LoaderCube;
> 
>                       cube.handle.x = 0;
>                       cube.handle.y = 0;
>                       cube.handle.z = 0;
>               }
> 
> This just loads a basic multiple-mesh model as seen here:
> http://www.creativenorth.co.uk/post-content/away003.png
> 
> There are 4 meshes in this model, one for the main three bars and one
> each for the three end-cubes. All have the same material applied.
> 
> If I then apply a Mirror be making the following change:
> 
>               private function flip(_event:Loader3DEvent):void
>               {
>                       var cube:LoaderCube = _event.target as LoaderCube;
> 
>                       cube.handle.x = 0;
>                       cube.handle.y = 0;
>                       cube.handle.z = 0;
> 
>                       Mirror.apply(cube.handle, "x", true, true);
>               }
> 
> I get the correct, expected, result:
> http://www.creativenorth.co.uk/post-content/away004.png
> 
> However using either x+ or x- gives the following respectivly:
> http://www.creativenorth.co.uk/post-content/away005.png
> http://www.creativenorth.co.uk/post-content/away006.png
> 
> In addition; if I do:
>               cube.handle.x = -40;
>               Mirror.apply(cube.handle, "x", true, true);
> 
> It should mirror about the world origin, but I get (yellow sphere is
> at 0,0,0):
> http://www.creativenorth.co.uk/post-content/away007.png
> 
> It's worth noting that the same results are seen if the Mirror's
> recenter parameter is set to be false.
> 
> -Wex
> 
> On Mar 4, 1:16 pm, Fabrice3D <[email protected]> wrote:
>> Mirror with prop "x", if the model is at 0,0,0 AND recentered AND duplicate 
>> mesh is false, will perfectly mirror.
>> The class doesn't recenter the mesh for you, simply because you might no 
>> want it to do it.
>> 
>> Fabrice
>> 
>> On Mar 4, 2010, at 1:44 PM, Wex wrote:
>> 
>>> Indeed, after further debugging I determined that it was Mirroring the
>>> LoaderCube and not the final mesh.
>> 
>>> I've added an event handler via addOnSuccess() and now I manage to
>>> flip the right mesh. Not 100% about how it's flipping right now as it
>>> doesn't seem to flip about the world origin and the +/- options don't
>>> seem to do the right thing as I would expect. However, I'll do some
>>> more looking into the issue before making a formal query about it.
>> 
>>> Thanks for the help.
>> 
>>> -Wex
>> 
>>> On Mar 4, 12:18 pm, Fabrice3D <[email protected]> wrote:
>>>> then you do not target the right mesh...
>>>> Drop your model in Prefab, select your mesh and open mirror panel..
>>>> just to see whats happening...
>> 
>>>> Fabrice
>> 
>>>> On Mar 4, 2010, at 1:03 PM, Wex wrote:
>> 
>>>>> Cheers for replying. I've tried all the flips. Just done x+ and x-
>>>>> again to be sure; still nothing.
>> 
>>>>> Also, the object isn't at 0,0,0. I move it as shown in the posted
>>>>> code.
>> 
>>>>> -Wex
>> 
>>>>> On Mar 4, 11:23 am, Fabrice3D <[email protected]> wrote:
>>>>>> it might do it, but no being obvious... especially if your model is at 
>>>>>> 0,0,0 and symetrical
>>>>>> try x+ or x- just to see.
>> 
>>>>>> Fabrice
>> 
>>>>>> On Mar 4, 2010, at 12:08 PM, Wex wrote:
>> 
>>>>>>> Been banging my head against this for a few hours now... for some
>>>>>>> reason when I mirror a mesh loaded from a 3DS file, it doesn't do
>>>>>>> anything. Here's the code I'm testing with:
>> 
>>>>>>>    var mat:ShadingColorMaterial = new ShadingColorMaterial(0x00FF00);
>>>>>>>    var sphere:Sphere = new Sphere( { material:mat, segmentsH:6,
>>>>>>> segmentsW:6, radius:10 } );
>>>>>>>    sphere.x = -20;
>>>>>>>    sphere.z = -200;
>>>>>>>    m_view.scene.addChild(sphere);
>>>>>>>    Mirror.apply(sphere, "x");
>> 
>>>>>>>    var mesh:Loader3D = Max3DS.load("wall.3DS");
>>>>>>>    mesh.x = -20;
>>>>>>>    mesh.z = -200;
>>>>>>>    m_view.scene.addChild(mesh);
>>>>>>>    Mirror.apply(mesh, "x");
>> 
>>>>>>> The sphere mirrors wonderfully, but the 3DS just shows up as normal.
>>>>>>> I've dumped a load of trace-ouputs in Mirror.as to see if it's doing
>>>>>>> anything, and it does reach the obj.addFace call; all the verts seem
>>>>>>> to be mirrored as expected... so I'm at a loss at to what's going on.
>> 
>>>>>>> I'm running v3.4.0 of Away.
>> 
>>>>>>> Any ideas?

Reply via email to