3D Modelling Discussion

Moderator: Rex Claussen

User avatar
Ed the Bat
Developer
Developer
Posts: 122
Joined: Thu Oct 20, 2016 6:35

Re: Map03: Issues

Post by Ed the Bat »

Indeed, it looks just as it should, now. Thanks, Enjay!

Could I ask a bit about your process? Modeling is definitely over my head, but since I'm certain your methods will be required in the future, perhaps I could at least ask what programs/tools you used for this?
User avatar
Enjay
Developer
Developer
Posts: 4720
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: Map03: Issues

Post by Enjay »

In this case, I used Milkshape to decompile the original model that you linked me to. That creates a bunch of files, including a number of different graphics for the skin and (I think) 3 different model files with different levels of detail (LOD) for different distances from the player view.

I took the different bits of skin graphics and assembled them into a single graphic (which is easier to use in GZDoom). I only noticed later that the graphic I made was basically the same as the one already in Paranoid.

I imported the highest detail model into Milkshape and I could see the ZFighting right away.

I imported my new skin graphic into Milkshape and remapped the different groups in the model to the new single graphic. This involved resizing the UV maps but, in this case, it was nice and easy because the new graphic was a simple multiplication of the sizes of the smaller individual graphics. This means I can do stuff like altering the UV scaling by factor of 0.5 for a particular group and it scales perfectly into place.

I looked closely at the glitchy parts of the model and there wasn't an obvious quick fix. They were basically just tilted boxes so I decided that the easiest way to do it would be to add new parts to the model that were exactly the same shape as the old glitchy ones and then delete the old ones. So I drew a new box, moved it around until it was in the same size and position as one of the glitchy ones at the top of the model and then mapped the box to the new skin too. I duplicated the box, moved it into position on the other side of the model and that was the top done. The bottom boxes were done by much the same process and then the original boxes were deleted.

While I was at it, I took the opportunity to fix a couple of poor texture/skin mapping issues and then saved the file in Milkshape's native pormat.

Then I fired up Misfit Cubed (a continuation of Misfit Model 3D) and used it to load the Milkshape file and save it as an MD3 (which it does with far less hassle than using Milkshape to export an MD3).


When editing models, I usually go between these two programs. Each one has things it does better than the other though, equally, either could be used as a stand alone tool (Misfit is probably more accessible and is free to use whereas Milkshape needs to be paid for). I find adding shapes and new structures better in Milkshape and the precision of the texture mapper is better. Also, it can import (not quite the same as loading) far more model types. Misfit, however, is much better behaved when trying to select different parts of a model, I prefer the animation mode and it can load/save Milkshape files, its Misfit format, MD2, MD3, OBJ and another couple of types just through the normal load/save dialogues making it really easy to switch between formats.


It might be worth mentioning that the bits of the model that I added were part of a "chrome" section of the model. A number of models in Half Life have a group of structures called "chrome" and they seem to use a 64x64 grey square as their nominated skin. However, Half-Life obviously had some sort of shader-like effect that it applied to these areas making them look reflective. As far as I know, GZDoom cannot do this so that's why, if you look at an HEV station in Half-Life, the bits at the top and bottom will look all shiny/reflective whereas the ones in our game are just grey. Many other models show similar shiny/grey bits too. It's not a big issue but I thought I'd mention it.

It's also worth saying that although the above may sound complicated, it didn't take long; perhaps even less than it took to type this post. :lol:
User avatar
Ed the Bat
Developer
Developer
Posts: 122
Joined: Thu Oct 20, 2016 6:35

Re: Map03: Issues

Post by Ed the Bat »

Alrighty... parts of this match up with things I've come to understand, and other parts are over my head. Surprising nobody, of course. I'd actually been thinking of writing a how-to on my process, partly to show how it's done (it's nothing that anybody else couldn't do as well as I do, provided they have the same tools I'm using), and party so that anyone with greater knowledge could call out points that need improvement.

For this exact moment... let me just ask to make sure I'm not missing something critical: can Misfit Cubed turn a Half-Life MDL into an MD3? Or will it have to go through MilkShape first? When I first began figuring out a process to get models into Paranoid, I tried looking into MilkShape, and was able to make absolutely zero progress in deciphering its interface. The 30-day trial has long expired since then, of course, and I wasn't ready to spend $40 on a program I'm too dumb to use.
User avatar
Rex Claussen
Developer
Developer
Posts: 2597
Joined: Tue Jul 11, 2006 18:36
Contact:

Re: Map03: Issues

Post by Rex Claussen »

@EdTheBat: I believe Nigel is saying that Misfit can do much of what MilkShape can. However, I'll let him confirm.

For my part, I was surprised that I could understand Nigel's explanation. (But, perhaps, I ought not to be surprised. Nigel, after all, is a native English speaker, he has been in the business world, and is currently a teacher. Communications is his forte.)
User avatar
Ed the Bat
Developer
Developer
Posts: 122
Joined: Thu Oct 20, 2016 6:35

Re: Map03: Issues

Post by Ed the Bat »

Enjay did, indeed, do an excellent job of phrasing everything, not to mention how complete and thorough it was. It's just that the subject matter (3D modeling) is quite foreign to me, which makes grasping even basic parts very difficult for me, so anything that wasn't already part of the process I'd been following will go over my head.

Since Enjay mentioned the benefits of MD3 format, I've been thinking a lot on the topic, deciding to hold off on playing with models for right now, and thinking that it will be a worthwhile investment if I need to purchase more software to help improve our project further. Naturally, I won't pull the trigger until I'm totally clear on what I should do.
User avatar
Enjay
Developer
Developer
Posts: 4720
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

3D Modelling Discussion

Post by Enjay »

Unfortunately, Misfit cannot open Half-Life MDLs directly. To be fair, either can Milkshape.

As far as I can tell, Half-Life models are a compiled format. They contain the skin graphic, the different LOD models and the animation data in separate files within a container file of some sort (the MDL). Even Milkshape, which had as one of its main purposes the ability to work with HL models, needs to decompile them before it can work with them.

Milkshape can, of course do that...
Image
...and then you can "import" the mesh into the editor. Note that I do say "import". You don't open the file; you import it into an existing model. The existing model can be a completely blank one and it feels just like opening it but it isn't. One very important difference is that the animation doesn't get imported, only the basic mesh. You can then import the animation but it is a bit flakey and I have had major problems with Milkshape animation. MD2 and MD3 models also cannot be opened, only imported, and there is no way to import their animations into Milkshape. So if you import an MD2/3 into Milkshape you only get an unanimated mesh to work with.

Saving an MD3 in Milkshape is also tricky. You don't "save" an MD3, you "export" it. To do this you need to generate the control "QC" file (Milkshape has a tool for this) and then export the MD3.

Image

From memory, MD2s have a hoop or two to jump through as well.


By contrast, Misfit handles the file types that it knows very easily. Most files can simply be opened/saved (you specify which file type you want by typing the file extension (e.g. MD3) with the file name as you save it. Misfit recognises this and saves the file appropriately; a nice, easy, quick conversion. It also preserves animations so if your MD2 or MD3 was animated, it still will be provided you save to a format that can handles frame-by-frame animations.

Open:
Image

Save:
Image

Like I said though, it doesn't handle HL models and although I've had more success with its animation system, it is also known to have problems.


The reason that none of the models sourced from HL in the original Paranoid release were animated was because of the difficulty (read impossibility for me) in getting the animation to work using these tools. I have no idea how to perform any of these tasks in Blender or a big commercial package like 3D Studio or Cinema 4D but perhaps they could be better.

Milkshape and Misfit are cheap/free little tools and are (for the most part) about as easy and approachable as it is possible to make 3D low-poly model editing (still not that approachable) whereas Blender is a very complicated, very comprehensive program with the UI from hell. I understand that once you master it, you can make it do many, many things though. 3DS is very powerful. I used to have a (free but legal) copy and things like the animation and so on worked pretty well and the UI was much better than blender. However, I changed computers and the copy I had was an "on the machine you install it on only" offer and I had never really got to grips with it fully anyway. As a result, I tend to stick to Milkshape and Misfit (and very occasionally Blender for some specific tasks). Basically, I use nice, quick, easy tools that I know how to use quite well and which allow me to do do most of the editing that I need. People like Willem Sitters or LilWhiteMouse are far more adept at creating and working with models than I will ever be.


There is, however, one more program that I haven't mentioned: Noesis. It has some very powerful features which I certainly under-use. It isn't an editor. It's a model viewer and converter. It isn't immediately obvious but it has some very powerful conversion features that allowed me to, for example, grab some of the models from Jedi Outcast and convert them to MD3 files with their original animations.

e.g. I don't know how well (or even if) it supports the native Half-Life format.


BTW, here are a couple of pictures showing the lack of precision that can happen with MD2 versus MD3. The model is the Ravenclaw space ship from Jedi Outcast...

Image

'''and the pictures specifically look at the precision of the jet engines on the side.

The original model converts well to an MD3 (it may even be an MD3 in the game; some models are but there are a couple of other formats used too).

Image

However, convert it to an MD2 and the accuracy required for the nice precise pointy bits in the engine simply isn't there at the resolution of this model.

Image

[voice of bitter experience]Note, the lack of precision happens because of the change to MD2 format. Unless you reload your file to see what the MD2 looks like, you'll still have the working version open which may not show the inaccuracies so you may be unaware that you have screwed your model until you look at it elsewhere.[/voice of bitter experience]

Now, imagine what those inaccuracies look like in an animated model where the rounding of coordinates can be slightly different in each frame. The model would seem to wobble - sometimes really badly. This isn't too much of an issue if the model is meant to be a living creature but if it's something very fixed and solid like a machine it looks terrible. e.g. I once made a model of a machine that was essentially just a complicated looking box with a rotating wheel on the side. The only bit that was meant to move was the wheel. However, when I animated it and then exported it to an MD2, the box part wobbled around making the whole thing look ridiculous.

Some of the lack off accuracy might be down to the conversion tool used but even MD2 models produced by expert modellers on expensive software can show such wobbles (e.g. if you look closely at some of Willem Sitters' Doom enemy models you can see a bit of wobbling going on and wobbles are certainly present in all the Strogg from QuakeII) .
User avatar
Rex Claussen
Developer
Developer
Posts: 2597
Joined: Tue Jul 11, 2006 18:36
Contact:

Re: Map03: Issues

Post by Rex Claussen »

I don't want to derail this interesting and informative discussion, but would you (or Eruanna) please split the thread into a separate one on 3D modeling? A good point for the split would be where Ed says:

"Indeed, it looks just as it should, now. Thanks, Enjay!

Could I ask a bit about your process? Modeling is definitely over my head, but since I'm certain your methods will be required in the future, perhaps I could at least ask what programs/tools you used for this?"
User avatar
Ed the Bat
Developer
Developer
Posts: 122
Joined: Thu Oct 20, 2016 6:35

Re: Map03: Issues

Post by Ed the Bat »

Regarding Rex's statement above: Yes, I apologize that I turned the thread into a discussion that frankly deserves its own thread.

Enjay: Forgive me if I don't directly address much of what you've said; it's all good and valid. But I have something to say that may be relevant to this whole situation (if not exactly useful to solving the problem): Noesis is the tool I use. It loads Half-Life MDL's and can export them as MD2's, which is what I've been doing. It does, strangely, export the 'skinpage' as a low-color pcx, but it also presents all of the relevant textures as full-color png's, so I just manually create a perfect match of the skinpage using GIMP, and then I have the texture file that GZDoom needs.

Noesis claims to be able to export to MD3, but every time I do, two major problems: no 'skinpage' is created so I wouldn't know how to arrange the png's (I can only assume they'd match the MD2 version so I could use that as a reference), but more importantly, it creates, as I phrased it earlier, "a psychotic mess of wild polygons".

To demonstrate... let's look at this model of the Military Police - the hilariously hideous alpha version of Barney:
Original MDL: http://edthebat.com/doom/paranoid/mdl/oldbarney.mdl
MD2 created by Noesis (minus textures): http://edthebat.com/doom/paranoid/mdl/oldbarney.md2
MD3 created by Noesis (minus textures): http://edthebat.com/doom/paranoid/mdl/oldbarney.md3

You will quickly see why I've been having Noesis make MD2's for me instead of MD3's...
User avatar
Enjay
Developer
Developer
Posts: 4720
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: 3D Modelling Discussion

Post by Enjay »

Oh dear! That's not good. I'm sorry but I don't have any solution for that other than to suggest trying some alternative methods. e.g. is it possible to export the animation to a separate reference file in another format and then use that for the animation source? Or maybe export the model to a suitable intermediate format and then to an MD3?

It might be worth dropping the author a line to let him see the problems that you've been having. Noeisis is still actively worked on as far as I know.

I've certainly been able to get functional MD3s out of Noesis - e.g. the walker droid in the video I posted. Of course, the source there wasn't a Half-Life model.
User avatar
Ed the Bat
Developer
Developer
Posts: 122
Joined: Thu Oct 20, 2016 6:35

Re: 3D Modelling Discussion

Post by Ed the Bat »

I did spend a lot of yesterday brainstorming. An intermediate format would make for a very simple band-aid, but I wouldn't know what format would be suitable for that. I mean, MD2 would technically WORK, but the vertex precision is already lost by then, so it's a loss. EDIT: I just tried every format Noesis can output to: the only other ones that even support animation are COLLADA (.dae), Autodesk FBX, and Inter-Quake (.iqm). All three have the same problem as trying to convert from Half-Life to MD3.

I also tried looking into fumbling through Milkshape (which seems to let me still do things in spite of the expired trial) and Blender, but I proved incompetent to get all the way to a true solution. I may have made some baby steps, but clearly this is not a simple or fast process, even if I were to do it right. Definitely something that would require the services of someone brighter than I.

I tried checking on Rich Whitehouse's website to see if anyone had reported the issues I'm facing, and saw nothing. Either I'm literally the only person to try turning Half-Life models into Quake III format (suppose it's possible), or I'm just doing something wrong and the 'bug' is on my end. I didn't find an easy way to report Noesis bugs, and was just generally unsure about the whole thing. I suppose I should just suck it up and at least ask him if there's any information, because surely this is not a desirable outcome of the operation, right...?
User avatar
Enjay
Developer
Developer
Posts: 4720
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: 3D Modelling Discussion

Post by Enjay »

I wonder if you can export the animation to an intermediate format rather than the model as a whole? I know that when I was converting Jedi Outcast models to MD3 I had to specify when model was the source for the mesh and which was the animation and then Noesis put the two together as the MD3. So, as long as a mesh knows which bits of the model to allocate to which bits of the animation skeleton (which should be saved in many model formats) it *should* work.

That being said, if your process works for MD2 but fails for MD3 it sound like Noesis should be able to get it right but it's getting the MD3 conversion wrong. It would be worth dropping Rich an email, perhaps with the files you linked above serving as examples.

I contacted him years ago for something relating to the Jedi Outcast stuff. Unfortunately the answer I got was something like "Noeisis can't do that and it's not part of my roadmap" (less bluntly put - in fact he was quite informative) but I did get an answer.
User avatar
Enjay
Developer
Developer
Posts: 4720
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: 3D Modelling Discussion

Post by Enjay »

Hmmm... I've had a bit of a play with this and I'm coming up equally blank.

The error messages that Noesis gives about vertexes out of range for the MD3 format are interesting though. I've seen a similar phenomenon before. The MD2 format, in some circumstances, seems much more tolerant than the MD3 one in terms of vertex position and range. I don't know why this would be but in the past I have been able to successfully save models as MD2s when an MD3 refused to save with errors similar to those that Noesis is giving with the "oldbarney" model.

That being said, I did also try using the -scale parameter suggested and all I got was a smaller model that still had messed up vertexes.
User avatar
Ed the Bat
Developer
Developer
Posts: 122
Joined: Thu Oct 20, 2016 6:35

Re: 3D Modelling Discussion

Post by Ed the Bat »

I suppose my next move should be to send Mr. Whitehouse an email about my situation to see if a fix is possible. After that, it looks like I may be stuck with continuing to use MD2, until such time that someone much smarter than I can step in. Unless some miracle happens and someone implements Half-Life model support in GZDoom. That would save hundreds of megabytes on this project, too. But I'm not one to hold my breath...

EDIT: I have emailed Rich about the issue, sharing the Military Police models as an example of what we're facing. Hopefully feedback will be quick, as he just updated Noesis on September 2nd, so he is clearly still active.

EDIT #2: Wonderful news! Less than five hours after I emailed Rich, I got this response:
Richard Whitehouse wrote:Thanks, looks like I broke that way back in version 4.205 or so. Update to the latest (4.291) and it'll be fixed.
I am ecstatic about this (and was sure to send my gratitude back to Rich), especially after having a bit of a down day. After I find some dinner to celebrate, I'm going to get right to working with the new version of Noesis to update all the models in Paranoid! I even got my name in the changelog!
Version 4.291:
- Fixed a bug in the MD3 exporter that was causing bad transforms to be applied to skeletally animated verts. The bug was introduced back in 4.205 or so. Thanks to Edison for reporting this!
User avatar
Ed the Bat
Developer
Developer
Posts: 122
Joined: Thu Oct 20, 2016 6:35

Re: 3D Modelling Discussion

Post by Ed the Bat »

Finally done. Updated every model I ever brought in (and a few that I didn't) to MD3's. Not having to patch all the textures together into one file like MD2's was a really nice break, too. I did have to shift all the animation frames down since MD3's start from Frame 0, apparently. I probably messed some things up with that, but... wow, the quality difference from MD2 to MD3 is staggering. If you were blown away before, go try a new devbuild. Do forgive the filesize, though; this pumped up the PK3 by about 60MB, but such is the price of quality.

I am so tired. Please reports bugs, as usual, but maybe forgive if I take some time to sleep before addressing them...
User avatar
Rex Claussen
Developer
Developer
Posts: 2597
Joined: Tue Jul 11, 2006 18:36
Contact:

Re: 3D Modelling Discussion

Post by Rex Claussen »

Ed the Bat wrote: Wed Sep 06, 2017 1:41... wow, the quality difference from MD2 to MD3 is staggering. If you were blown away before, go try a new devbuild.
Indeed, the quality is excellent.

On an unrelated note, I liked the headcrab zombies on human grunt bodies. Nice variation.
Please reports bugs, as usual, but maybe forgive if I take some time to sleep before addressing them...
Done here.
Post Reply

Return to “Models”