gwenael Posted May 12, 2014 Author Share Posted May 12, 2014 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. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 12, 2014 Share Posted May 12, 2014 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. Quote Link to comment Share on other sites More sharing options...
gwenael Posted May 13, 2014 Author Share Posted May 13, 2014 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. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 13, 2014 Share Posted May 13, 2014 Let try to mock it up Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.