SceneView.txt 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. GIZMO TODO:
  2. - Figure out how to deal with builtin components like Camera and Renderable (e.g. how will they have gizmos since they're not managed components?)
  3. - Make those two a non-component types. Anywhere they are used in the Renderer they should just be passed as pointers.
  4. - Then make a Component wrapper around the non-component types, and also a C# wrapper around the same types
  5. RESOURCES CAN BE INCORRECTLY CAST between each other. e.g. HSpriteTexture to HTexture will be cast implicitly.
  6. REFACTOR material getParams* and related classes. Those params should update all gpu program params that share that variable, not just the first found
  7. Icon appears faded even if it renders in front of a mesh (OpenGL). Likely wrong depth.
  8. Crash related to Handles when object is selected
  9. Test gizmos
  10. - HOOK UP GIZMO SELECTION and test it
  11. Test handles
  12. - Test basic move handle
  13. - Test a custom handle from C#
  14. - FINISH HANDLE IMPLEMENTATION AND GLUE EVERYTHING TOGHETHER
  15. IMPLEMENT SELECTION RENDERING
  16. IMPROVE SceneGrid LOOK
  17. - LIKELY USE PIXEL SceneGrid WITH AA
  18. - OR (better) instead of drawing rows and columns of lines, just draw a plane with procedural texture
  19. Need a way to drag and drop items from Scene tree view to Scene view
  20. LATER:
  21. - Need a way to render text for gizmos and handles, and in scene in general
  22. - Add drag to select
  23. - Need a better system to catch broken shaders. DX11 just draws nothing with depth, DX9 draws all white.
  24. ----------------------------------------------------------------------
  25. Handles
  26. SliderLine - position, direction, length
  27. - When initially activated it records position nearest so the line as the starting point
  28. - Further mouse dragging also finds nearest position to the line
  29. - Difference between those two results in a float value (how much to move along direction from position to reach new position)
  30. - Slider line has a capsule + sphere collider size of which can be set manually
  31. SliderPlane - position, normal, size
  32. - Similar to line slider only the direction is determined dynamically as well as distance
  33. - Outputs a Vector2 (direction * distance moved)
  34. - A OOB is used as a collider
  35. SliderDisc - position, normal, radius
  36. - When initially activated it records position nearest so the disc as the starting point
  37. - Further movement calculates the dynamic direction from the starting point to the current point on the plane the disc lies on
  38. - Distance along that direction is returned as amount of movement (similar to line slider)
  39. - Outputs a single float
  40. - A torus is used as a collider
  41. Free move/rotate/scale handles need to exist as well
  42. - Scale is easy, just perform uniform scale. Use SliderPlane oriented towards camera
  43. - Move also use SliderPlane oriented towards camera
  44. - Rotation use SliderDisc oriented towards camera
  45. ----------------------------------------------------
  46. STAGE 1
  47. CONCRETE TODO:
  48. HandleSliderPlane/HandleSliderDisc
  49. - update() implementation
  50. ----------------------------------------------------
  51. STAGE 2
  52. Implement RotateHandle & ScaleHandle in C#
  53. - Nearest point to disc/arc code
  54. Add free move, free rotate, free scale functionality
  55. Handles that remain the same size regardless of distance from camera
  56. - For both drawing and collision
  57. More complex types for drawing like DrawArrow in HandleDrawManager
  58. ----------------------------------------------------------------------
  59. SelectionRenderer
  60. Retrieve a list of selected objects from SelectionManager
  61. Find ones with Renderable components
  62. Retrieve Meshes, and world transforms from them
  63. Draw that same mesh with either a wireframe or a grayed out shader with a slight depth bias
  64. ---------------------------------------------------------------------
  65. Multi-resources
  66. Importer::import
  67. - Each SpecificImporter is responsible for importing all needed resources and registering them with Resources manager
  68. - However only the main resource is returned from that method
  69. - Rest of the resources are referenced by the UUID in ResourceMeta and can be retrieved there if needed
  70. Resources::save
  71. - Add to documentation that it will only save that exact resource and not any dependencies, you must call save() for them manually
  72. Resources::load
  73. - Will automatically load all dependencies, optionally add a boolean that allows you to load only the main asset
  74. ProjectLibrary
  75. - Needs to be extended so it shows sub-resources in tree view
  76. - Need to extend my mapping so one asset maps to multiple assets in library (need to remember how I do that currently, is it just by name or meta-file identifier?)
  77. ---------------------
  78. With this approach I can:
  79. - Reference and load the sub-resources directly
  80. - Technically I can also delete sub-resources