Jump to content

Discussion about nodes, meshes, instances


gwenael
 Share

Recommended Posts

I like the idea of storing worldMatrix in the node. BUT what kind of matrix would you store for an hemispheric light or an oculus camera? 

 

I don't know much about your code for them but I would say I would store _worldMatrix for a hemispheric light which is already an attribute of HesmisphericLight, and couldn't the inverse of _currentViewMatrix be stored for OcculusOrientedCamera? An OcculusStereoCamera could be a basic Node with two child OcculusOrientedCamera. Actually this is another subject but that would be nice to switch a camera from a type to another one. In this way we could use a camera, then use it as an anaglyph camera or an occulus stereo camera. There would be no need to have AnaglyphFreeCamera and AnaglyphArcRotateCamera. 'Anaglyph' would be the current behavior for the camera associated to the 'ArcRotate' or 'Free' behavior. Something closer to components than inheriting in fact, of course when behaviors are compatible.

Link to comment
Share on other sites

And which be in turn less easy to use for developers :)

We tried to use the component way for oculus camera: the result is a mess of unmaintainable code that I will have to fix one day. I do not want to bend the code just for "the beauty of the code".

 

Look at the code of Anaglyph cameras against oculus cameras: They both do the SAME thing at the end of the day. The component way is not always a good idea.

Link to comment
Share on other sites

OK, I will have to trust you on this one. I would have noticed it by myself but certainly too late.

 

Anyway that was a side topic. What about hierarchy and transforms in Node, would there be too many side effects?

 

I see advantages but I don't know enough the whole project to see inconvenients. One of the advantage would be to have nodes that could be used as parents to 'group' nodes (other groups or meshes/lights/cameras) together. A Mesh would have to have a geometry (could be not loaded though) and thus there wouldn't be special cases inside of Mesh for the instances which don't have vertices.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...