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