[Papervision3D] Instances and children

jakelewis jakelewis at blueyonder.co.uk
Mon Jan 15 13:53:04 EST 2007


Hi Carlos,
Yes, that seems well thought out.
As discussed in previous threads, its quite likely that a model would have
more than one material, so the material property would need to be on polygon
rather than instance of model.But this would then make it hard to reuse a
model with a different material.
 Another approach - having two or more sibling models with different
materials (say for a car with body parts and window parts)  - would require
them to be sorted as one model.

Ah Complications, Jake



  -----Original Message-----
  From: Papervision3D-bounces at osflash.org
[mailto:Papervision3D-bounces at osflash.org]On Behalf Of Carlos Ulloa
  Sent: Monday, January 15, 2007 12:23 PM
  To: Papervision3D at osflash.org
  Subject: [Papervision3D] Instances and children


  Hello all,

  These are the two significant changes I'm working on.

  Instances
  The idea is that the objects we create or load are symbols and when we
push them into the scene we create instances.

  This way different instances can share the same geometry. Each instance
would have its own name, transform matrix (position, rotation, scaling) and
material properties, which is a concept very familiar. This would affect how
we currently work, but I believe it's a necessary change.

  We would push a Geometry into the scene and it should return a
DisplayObject3D so we can keep track of it. In the same way we do with
movieclips, we would need to include the object in the scene before for
example, setting its position.

  Children
  DisplayObject3D would have children and transformations would be applied
across the parent children tree. Objects in the scene would be sorted only
between themselves. Children of an instance would sort at face level. Would
be cool to have the same api as in AS3, with addChild and getChildByName.

  For example you could have an X-Wing with each wing being a separate chil
you can rotate as you move the main object. As it is now, you would have to
keep track of the body and each wing as they would have to be different
objects.

  Also would like to rename Mesh and Points and move them from the objects
package to core.geom -I think it makes sense to leave outside core only the
objects that are easy to use.

  As usual, any thoughts are welcome.

  C4RL05
  // noventaynueve.com
  // papervision3d.org



  ---- 8< -------- 8< -------- 8< -------- 8< -------- 8< --------
8< -------- 8< -------- 8< -------- 8< ----

  In other words...

  core

     proto

        DisplayObject3D
           name :String
           children :[ DisplayObject3D ]
           geometry :GeometryObject3D
           materials :{ MaterialObject3D }

        SceneObject3D
           push( geometry:GeometryObject3D ):DisplayObject3D

        GeometryObject3D
           name :String
           vertices :Vertices3D
           mesh :Mesh3D
           materials :{ MaterialObject3D }

     geom
        Vertices3D
        Mesh3D

  objects

     * extends GeometryObject3D



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/papervision3d_osflash.org/attachments/20070115/ad8b836e/attachment.htm


More information about the Papervision3D mailing list