I Have A Maya 8.5 -> Quake Path
#3 posted by Lunaran on 2008/09/25 00:08:16
It's a python script run from within Maya that writes out an extended form of .qc that contains actual mesh definitions, coupled with a modified modelgen.exe that reads that mesh data (and .bmp files instead of .lbm). It works perfectly and I have one or two new monsters working in-game already, and they turned out pretty nicely. Doing all the modelling and animating in Maya makes everything so much easier I changed my plans on new monsters in Lunsp2 from "one" to "a bunch" just because the turnaround is so quick.
It is of course not perfect, still in a guts-hanging-out garage-inventor kind of a state, and the documentation exists entirely in my head, and I was going to post it once I'd polished up the rough edges and made it safe for public consumption, but if you have/wanted to use/are willing to try Maya I suppose I could upload something tonight when I get home. Plus, if you're familiar with scripting in your 3d package of choice you could always use just the changed modelgen.exe and write the extended .qc files yourself from Max or Blender or whatever heathen satanist 3d package you use.
Maya -> Quake
#4 posted by Kinn on 2008/09/25 00:32:47
Bloody hell, that would probably get me back into quake modding actually.
unfortunately i'm in the middle of a crunch at work right now, and will be for some time :(
Bollocks >:{
Interesting
#5 posted by ijed on 2008/09/25 05:09:06
I use Max, never got around to figuring out Maya joints.
I'm mostly just hacking up the Q1 monsters ATM, but the heavier stuff will be starting soon.
Lun
Maya > Quake sounds good!
I have no interest in modelling or animating characters, but it'd be nice to be able to make/export basic props from Maya and use them in Quake (I'm assuming it's easy to add custom models using Quoth).
Custom Models In Quoth
#7 posted by Preach on 2008/09/25 19:58:59
Yeah, we added that in the latest version, use a "classname" of "mapobject_custom" and model field set to the desired path and model. Spawnflag 1 makes it a static entity, and if you set mangle then that will be used in place of angles - to make odd rotations easier.
Custom Models
#8 posted by necros on 2008/09/26 04:11:47
i'm playing around with making props for a map i'm working on but having to skin them the 'quake' way instead of doing it all in 3ds is incredibly annoying. :(
I'm Getting Used To It
#9 posted by Lunaran on 2008/09/26 04:20:01
you can kind of plan around it. I've modelled all my characters thus far with the modelgen projection in mind and gotten pretty good results, without any unsealed edges either. The main thing to remember is, don't have any faces that are parallel to the front - make your legs and heads diamonds or hexes in cross section so that when you do the roadkill you can pull those verts out a bit and pancake the guy to get more even pixel density on those faces that slope away from the z axis.
It helps that next to the existing monsters anything looks good. :)
Well
#10 posted by necros on 2008/09/26 04:35:52
it's not that it's hard to do, but that you can efficiently unwrap a model. and that in turn means you can get as much resolution out of the skin as you could.
Pretty Easy
#11 posted by HeadThump on 2008/09/26 04:50:41
to unwrap the UV's the Quake way with Blender. Line the camera evenly with the front face choose an unwrap mode called project from view for the front selection. Invert selection you have the back face, then you can spread it out as you see fit. Blender pretty much emulates Maya methods so that might translate over, or might not.
UVs
#12 posted by Preach on 2008/09/26 10:14:48
The converter I've got for MD3 to MDL preserves the existing UV map on the MD3. It turns out that MD3 models do just duplicate the vertices in the same way that it's necessary to do for quake 1 models. So you can map the skin in as efficient a way as you desire.
Hmm
#13 posted by Lunaran on 2008/09/26 15:25:59
the md3 vertex limit is higher than quake's mdl vertex limit, right?
Is there a quake vertex limit?
Hey Luddits
#14 posted by gone on 2008/09/26 16:06:38
"Luddites"
#15 posted by Lunaran on 2008/09/26 18:28:48
Do you walk up to people who are drawing in sketchbooks, or carving something out of a block of wood, and say that to them too?
Sometimes the pleasure in doing something the hard way is in the doing.
#16 posted by gone on 2008/09/26 19:06:05
I walked up to ppl who had said "I wish I could use the technology" and pointed them into the direction...
Well
#17 posted by necros on 2008/09/26 19:08:06
i don't really use model props in quake much. if i want to do a map that would require detail models like that, then i do it for doom3. :P
Alright Cool, Thanks Speeds
Now how can I do it in a good engine?
Limits
#19 posted by Preach on 2008/09/27 10:29:05
Yeah, the md3 limits are 2 to 4 times higher than the quake ones on both triangles and vertices. The thing is though, unless you're making a really weird model with loads of breaks, then the number of vertices is always going to be lower than the number of triangles, but both have the same limit. So you don't usually run into problems, and if you do, the solution is just grouping more things on the skin, which is basically what taking a planar map is heading towards.
Model Limits
#20 posted by necros on 2008/09/27 19:44:11
what *are* the limits for quake .mdls?
Limits
#21 posted by Preach on 2008/09/27 21:50:00
Ok, I made a slight mistake there. The standard limits, found in winquake and the released source are 2048 triangles, but only 1024 vertices. The compiled version of GLquake from iD actually has the triangle limit halved to 1024, but you can pretty much ignore that as just recompiling the GPL source gives you GLquake with this limit restored. There's no reason anyone should have trouble with that limit.
It's also interesting to note that unlike the max number of frames, which is 256 for networking reasons, you can increase these limits a long way without doing anything besides changing the headers.
In general I'd still say you're gonna hit the tri limit at about the same time as the vertex limit on most models. Once you've counted the vertices on the perimeter of a segment, a mesh of quads increases by 1 vertex for 2 triangles added(roughly speaking). So if you're unwrapping lots of small pieces the vertices are the rub, but for larger pieces the triangles will be more trouble.
Yikes
#22 posted by necros on 2008/09/27 22:53:02
i had no idea the tris limit was so low o.o but thanks for the info!
Unless The Model Is Huge
#23 posted by Lunaran on 2008/09/28 04:19:58
you shouldn't be using near that many anyway, because
a) it'll look totally out of place amongst the boxier stock models (and if you don't care about that, you should)
b) integerization will tend to destroy any fine geometry anyway. Remember the faces in Nehahra? Woof.
Model Property
#24 posted by madfox on 2008/09/28 07:17:55
my bones model took 1082 triangles/ 382 vertices.
And the mdl was large, 1150kb.
the granito model was 574 triangles/169 vertices and was 622kb. It is a huge monster I intended as end boss. The only problem I have it stops its attack in pain frames so one can easily kill it by constant shooting.
Madfox
#25 posted by Lunaran on 2008/09/28 15:18:40
Monsters' attacks are interruptable by default - you can cut off a hell knight's fire attack in mid-sweep for example. You just need to change your boss's pain function to cause pain every time (or nearly every time) and it should work, although that's if your .qc works like the original .qc, and I can't be sure that it does.
And In Reverse
#26 posted by Preach on 2008/09/28 15:39:29
Madfox, open up shambler.qc. The first thing you should look for is a series of functions; sham_pain1 to sham_pain6. These should look something like the pain functions of your boss monster, and I'll call them the "pain animation" functions. Now if you look at the spawn function for a shambler, right at the bottom of the file, notice the line:
self.th_pain = sham_pain;
What you should notice is that this is not the same function as sham_pain1. sham_pain is an additional function, which I'll call the "pain controller" function. It decides whether or not to bother sending the monster into pain. If you change that line to read sham_pain1(the first "pain ainmation" function), then every time the shambler takes ANY damage, it will run the pain animation, which I think is your problem with the boss. You might want to try this with a shambler, just to see it go wrong.
So now we need to see what the "pain controller" function sham_pain does differently.
void(entity attacker, float damage) sham_pain =
{
sound (self, CHAN_VOICE, "shambler/shurt2.wav", 1, ATTN_NORM);
if (self.health <= 0)
return;
if (random()*400 > damage)
return;
if (self.pain_finished > time)
return;
self.pain_finished = time + 2;
sham_pain1 ();
};
The english language version of this code is:
Play the pain sound.
If I'm dead, return.
Make a random number between 0 and 400, and if the damage taken is less than that, return.
If the current time is less than my pain_finished time, return.
Otherwise, set my pain_finished time to 2 seconds into the future, and play the animation starting with sham_pain1.
I'd say the two most important things the "pain controller" function does are:
1) Create a random chance for the pain animation to play or not (although many smaller monsters don't have this in their pain controllers)
2) Keeps track of the pain_finished variable - not playing the "pain animation" if this variable is greater than time, but also updating it to some time in the future every time a pain animation IS played. This is basically setting a minimum time between pain animations, and that minimum time should be long enough for an attack to occur.
So basically what you want to do is copy this "pain controller" function, rename it, and replace the call to sham_pain1 with granito_pain1, the first of your "pain animation" functions. Then make sure that th_pain is set to the name of the "pain controller" in the monster spawn function. Once it works you can tweak the values further. Hope that helps.
Bootleg Liquor
#27 posted by Lunaran on 2008/09/28 16:17:48
sham_pain and wiiiine
I will justify this post (and turn the thread away from qc back to modelling) by saying I'm putting together my Maya export stuff for you all right now.
|