To follow on from ttv's explanation... ownCanvas is a boolean that when set to true will group an object (container, mesh etc) in it's own Sprite when rendering. this means that sorting is completely separated from the rest of the scene, and the object takes a single z-depth position to position it's sprite 'canvas' in with the rest of the 3d objects. Sometimes this is enough to correct sorting errors, but using pushfront or pushback gives you another level of control - you can pick the sorting depth to be taken at the front of the object rendered, or at the back (by default the sorting depth is taken as the middle). without ownCanvas these properties still haev affect, except in this case they act on individual faces, taking the front or back of the face rendered as it's sorting depth (again, default is the middle)
hope that makes things a bit clearer! Rob On Sun, Jul 12, 2009 at 10:42 PM, ttv <[email protected]> wrote: > > well...here is how I understand it: > object3D.pushfront=true forces the object to appear in foreground on > the finalrender. > object3D.pushback=true forces the object to appear in background. > but you have to use object3D.ownCanvas=true also for them to work. > > I had two objects that were so close to each other that away3d was > having trouble to decide what should appear on the front of what in > the final render. > So I set this parameters to correct this problem. > > hope It helps > > ttv > > On 12 jul, 15:52, Michael Iv <[email protected]> wrote: > > Hi,can you explain me in few words what are pushback and pushfront for? > > > > On Sun, Jul 12, 2009 at 5:29 PM, ttv <[email protected]> wrote: > > > > > Thanks for the info Pete. > > > > > The same camera aproach didin't work no matter how simple I made it. > > > > > but Right now I have only 2 layers so I grouped the objects under 2 > > > diferent ObjectContainers3D and set ownCanvas with pushback and > > > pushfront. This is working perfectly. > > > > > congratulations for away3D. Amazing work. > > > > > ttv > > > > > On 12 jul, 02:04, Peter Kapelyan <[email protected]> wrote: > > > > I think there may currently be a bug using the same camera in two > views. > > > > > > If so, can you try creating a new camera for view2 and before render- > > > copy > > > > x,y,z rotation etc from the other camera? > > > > > > Let me know if it works.. > > > > > > -Pete > > > > > > On Sat, Jul 11, 2009 at 11:26 PM, ttv <[email protected]> > wrote: > > > > > > > Hi, > > > > > > > I'm trying to setup 2 diferent views with the same camera. But I > get > > > > > runtime erros when I render. > > > > > > > here is the code that sets the views > > > > > > > // Create and set up the camera > > > > > camera = new TargetCamera3D({zoom:4, focus:200, distance:400}); > > > > > camera.z=1000; > > > > > camera.y=300; > > > > > camera.x=4780; > > > > > camera.target.x=camera.x; > > > > > > > //create views 3D > > > > > view= new View3D({camera:camera}); > > > > > view.clipping = new RectangleClipping({minX:-450, minY:-240, > maxX:450, > > > > > maxY:240}); > > > > > view_peoes= new View3D({camera:camera}); > > > > > view_peoes.clipping = new RectangleClipping({minX:-450, minY:-240, > > > > > maxX:450, maxY:240}); > > > > > > > view.x = 450; > > > > > view.y = 250; > > > > > base_3D.addChild(view); > > > > > view_peoes.x = 450; > > > > > view_peoes.y = 250; > > > > > base_3D.addChild(view_peoes); > > > > > addChild( base_3D ); > > > > > > > after that I add a lot of loaded 3ds files to both scenes. > > > > > > > I'm doing something wrong? > > > > > > > thanks > > > > > > > ttv > > > > > > -- > > > > ___________________ > > > > > > Actionscript 3.0 Flash 3D Graphics Engine > > > > > > HTTP://AWAY3D.COM > -- Rob Bateman Flash Development & Consultancy [email protected] www.infiniteturtles.co.uk www.away3d.com
