m-7761 / mm3d

Simplified fork of Maverick/Misfit Model 3D meant for improving core data model.
https://sourceforge.net/p/widgets-95
GNU General Public License v2.0
7 stars 0 forks source link

Running patch list for current demo (win32-dec-2021) #1

Open m-7761 opened 4 years ago

m-7761 commented 4 years ago

This is a list of fixes I've made since publishing https://github.com/mick-p1982/mm3d/releases/tag/win32-demo2c that aren't necessarily (yet) committed to the source code or rolled into the binary. As I integrate the changes I will put a line divider between the listed items.


Note: I'm updating the Windows pre-release demo more frequently than the source code depending on severity.

m-7761 commented 4 years ago

MM3D headeater smaller

m-7761 commented 4 years ago

https://github.com/mick-p1982/mm3d/commit/d684d5bd3ed5bda74d56a8f410a3b64d4aa0ec5b is the first substantial update I'm made since publishing the latest demo. It's mostly concerned with the animation merge/join/split/copy operations. I guess I left these on the cutting room floor before. I've lately been relying on some of them. And I have added an algorithm for merging frame animation data that does so on the basis of comparing the positions of the base model's vertices.

This technique lets me do some work with Blender and then merge that with the animation data from MM3D. Blender still has way better UV map tools.

EDITED: 928cf578391e4e973208af9deb2e22765503b714 is a follow-up patch within 2hrs. It deals with a mindless thing I did back when I was changing how vertex frame data is stored. (My brain was just working in zombie mode, it thought the newest animation would always be last in the list. I don't know if that's too much thinking or too little. It's a reminder how unreliable brains are.)

EDITED: 75d7575e123b36e5468a6a55de69385f14c71c19 third time's the charm! This addresses a change I made earlier today to how frame vertex data indices are adjusted. (Adding data onto the back looks identical to inserting onto the front of the next, so it requires an extra parameter to resolve this ambiguity.) Note these three commits are part of a series uploaded today that represents a major addition to the original demo code. The other changes up to this point tend to be small corrections.

m-7761 commented 4 years ago

In the past few days I've uploaded new code with a click-based selection system I've been sitting on for sometime. The click system goes through the snapping path, for better or worse. I developed it while I was trying to make the polygon tool more productive and user-friendly, and realized the selection tools should be able to click to select too. Snapping in perspective mode now uses the perspective correct projection.

I've spent two significant days with MM3D. The recent uploads have a lot more code than usual, and some of it was old code I've not felt comfortably uploading. I think they're a substantial contribution. It's taken me longer than I expected to work out all of the kinks. Fortunately I've been using MM3D to do my work, which has granted me ample opportunity to ferret out lingering bugs in my rewrite.

I spent a significant amount of time with glPolygonOffset attempting to eliminate z-fighting around the grid display. Also I improved the depth-buffer precision in the orthographic views by factoring in the zoom component. And something that may've gone unnoticed is a while back I made the zoom relative to the mouse cursor, I think this is expected of modern day software.

m-7761 commented 3 years ago

I've published a substantial update (https://github.com/mick-p1982/mm3d/releases/tag/win32-demo2c) to the animation system. This supersedes earlier demonstrations. Please see the notes.

P.S. Something I've no concrete plans for but I think would be a nice addition is a "Composite" type animation, that would round out the available modes. It would be a virtual animation that's really a combination of "real" animations, so that you can do things that would be otherwise impractical. I'm also thinking of adding a nonlinear interpolation facility. That's like adding some acceleration/deceleration between keyframes.

m-7761 commented 3 years ago

EDITED: I found a lot of bugs, most not related to the new update, but a lot nonetheless that have been dealt with by new uploads. I started a new round of work after realizing a change I made to let joint parentage be reassigned opened up a door for bugs because many loops assumed the parents would be lower in the list than their children.

m-7761 commented 3 years ago

3/18/2021: I haven't updated this in a while. Today I've uploaded two important bug fixes for animation editing. (Edited: see list in OP.) I also see a new Separate command is added (think cut/paste) and I think now copying with no selection copies the entire model, and there's some new commands (not as complete as I'd like) for copy/pasting animation poses. There's also a new Faces area in the sidebar that can reorder faces. I'm probably forgetting other minor enhancements here. I want to add a generic system for controlling the order of elements since that's often significant to 3D run-time software. Sorry for the informal update.

m-7761 commented 2 years ago

2/24/2022: FWIW I'm doing daily work with this software ATM and so am finding myself stopping to make improvements to its code here and there. I expect this to continue for a while, as I'd like to get it more polished up all around to prepare for making way for some major enhancements. One area I'm particularly interested in is nonlinear animation and keyframe analysis to convert fixed sampled animations into sparse keyframe animations.

m-7761 commented 2 years ago

3/18/2022: I've just finished some interesting code to make a number of tools/commands respect the texture map. For whatever reason the original MM3D author only took these far enough to do faces irrespective of other factors.

The Simplify mesh tool is somewhat improved to get cases that it used to fail. What was needed is to treat each side of the axial line that it merges the faces around as separate from the other side, so that they don't disqualify each other. It also now comes in two modes, the first doesn't simplify where the texture map or "group" mapping would be disturbed.

I'll probably take another pass at the Drag Vertex on Edge tool at some point. What I ended up with only moves the texture coords on the active line. It offers a tolerance setting (called Proximity) that will drag other along that same line if they're connected to the source coords. I think this is interesting, but it would benefit from a more complete, fully projective solution. I will probably offer both as options since there are tradeoffs. I figure I'll work on this when I find the existing option inadequate in the course of my own work.

(Oh, hey, I also made the drag tool to drag multiple vertices/faces, this is more like a "translation" solution. I also remember the reason I didn't take this to the next level is I felt that the undo system needs to be overhauled to work with pointers, because it's too difficult to find the face index given a vertex index. I have a way to get the pointer, but not the index, without scouring the whole list of faces. I will do that some day.)

Anyway, I believe this is a significant enhancement, worthy of writing something special about. I hope someone can find this useful. I really enjoy working on MM3D this way.

m-7761 commented 2 years ago

4/1/2022: I'm making a special note of a new patch with lots of UV editing enhancements (including snapping) bringing it closer to being practical for serious work. I'm planning to add a new "center point" tool system before long, like Blender's 3D cursor more or less, to control pivoting. I think this will make it a streamlined experience. Currently a global pivot is used, which can be like taking 2 steps forward and 1 step back in many scenarios. (Edited: There's a note with more info in the OP.)

m-7761 commented 2 years ago

4/23/2022: Lately I've been doing a ridiculous amount of work just to add a feature to animate the entire UV map. To do this I chose to add a new concept called "Utilities" filed under Model->Utilities. U is the default hotkey. It's modeled on the Meta Data system, which I've renamed User Data so it can neatly use the Ctrl+U hotkey with a mnemonic flair.

Instead of setting a value, a Utility has a type menu, and that translates into a side panel that swings out with settings for that type. This includes a Detach button that allows for editing with simultaneous access to the main window. Detaching sacrifices the Cancel button for having to use Ctrl+Z manually for every change.

The UV Animation system includes the same feature set as joints and points. Utilities are associated with other objects, in this case with groups. Once a model has one of these animations a checkbox appears in the Animation rollout to toggle the animation on and off. It only plays when animations are playing. It's decoupled from the time of the current animation by adding an m_elapsedTime parameter to the animation system to track looping playback length. The FPS values are used to translate between the two animations.

m-7761 commented 2 years ago

6/6/2022: I've been working on a GraphicWidget for the animation window. It took me too long to develop it, so the feature set is very spare. There's also several unrelated improvements, including optimizations for undo/redo which were previously pretty memory hungry (and maybe slow on debug builds) in some pathological cases. Other enhancements are resizable accessory windows and I'm finally happy with the hotkeys and menu labels. The File menu is no longer using Ctrl+Alt combos, and uses things like Alt+Up instead, to be a little more practical to input. The About window now has working hyperlinks and a Tip to reset the keycfg.ini file to enable new hotkeys.

The main attraction is a graph editor and an animation Clean Up window. The graph plots animation curves, and can drag (Move/Scale) frames to adjust timing. It has very limited ability to select/input key frame data.

My goal was to set up a nonlinear animation system, but I had to settle for just the bare minimum basics for now. There had to be a minimum feature set in order to publish something not completely incomplete, and I have to move onto other work. There's a main menu in the animator window. Oh! And tools are synchronized with the main window and hotkeys inherit from the main window's menu. Synchronization makes it so you don't have to think about which window is the foreground window.

m-7761 commented 2 years ago

FWIW I've uploaded a test model with animations, to the Release page, and have fixed some problems in the other day's patch, mainly pixels were off on the scroll bar.

m-7761 commented 2 years ago

Sorry for late source code (if anyone is reading this) but I've had to switch to a new PC and TortoiseGit+Github is a waking nightmare (why can't things ever "just work"?) and I just found out it wasn't actually pushing the Commit command, and when I tried to it just hung waiting. (So, what eventually worked is to use the command line (git push) which sounds simple, but I never use git from command-line. Then it gave a sane prompt for Github's "personal access token" ... so I don't know why TortoiseGit's author hasn't had complaints to fix this.) (Edit: https://gitlab.com/tortoisegit/tortoisegit/-/issues/3933)

m-7761 commented 2 years ago

There was a pretty serious bug with deleting triangles, but also anything, I hadn't thought of with resuming/combining undo ops. It had let a compound delete/add operations get in front of other operations that depend on those being in order. I'm surprised I didn't see it sooner. 80b57ad4e1f8bb18caffce2863db8892a4e8cde3

m-7761 commented 2 years ago

In the last update in June I seem to have broken the texture map editor's usability. It's now restored.

m-7761 commented 2 years ago

I've had to add a layers feature for my work. It gives you 4 layers to work with, or 5 including the layer where things go when you hide them. Its main focus is to be able to put overlapping models in one MM3D file and still be able to work with them without them getting in each other's way.

The full package includes 2 new groups in the View->Reconfigure menu for changing layers and toggling overlays and buttons on each view port that can let each view show a different layer. And lastly a new item in the Geometry->Hide menu that moves things into the current view's selected layer.

By default layers only show one at a time. So they're not actually layered. But you can turn each one into an "overlay" that means it will be shown even when not selected (in all views) but cannot be interacted with. You can use that like a "reference" model. And there's an Snap to Overlay mode to choose if you want to be able to snap to the reference. You can interact with them if you select the reference in another view or switch layers. The only things that care about layers is where the "m_visible" state was checked, which used to just mean hidden-or-not.

All of this required a pretty big overhaul under the hood since having views showing different content really runs against the existing design. Anyway, usually you'll change to a layer and create things on that layer, and that's that. ff744106ed3ac44c66099baddda93fe326698d2b

m-7761 commented 1 year ago

I've fixed a problem with Deleting joints and have added a "Reorder" window to the Help menu for changing the order of data in the MM3D file.

Also opening files from Windows Explorer should reuse any existing instance of MM3D. I think this will work with opening multiple files too, which I believe Explorer opens into multiple instances without some really complicated registry hacking that I could never get to work.

m-7761 commented 1 year ago

For a while the Windows EXE (ZIP) file was missing from Releases. I've fixed it now.

m-7761 commented 6 months ago

Woops! I've added the Misfit Model 3D docs to the mm3d-portable.zip release.

https://github.com/m-7761/mm3d/releases/tag/win32-dec-2021

m-7761 commented 3 months ago

I've patched in 7mos worth of fixes. The main problem is crashing when opening a nonmodal window from another nonmodal window, such as the animation or texture windows, because the "creator" window status would be assigned to the parent window instead of the main window.

m-7761 commented 2 weeks ago

FYI: I've fixed a serious bug: I've uploaded a fix for problems around creating New animations in the animations sets window.