Giter Site home page Giter Site logo

zturtleman / mm3d Goto Github PK

View Code? Open in Web Editor NEW
109.0 14.0 21.0 4.13 MB

Maverick Model 3D is a 3D model editor and animator for games.

Home Page: https://clover.moe/mm3d

License: GNU General Public License v2.0

Shell 1.24% NSIS 0.16% C++ 93.03% C 1.25% Makefile 0.73% Perl 2.22% M4 1.37%
quake3 3d-modelling 3d-model qt

mm3d's People

Contributors

alexmyczko avatar sharkcz avatar zturtleman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mm3d's Issues

Oversights: Influences->Edit Joints

I think the Delete button in jointwin.h/cc should reset the selection menu, or else it will be unusable/retain the deleted joint.

It also has problems when there are not joints in the model. Maybe the menu item should be disabled in that case.

Save material name, not texture name, as MD3/MD2 surface shader name

Sometimes I have to create a image with a specific name just so that exporting using correct shader name. Using the user entered material name would be easier and seems logical. As a note, when importing a MD3, the surface shader name is used for the material and texture name.

Move Quake 3 player export/import out of MD3 filter

Add File -> Export Player... option to allow exporting Quake 3 player model in any format or player model segments (head, upper, lower) in different formats. This likely needs a Import Player... option as well. Unless opening any of the segments while the others are present in the same directory prompts for loading as a Quake 3 player.

It would also be nice to add support for RTCW and ET's head/body player models. It could be used with Inter-Quake Export (IQE) even if RTCW/ET model formats aren't supported.

I've started the export portion but haven't made a GUI for it yet.

Save Windows settings in Application Data

Currently the settings are saved in the installation directory from registry + userdata (i.e., C:\Program Files\Misfit Model 3D\userdata), or if key is not in registry then in the directory where mm3d was launched from + userdata.

MD3 player model lighting issue

After exporting an MD3 player model, the vertex lighting does not work correctly in Quake 3. Presumably something is wrong with the vertex normals. However it can be fixed by opening head.md3, upper.md3, and lower.md3 and selecting part of the model (so mm3d allows saving) and then saving it without making any actual changes.

Move animation mode Loop checkbox

Animation mode plane currently has FPS [ 30 ] START STOP Loop [x] (frames per-second edit field, start button, stop button, Loop checkbox). Move loop between FPS and Start button to make it clearer that it's a per-animation setting now instead of just a global playback setting.

Support bone joint scale

XYZ axis scale for bone joints (rig and animation keyframes) is required for adding full support for importing Doom 3 MD5 models and IQM/IQE models.

  • Save bone joint scale in MM3D models.
  • Add scale to properties panel.
  • Apply scale to rendered models.

Suspect painttexturewin.cc code ignores iterator in favor of front()

https://github.com/zturtleman/mm3d/blob/master/src/implui/painttexturewin.cc#L79 looks pretty bogus.

Note also that the addTriangles subroutine is used precisely once, and builds the same selection list that is done just prior to calling it.

Maybe this is interesting, but I would like a second set of eyeballs while I'm rewriting this code. Is this feature working accordingly?

EDITED: What I suspect is happening is the foundTexture is normally satisfied by the first triangle. If not the loop achieves nothing.

Paint Texture creates a black PNG

I tried the Paint Texture feature and althouth it looks good in Maverick, the image saved was totally black. I tried all combinations of fill, edges and vertices but all just saved as totally black images.

How it looked in Maverick
paintt1

What was saved
black01

Hello/Sorry/Q: Progress from MM3D code? And do you mind if I copy/rewrite to begin other project?

Hey umm, this may sound like a weird question, however, I made plans to maybe use the old MM3D code as a basis to develop a new model software. I'm curious if you mind or recommend using your code to do this instead. Just on the basis that yours (here) may be better, or have bug fixes, and so on.

Background: I have some game software that lacks modeling software that can meet its basic feature set. So I'm in a bind to come up with something. Also I need to be able to recommend something user-friendly. My software is a game-maker originally made by a Japanese company called From Software. We really need support for morph-target animation. It was designed to work with Microsoft's X format, but really it was developed for PlayStation formats.

I am also trying to bring COLLADA back to life. At the same time. Because I don't want to invent any new 3D formats. That's kind of the problem. I'm just trying to locate the best open-source code bases and Frankenstein something together, that I want to offer up as a serious alternative to Blender. The software will use COLLADA native, and it is called Daedalus based on its DAE file extension. I've rewritten the original COLLADA-DOM project. It's really a big project. Low-poly/open-source/morph-target software is really hard to come by right now.

I just came across your Maverick editor. I am just looking for a scaffolding to start my own work from. So I can work unencumbered. I've also rewritten the Assimp code base and am planning to use it as a fast import/export layer. I've modified it so its very flexible and easy to program loaders for, because I want to encourage converting everything into COLLADA more or less, for archival purposes, including old proprietary formats that might only be used by one or two games or other kinds of software. I'm trying to encourage/embolden a healthier noncommercial ecosystem. Even if COLLADA is not perfect now, it is a reasonable place to start.

Support Importing of .SMD format

SMD (StudioMdl Data) is a very commonly used format for 3D models with skeletons and also animations. Currently, a huge restriction to using MM3D is that it cannot import or export this format, and as a result MS3D must be used as middleware to convert and utilize the SMD format, export to ms3d and use in MM3D.

This process likely ends up losing information somewhere along the way, as importing/exporting ms3d files from MM3D is still imperfect. Support for the SMD format would be lovely and would seriously make this program a viable option for making Source Engine / Goldsrc models.

Make 'Convert To Frame' window convert multiple animations at once

Converting skeletal animations to frame animations for exporting as MD3 requires confirming the number of frames for each animation. Add 'Continue All' button to 'Convert To Frame' window to allow skipping this. (Update help page for 'Convert To Frame' window too.)

Something caused my toolbar to vanish

I'm not sure exactly when it happened, but I think it might have been after I loaded a very high poly model (far too high for practical game use), converted it to another format (which took quite a long time) and then quit Maverick. That all seemed to go OK but shortly afterwards, when using Maverick again, I noticed that my toolbar had gone. I couldn't see anything in the menus to enable/disable the toolbar (is there anything?) so I quickly uninstalled and re-installed. However, this did not fix the missing toolbar.

So, I figured that Maverick must have saved settings in my appdata folder and, sure enough, I found the settings folder. The problem seemed to be stored in the dock.dat file which, unfortunately, is the only file in there not easily readable in a text editor. Anyway, I deleted the file, restarted Maverick and my toolbar was back.

Fortunately, I had the presence of mind to save the dock.dat file and copying it back into my preferences folder made the toolbar vanish again.

In case it's of help, I have attached the dock.dat file in a zip for you. (I had intentionally already closed the Boolean operations sidebar - so that is meant to be missing).

dock.zip

Support rendering using OpenGL ES 2

Currently OpenGL 1.1 is used for rendering models. Changing to OpenGL ES 2 will allow for better compatibility on GNU/Linux ARM mobile/low-end devices and Windows using DirectX via ANGLE library or LLVMpipe software renderer. (Currently Windows has black OpenGL widgets if ANGLE or software is preferred thanks to Qt blacklisting the driver and not initializing OpenGL.) Qt 5 includes the ANGLE and LLVMpipe DLLs and can handle when to use them with QOpenGLFunctions class.

There is also potential for OpenGL ES 2 -> Vulkan -> Metal for macOS (as OpenGL is deprecated on macOS 10.15). OpenGL ES 2 is probably needed to support PBR rendering if glTF 2.0 is going to be supported in the future. (This issue not about solving these though.)

The rendering code is in various files in libmm3d. It would be nice to centralize it so multiple different rendering backends could exist; possibly outside of libmm3d.

I'll probably look how to integrate Qt 3D and/or the OpenGL ES 2 renderer I'm developing for my proprietary Clover's Toy Box project.

Large poly counts

Hi, found this software after looking for some sort of update to MM3D. I was wondering if there's any way you could optimize the software for large models? I love the interface for MM3D but whenever I work with a high poly count model it always tends to have issues.

For one, whenever I load an .ms3d file exported by Milkshape that has a certain amount of polygons - that is rigged - the rigging tends to break entirely whenever I rotate a bone.

The following model is Norman Jayden from the PS3 game Heavy Rain.

image
image

On the flip side, exporting an .ms3d file with a high poly count results in a failure to load within Milkshape. So on both ends, high poly models have issues between MM3D and MS3D.

Another issue is that whenever you delete a significant amount of polygons, the program freezes for a very long time. This is understandable yet seemingly fixable with optimizations, I would presume.

UI incorrectly allows add/delete groups and materials in animation mode

In animation mode the Model class rejects add/delete but Edit Groups and Edit Materials (and possibly others, projections?) still add or deletes items from list. The changes are lost after closing the window since it's not saved in Model.

addGroup() etc return -1 on failure but it's not checked. I made deleteGroup() etc return false in 7c20fc2 but it's only checked in Edit Joints window. Though a higher level issue is the buttons should be disabled or show a message box. For "add" buttons a message box is used to get name before addGroup( name ) etc is called so there needs to be another way to check if 'editing' is allowed. I'd rather not tie it to animation mode everywhere.

An Mm3d model pack would be a useful thing

http://www.misfitcode.com/misfitmodel3d/models.html

I do not currently have any sample 3D models available for download on this site. You can find some free 3D models at the following web sites. If you want to load these models in Misfit Model 3D you should check the Features page to see which model formats are supported by the current version.

Do we have test models that demonstrate the package's features? These are important resources for developers to have access to.

RFC: When did you zturtleman pick up MM3D?

Copyright © 2004-2008, Kevin Worcester
Copyright © 2009-2019 Zack Middleton

From the following:

https://sourceforge.net/p/misfitmodel3d/mailman/message/36410673/

"2018-09-08"

From the following:

https://download.tuxfamily.org/sdtraces/BottinHTML/Bottin_K-O_files/Maverick_Model_3D-11890.html

"Created: | 2012-04-01"

P.S.

What do you think of the "libmm3d" component? Can/does/will Maverick dispense with that idea? It's a great burden to maintain a library. Is anyone using MM3D independent of the productivity software application? Is it distributed as a separate library?

I ask since the code is quite a mess in places... and the usual mentality for supporting libraries is to not remove old "public" functionality; which can be an insane (I would argue stupid) burden, that usually means, in practice, code is either dead or stillborn (locked in) when it's code is published.

Texture Coordinate Editor (etc) Can't see the texture initially.

Loading a model that already has a skin allocated and then trying to do something with that skin hits a minor hiccup. Even though the 3D preview in the main screen shows the model textured, the materials dialogue and the texture coordinate editor just show a white image.

To fix this, all I have to do is use the drop down menu in the materials dialogue and select the skin again (even it is was already selected) then it works. This wasn't necessary with Misfit.

The following pic are taken when editing a simple MD3 with only one skin image (I noticed the same thing happening with other file formats).

Texture coordinate editor showing white skin image
001

Materials editor showing that the skin (PChest.png) is slected - but showing as totally white
002

Reselecting it from the drop down makes it appear
003

And now it can be seen in the texture coordinate editor too.
004

Update MD3 help page

There have been many MD3 changes / additions that which be document in the MD3 help page.

Opinion: Main panel redesign.

I'm just opening this up for feedback. I'm redoing a lot of code for my personal use, but intend to share the results later this year, for evaluation. In theory I would like to not change anything, but at the same time that may in some cases mean doing needless work for myself... and I'd just like to hear a second or third opinion if possible.

To try to be brief. I feel like I want to do a few related things differently. These are mainly to do with the 3D canvas parts of the UI and the transient tool panels that some tools have, like the Rotate tool for instance.

First, my instinct is to combine the 3D panels into one big multipane window region. I think that is easier to manage, but a stronger argument is it can use instancing techniques to render all of the canvases with one drawing pass.

To imagine this, you have to imagine a 2x2 layout that has a strip of tools running through its middle. Those tools would have to be moved to the bottom in order to combine all of the 2x2 windows into a single block.

So you get a strip on the top and bottom. And some of the layouts like 3x3 have to be dropped. Those seem a little impractical to me, but the 3x2 one can be retained at least, and I suppose it makes more sense for widescreen monitors.

Next, for simplicity sake I would like to dispense with the buttons that are in the middle of the 3D drawing areas. Or I mean move them into the strips. There is ample room in the strips. I think they could be compressed a lot more. And it might be useful to put some heavy use tools in there or open them up for easy customization to meet user need. Finally, the transient tools could replace the strip area temporarily so to not disturb the layout, or use the remain space so that the view tools remain operational while the activated tool is in use. It would probably be useful to put a button in there to finalize the tool. Blender is pretty ambiguous in that regard. It can be confounding and hard to make sense of.

Actually Blender has a thing where you scroll the toolbars with a mouse wheel that is actually very efficient, but it's not communicated that that is even possible to do. I worked with Blender for a very long time not realizing that. It's actually key to using its very queer UI. I think the strips could be useful in the same way. In the UI system I'm replacing Qt with the use of dragging the right-mouse button works to pan the top-level panels since they don't have scrollbars. I think it would be good if this was consistent with the modeling area.

Since middle buttons are not always available or are not always easy to use, I think it would be intuitive if right-dragging also panned. I realize MM3D uses right-dragging to unselect. I think that might be useful too. In which case a compromise might be to pan when there is no selection, and unselect when there is. And middle-button can also pan to be consistent with Blender.

P.S. I don't know if I will work on this, but I would be happy to submit the work if so... this is context-menus via right-click. I think MM3D may have some context menus in places, but I don't know if so. I've seen some code with context menu events. I think if you're going to have them they need to be present in all contexts, or users won't look for them. When I do UI design I usually treat clicking and dragging/holding as different functions. In that case, clicking can be used for context-menus without losing the ability to drag. And left clicking can be used to do simple selection if it doesn't work that way already.

In any event, these are some of my recommendations. I think the zoom function can be a ticker, and the zoom value can be placed beside a narrower drop-down box without a label. A balloon-tip can suffice. That should fit into the same space as the current drop-down menu. The scroll button can be redesigned as a compact a compact d-pad that's clicked or dragged or held down to repeat like a ticker widget.

Support holding shift in texture coordinate editor

One of the things that has always bothered me in Misfit is that there is no way to restrict the moment of vertices to a single plane in the texture coordinate editor.

In the main 3D editing screens, if you hold shift in move mode and then start moving a vertex (or whatever) then Misfit (now Maverick) will restrict movement to whichever direction (X, Y or Z) you start moving in; thereby ensuring (for example) a point being moved horizontally stays at exactly the same height as it was.

Unless I'm doing it wrong, there doesn't seem to be an equivalent functionality in the texture coordinate editor. So moving a point (or group of points) in the Y axis means that you need a very steady hand to avoid shifting them in the X axis a little bit too.

If some way (probably using shift, like in the 3D editor) to clamp movement to the X or Y direction in the texture editor could be added, it would be greatly appreciated. Thank you.

debian and ubuntu packages

this is not really an issue but what about adding yourself to AUTHORS? Meanwhile the debian and ubuntu packages have a checked out version 1.3.9 what about making a release too?

Report result of Clean Up Groups in status bar

After using Materials -> Clean Up Groups... dialog, display number of merged/removed groups and materials in status bar.

something( "Removed %d of %d groups and %d of %d materials", removedGroups, totalGroups, removedMaterials, totalMaterials );

Missing images in Qt 5.11.1 (example: magnify icons above viewports)

There are images embedded in some of the Qt .ui files. This was depreciated in Qt 4 and replaced with .qrc. Sometime between Qt 5.3 and 5.11.1 support for embedded images was removed.

Log when using Qt 5.11.1 uic.

UIC src/qtui/backgroundselect.ui
Omitting deprecated element <sizepolicy>.
Omitting deprecated element <images>.
UIC src/qtui/groupwin.ui
Omitting deprecated element <sizepolicy>.
Omitting deprecated element <images>.
UIC src/qtui/painttexturewin.ui
Omitting deprecated element <sizepolicy>.
Omitting deprecated element <images>.
UIC src/qtui/projectionwin.ui
Omitting deprecated element <images>.
UIC src/qtui/modelview.ui
Omitting deprecated element <images>.
UIC src/qtui/texturecoord.ui
Omitting deprecated element <images>.
UIC src/qtui/texwin.ui
Omitting deprecated element <sizepolicy>.
Omitting deprecated element <images>.

Using Qt 5.3 compilers (uic, …) allows images to work when using Qt 5.11.1 libraries.

Support non-ASCII paths on Windows

Use wide char APIs for getting AppData and executable path in src/mm3dcore/sysconf.cc and replace stdio fopen(), fread(), etc everywhere. Need to convert WCHAR (UTF-16) to UTF-8 for storing in std::string and then convert back to UTF-16 for passing Windows API.

MS3D exported as vertex subversion 1 does not load correctly in Milkshape 3D

Vertex Format subversion 1 scales bone joint weights range of 0 to 255. This seems to be a MS3D documentation error (since subversion 2 and 3 use 0 to 100) or an error in Milkshape 3D 1.8.5 beta 1's MS3D loader. Need to check if should change subversion 1 to be 0-100 like subversion 2 and 3. Ideally by testing an older version of Milkshape 3D.

If it's an issue with newer Milkshape 3D loader should change default exported vertex subversion to 2.

Model viewports are not always the correct size when program opens

When the program first starts sometimes the model viewports are the size defined in the Qt .ui file instead of being resized to window size.

The issue sometimes occurs on Debian Stretch with Qt 5.7. I don't remember seeing this on Windows or macOS with Qt 5.10 or Debian Jessie with Qt 5.3.

Screenshot from 2019-04-23 19-03-44

Please: Make new release w/ animconvertwin.h changes.

Since you're not working on MM3D presently, can you please prepare an up-to-date release with your changes from here (65449c9#diff-e5071f507ed38e0720688b3e26ae0bb9) and any others, so I can be able to use them for a comparison on Windows?

Background: I'm in the process of rewriting all of the UI code right now, to switch it to a new system (new project) so I don't have Qt set up for development... doing away with Qt is my prime motivation since I can do in 100 lines of code what the Qt oriented sources do with 4 or 5 files and a thousand lines!!! exhibits A, B:

#ifndef __ALIGNWIN_H__
#define __ALIGNWIN_H__

struct AlignWin : Win
{	
	void submit(int);

	AlignWin(class Model *model)
	    :
	Win("Align Selection"),
	model(model),
	    x(main,"Align &X Now"),f1(main),
	y(main.inl,"Align &Y Now"),
	z(main.inl,"Align &Z Now"),ok_cancel(main)
	{
		active_callback = &AlignWin::submit;
	}

	Model *model;

	typedef char align_label[sizeof("Align &X Now")];

	struct align_group
	{
		align_group(node *main, align_label l)
			:
		nav(main,""),
		m(1),mult(nav,"",&m),
		v(),value(nav,"",&v),submit(nav,l,l[7])
		{	
			l[6] = l[7]; l[7] = '\0'; //"Align X"
			nav.name(l);			
			mult.add_item("Align minimum").add_item("Align center");
			mult.add_item("Align maximum"); 
			value.expand();
		}
			
		//NOTE: m/v aren't required. It's just a
		//lot more code to specify the data type
		//as it stands.
		panel nav;
		int m;
		multiple mult;
		double v;
		textbox value; 
		button submit;		
	};
	align_group x; f1_titlebar f1;
	align_group y;
	align_group z; ok_cancel_panel ok_cancel;
};

#endif // __ALIGNWIN_H__
#include "alignwin.h"

#include "model.h"
#include "log.h"
#include "modelstatus.h"
#include "decalmgr.h"
		
void AlignWin::submit(int i)
{	
	switch(i)
	{
	case 'X': case 'Y': case 'Z':
	{
		align_group *g = &x+i-'X';		
		log_debug("aligning %c on %g\n",i,g->v); //%f		
		extern void align_selected(int,Model*,int,double); //align.cc
		align_selected(i,model,g->m,g->v);
		DecalManager::getInstance()->modelUpdated(model);
		model_status(model,StatusNormal,STATUSTIME_SHORT,::tr("Align %c"),i);
		return;
	}
	case id_ok:
		
		log_debug("Alignment complete\n");
		model->operationComplete(::tr("Align Selected","operation complete"));		
		break;

	case id_cancel:

		log_debug("Alignment canceled\n");
		model->undoCurrent();
		DecalManager::getInstance()->modelUpdated(model);		
		break;
	}
	basic_submit(i);
}

FWIW this code is using https://sourceforge.net/projects/widgets-95 that is a new UI module I've developed for some cross-platform projects, including a COLLADA native 3D modeling software that I'm basing off MM3D for a start. It has one internal file that makes use of wxWidgets.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.