TODO.txt 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. --------- ALL LONG TERM TASKS / FIXES BELONG TO GOOGLE DOCS: ImplementationTODO OR PossibleImprovements ----------
  2. TODO - CoreObject refactor:
  3. Resource
  4. - Material -> Remove MaterialProxy
  5. Also:
  6. - Make RenderableHandler a CoreObject and remove CameraProxy
  7. - Rename CoreObject initialize_internal and destroy_internal to initializeCore/destroyCore and make them private
  8. GpuParams refactor:
  9. I need to ensure renderer buffers get set properly after GpuParams are synced
  10. - This used to up in updateMaterialProxy along with updating dirty params but since syncing
  11. is now internal to GpuParams I need to figure out a better way of doing it.
  12. (In case user overrides Renderer buffers)
  13. - Likely just an extra field on GPuParamsCore
  14. Should I force CoreObject sync whenever submitCoreAccessors is called?
  15. - This way I ensure the data is up to date. e.g. if user updates GpuParams and immediately performs
  16. some rendering use CoreAccessor that update will not register.
  17. - Also I can properly handle cases where sim thread needs to access core thread data immediately (e.g. RenderWindow HWND)
  18. - I'd have to remove submit() calls from CoreAccessors themselves and leave just the one on CoreThread
  19. Disallow CoreObject creation from core thread
  20. - Add asserts in CoreObject::destroy and CoreObject::initialize
  21. - Possibly also add asserts to CoreThread::queueCommand and CoreThread::queueReturnCommand
  22. New issues:
  23. - Since Mesh refactor when I select/deselect a gizmo the entire render texture flashes white for one frame (might be related to RT refactor instead)
  24. -----------------
  25. Refactor GizmoManager and HandleManager so they accept a CameraHandler
  26. - I need to ensure scene CameraHandler has proper position/rotation before being passed to handle and gizmo manager
  27. - Delete SceneViewLocator, I don't think it's used anywhere
  28. Port SceneCameraController to C#
  29. Port RenderTexture to C# and likely extend Texture2D so it accepts renderable flags. While at it add TextureCube and Texture3D as well.
  30. - Actually Texture2D doesn't seem to be implemented at all. Will also need to add PixelData wrapper.
  31. - Will I need to add support for readable textures? e.g. what happens when you try to read a texture from C#?
  32. - Almost certainly. It's very useful to be able to read textures.
  33. - I can't sync the threads when reading, it would be too slow. Have an AsyncOp similar to c++ code?
  34. - Also DX11 already creates a temporary staging buffer when reading from a texture, so keeping yet another CPU
  35. copy seems like a waste.
  36. Ensure that EditorWindow resize callback works properly.
  37. - Perhaps add OnResizeEnd callback that can be used for updating the render texture
  38. Create a C# wrapper around ProjectSettings
  39. Make a Script version of SceneEditorWindow
  40. - This would replace SceneEditorWidget so it would initialize scene grid and call
  41. update on handle manager and scene grid, as well as apply ProjectSettings to them.
  42. Move handle is buggy as hell - It moves in wrong direction sometimes, sometimes it skips, other times collision seems to be wrong
  43. Need a way to drag and drop items from Scene tree view to Scene view
  44. When dragging a handle make sure it works when cursor leaves the scene view
  45. Also make sure that handle manager receives mouse up event if its done outside of scene view
  46. AFTER I have scene widget in C#:
  47. - Finish up C# Handles class so it returns proper values
  48. - Ensure fixed handle size and handle snapping works
  49. - Implement free move handle and remaining handles
  50. - Test custom handles from C#
  51. IMPLEMENT SELECTION RENDERING
  52. IMPROVE SceneGrid LOOK
  53. - LIKELY USE PIXEL SceneGrid WITH AA
  54. - OR (better) instead of drawing rows and columns of lines, just draw a plane with procedural texture
  55. ---------------------------------------------------------------------
  56. Render textures in C#:
  57. - In C# have Texture2D, TextureCube, TextureVolume. They should have a common Texture base.
  58. - Each of those can be created with a Renderable flag
  59. - Render textures mirror what we have in C++
  60. - RenderTexture and MultiRenderTexture (since we have these separate representation we don't need RenderBuffer that Unity has)
  61. - You can provide an existing texture from types listed above, or create a new render target and
  62. create a basic 2D texture (multiple constructors)
  63. - Both RT types should have their color buffer (s) and depth buffer accessible as a texture to be used for rendering, or for reading
  64. ----------------------------------------------------------------------
  65. Handles
  66. SliderLine - position, direction, length
  67. - When initially activated it records position nearest so the line as the starting point
  68. - Further mouse dragging also finds nearest position to the line
  69. - Difference between those two results in a float value (how much to move along direction from position to reach new position)
  70. - Slider line has a capsule + sphere collider size of which can be set manually
  71. SliderPlane - position, normal, size
  72. - Similar to line slider only the direction is determined dynamically as well as distance
  73. - Outputs a Vector2 (direction * distance moved)
  74. - A OOB is used as a collider
  75. SliderDisc - position, normal, radius
  76. - When initially activated it records position nearest so the disc as the starting point
  77. - Further movement calculates the dynamic direction from the starting point to the current point on the plane the disc lies on
  78. - Distance along that direction is returned as amount of movement (similar to line slider)
  79. - Outputs a single float
  80. - A torus is used as a collider
  81. Free move/rotate/scale handles need to exist as well
  82. - Scale is easy, just perform uniform scale. Use SliderPlane oriented towards camera
  83. - Move also use SliderPlane oriented towards camera
  84. - Rotation use SliderDisc oriented towards camera
  85. ----------------------------------------------------
  86. STAGE 1
  87. CONCRETE TODO:
  88. HandleSliderPlane/HandleSliderDisc
  89. - update() implementation
  90. ----------------------------------------------------
  91. STAGE 2
  92. Implement RotateHandle & ScaleHandle in C#
  93. - Nearest point to disc/arc code
  94. Add free move, free rotate, free scale functionality
  95. Handles that remain the same size regardless of distance from camera
  96. - For both drawing and collision
  97. More complex types for drawing like DrawArrow in HandleDrawManager
  98. ----------------------------------------------------------------------
  99. SelectionRenderer
  100. Retrieve a list of selected objects from SelectionManager
  101. Find ones with Renderable components
  102. Retrieve Meshes, and world transforms from them
  103. Draw that same mesh with either a wireframe or a grayed out shader with a slight depth bias
  104. ---------------------------------------------------------------------