Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update how 3D objects are referenced #263

Closed
5 tasks
tarelli opened this issue Oct 5, 2014 · 8 comments
Closed
5 tasks

Update how 3D objects are referenced #263

tarelli opened this issue Oct 5, 2014 · 8 comments
Assignees

Comments

@tarelli
Copy link
Member

tarelli commented Oct 5, 2014

What we received from the server
entity.aspect.VisualizationTree.content.segment1
We don’t receive these objects when we load a Collada file

The scene graph is something like this
VARS.scene.obj1.obj2.obj3….mesh1
These objects are created in both cases, whether we have a Collada file or whether the server is sending to the client geometries which need to be created

Requirements

  • We want to be able to univocally identify a specific three.js Object3D
    • This can be a mesh (where material transfs should be applied, as well as translations, rotations...)
    • This can be an Object3d (where translations/rotations can be applied)
  • We want to be able to find a given Object3D given its identifier
  • Every Object3D in the scene graph should know to what entity/aspect it belongs to
  • Every Object3D needs to have a unique identifier, whether it is coming from the server or from a collada file

We should create methods like this
List : getAll3DObjectsForAspect(aspectInstancePath)
Object3D : get3DObjectFromAspect(aspectInstancePath, id)

Inside addDynamicVisualization if a specific Object3D is specified the transformation is applied only to that object, otherwise it is applied to every Object3D contained in the specified aspectInstancePath

Actions

  • Create getAll3DObjectsForAspect
  • Create get3DObjectFromAspect
  • Make sure all 3D objects have a field called geppettoId and is set
  • Make sure all 3D objects have a field called aspectInstancePath and is set
  • When we create 3D objects given what we receive from the server (like in hhcell for instance) we need to make sure that the geppettoId is set for the created object and that is equal to what was specified in the object coming from the server
@tarelli
Copy link
Member Author

tarelli commented Jan 20, 2015

@tarelli to discuss with @jrmartin

@tarelli
Copy link
Member Author

tarelli commented Jan 21, 2015

@borismarin discussed with @jrmartin here is what seems to be the best way to do this, do you see any problems with it? Once you are happy with it we can update the card.
Design

@borismarin
Copy link
Member

In the "tomorrow" case, when you say 3D objects (inside viztree) do you
mean the Three.js objects? Because those need to
live inside the Three scene (which is currently stored in VARS.scene) in
order to be displayed.

And what about the Collada case, when the client doesn't "need" to create
any 3d object explicitly (the Collada loader does that behind the scenes).
What will be in the viztree?

On 21 January 2015 at 19:17, Matteo Cantarelli notifications@github.com
wrote:

@borismarin https://github.com/borismarin discussed with @jrmartin
https://github.com/jrmartin here is what seems to be the best way to do
this, do you see any problems with it? Once you are happy with it we can
update the card.
[image: Design]
https://camo.githubusercontent.com/0c0e54bc959dad52f25ff1b684245e3b06a15cd5/68747470733a2f2f7777772e6c7563696463686172742e636f6d2f7075626c69635365676d656e74732f766965772f35346266663935302d356339632d343137382d613132372d3438653630613030643763632f696d6167652e706e67

Reply to this email directly or view it on GitHub
#263 (comment)
.

@tarelli
Copy link
Member Author

tarelli commented Jan 21, 2015

The 3D objects would still be added to the scene but the mapping inside VARS called meshes indexed by a string would go away. @jrmartin to confirm.
The collada case is no different, the 3D objects (the car) would still be inside entity.aspect.VisualizationTree.content.car (added to the scene too of course)

@tarelli tarelli modified the milestones: Sprint 44, Sprint 43 Feb 9, 2015
@tarelli tarelli added in progress and removed ready labels Feb 9, 2015
@tarelli
Copy link
Member Author

tarelli commented Feb 9, 2015

@jrmartin will be merging this branch into widgetsimprovements and we'll test everything together there, thanks @borismarin!

@tarelli
Copy link
Member Author

tarelli commented Mar 3, 2015

What was in the branch has been merged into development but I think there are still some things to do, e.g. the meshes have not moved inside the viz tree.

@tarelli tarelli removed this from the Sprint 44 milestone Mar 3, 2015
@borismarin
Copy link
Member

I've left a bunch of TODO comments all over the code, which are still there after the merge. And I didn't have time to start any of the 3d ref stuff, mostly due to time invested in refactoring parts of the code which were hard to understand (removed some dead code blocks, confusing logic and even some bugs). I'm still under "paternity leave", so I won't be able to discuss the TODOs and finish this card in the near future.

@tarelli
Copy link
Member Author

tarelli commented May 4, 2017

Obsolete, closing

@tarelli tarelli closed this as completed May 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants