Vulcan Posted October 25, 2014 Posted October 25, 2014 So here's the issue/challenge! I'm currently building a multiplayer map on what I try to reach the cap of the Quake III engine. The map is focused on inspiring people and overal already pretty immersive if I may say so myself. I'll show some screenshots later, somewhere on this forum. I came to the point where I thought it would be awesome to have a flag. Not a static flag, not a shadered flag, but a full 3D flag, animated with bones/vertices. So that'll mean either an MD3 or GLM file extension to go with. File extension is not what I'm worrying about though, but a way to implement it in the game! I could ofcourse make a glm, write an NPC file place an entity NPC on the roof with a cinematic spawnflag and write a simple script to loop/animate it. But, if a joking admin or player decides to try /npc spawn "flagmodel", he would piss his pants laughing ofcourse Now my question is, could I somehow create such a thing and restrict people from spawning such a flagmodel? Or better said, how do I achieve that! because I'm pretty sure there's a way! Thanks in advance!
mrwonko Posted October 25, 2014 Posted October 25, 2014 MD3s cab have per-vertex animations, they'll do nicely. Unless you exceed their maximum dimensions of [-512, 512) units on each axis, but GLM has some similar limits. You'll probably have to do some scripting to make them play it though. Of course you mustn't use misc_model, since that gets baked by Q3Map2. misc_model_static might do, and a func_* with a model2 key will certainly do. Take a look at the switches in SP for some reference on animated MD3s. (e.g. used in the Rancor level, I believe.)
Tempust85 Posted October 26, 2014 Posted October 26, 2014 MD3's only ever want to animate tags for me, not the actual model animation.
Xycaleth Posted October 26, 2014 Posted October 26, 2014 Couldn't you just add a few deformVertexes to the flag's shader? Omicron likes this
Vulcan Posted October 26, 2014 Author Posted October 26, 2014 @@mrwonko: I'll experiment with that! The problem is though that you can't see those switches from the rancor level in multiplayer. Most MD3 models that are animated in Singleplayer don't show in Multiplayer. But maybe it works differently if you do it yourself.@@Xycaleth: Notice the part where I say I don't want to have a shader flag. The reason I dislike a shadered flag is that it moves like water. In other words it doesn't give a shit about your flagpole and waves along it.Also, it will only move just left and right, and doesn't curl up a little like a real flag would.I got the inspiration for these flags when I was playing Skyrim.http://youtu.be/5vi5NldI_dU?t=36sI'll experiment with existing MD3 files and animations, and if I can't figure out how to get an MD3 file to animate for multiplayer, I'll step to GLM/NPC file.JKA also has a few cinematic models, for example the "rocks" npc that's only used for the darkside ending. It spawns on top of Kyle when Jaden escapes.I could make one animation where the flag just lays on the ground on "idle" and give it 1 health. If people decide to spawn it, it'll still behave like a flag by flopping on the ground. But it will dissapear instantly when they "kill" it It will make a pretty boring NPC file, but a nice addition if used with a script.
mrwonko Posted October 27, 2014 Posted October 27, 2014 Oh, MP. Should've said that, might make a difference, I don't think I've ever tried animated MD3 in MP.
Vulcan Posted October 28, 2014 Author Posted October 28, 2014 Well, I can say I tried it now! If I write an Icarus script that "affects" a misc_model_static, the game tells me it's an invalid target when I run the script.Singleplayer uses misc_model_breakable btw. But when you load a SP map in radiant with MP settings, radiant tells me he can't find the source.So, the MP just isn't capable of running MD3 animations.No loss, because I was able to spawn luke in, write an icarus script and make him loop an animation.something like this: affect ( "danceluke", /*@AFFECT_TYPE*/ FLUSH ) { loop ( -1 ) { set ( /*@SET_TYPES*/ "SET_ANIM_BOTH", /*@ANIM_NAMES*/ "BOTH_BOW" ); wait ( 2000.000 ); } } As you can imagine, the same applies to any NPC file. You can also run from a set frame, but I haven't figured that out yet.No need for that btw, as you specify an animation set in the animevents So, I decided to go for a GLM file and start working on that flag model/animation.Here's a small preview: It has a lot of bones as you can see, so I keep my fingers crossed when I finally export it lol.The side doesn't really show how much it really waves. So I'll show that when I finally get it in-game Archangel35757 likes this
z3filus Posted October 28, 2014 Posted October 28, 2014 Looks nice, but I'll clap my hands together once I see this fully working ingame. Thanks for trying
Vulcan Posted October 28, 2014 Author Posted October 28, 2014 does modview count too? because I got it in modview now
Archangel35757 Posted October 28, 2014 Posted October 28, 2014 does modview count too? because I got it in modview now You should be able to get it to work in game if you can see it in Modview.
Vulcan Posted October 28, 2014 Author Posted October 28, 2014 Yep Arch! That's why I mentioned it Thanks to your exporter, it's all working fine!I had to divide the model in 3 separate parts though. The GLM file is limited to 32 bones per model, So three parts for the 80 bones this guy has.There's no seam in the model thanks to the new carcass, so it works like a charm! The UK flag is just a placeholder for the flag that i'm still designing. I wanted to make sure the model and animation works.The NPC spawner is placed in the floor so you can't use push/pull on it. It's even safe there for explosions and such!Also, the flag will trigger itself, and thus spawn itself would it die by the hands of an admin. Then it will just flap around hapily like it did before.Thus, admins can screw around with NPCs would they load my map, kill them all, and the flag would just respawn Boothand likes this
Archangel35757 Posted October 28, 2014 Posted October 28, 2014 Appears to have seams on both sides of vertical red bar-- not sure if those are UV seams or mesh seams where you broke the model. Try adding smoothing groups to make your normals match across mesh boundaries and then before you export detach your smoothing groups... or alternatively-- add an edit normals modifier, check unspecified then collapse your stack. Read up on what "breaks" an edit_normals modifier.
Vulcan Posted October 28, 2014 Author Posted October 28, 2014 I had to divide the model as I said. Otherwise carcass would tell me the model has more than 32 bones.I solved the seam problem by just editing the shader file so it's just purely lit. Makes him less shiny as in the gif, and more burlap as I need
Boothand Posted February 8, 2015 Posted February 8, 2015 So I don't suppose it would be possible to use an animated GLM (or anything) in a case where there is no MP npc system, nor any icarus scripting (like JK2)?
Tempust85 Posted February 8, 2015 Posted February 8, 2015 Someone would need to modify the misc_model_ghoul ent for MP to support it animation similar to what I've done for the SP version in DF2 mod. Also the amount of bones is quite alot just for a flag model, you should consider removing some. The cloth-like quality loss should be very minimal, if you do it right.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now