Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Progress tracking: getting a new playermodel into Xonotic (tutorial)

#1
Information 
UPDATED to include some details about textures! Scroll down.

Ok, so I thought I should document my progress getting a new player-model into Xonotic (using an existing rig). It's not suitable as a tutorial for a total Blender N00b, but if you know your way around it should help you getting a model into Xonotic quickly.

I tried a while a ago already (http://forums.xonotic.org/showthread.php?tid=3065 ), but lost track and now realized that I had to figure it all out again newly Sad This page on the wiki ( http://dev.xonotic.org/projects/xonotic/...der_to_IQM ) was helpful but lacked a few details.

Ok so this is how far I am already right now (I will reply to this post when I progress further):

1. Make a nice new player model in your favorite program (I used Wings3D and Blender3D)

2. Download a model source file for blender here. I was recommended to use either Erebus/MegaErebus (those 2 have identical rigs) or Ignis as those have the most up to date animations.

3. Open the file above in Blender and import your new mesh (as an .obj) into it for adjusting the size and proportions to the existing rig (don't forget to select the rig and put it into "rest pose" via the rig options). You can then delete the original mesh.

4. Shift select both the rig and your mesh and press "shift +P" and then select automatic weights to get a good first approximation of a weighted mesh. Switch back to "pose mode" and run some animations to check how the mesh deforms and if further adjustments are needed (you can also do proper hand weight painting now to fix the few issues, In general however fully hand weighting give the better results and gives better performance too; the less vertexes are bound to more than one bone the better for that).

5. Next you need to rename the material and the UV (maybe the mesh also?) inside blender to correspond to your texture file name. Usually all your files for one playermodel should start the same way e.g. the model should be "test.iqm" and the texture "test.tga" or such. Name the material and UV map then "test". I am still a bit confused about that part as the original models don't have a material and Nifrek said they shouldn't, but for me it only works with a material that has the right name. Edit: It also should not have a texture applied in the UVeditor window.

6. Now first select the mesh and then shift select the rig, so that the mesh has a dark orange outline and the rig is colored bright orange (it is important that you select the rig last!).

7. Now you can export your mesh via the previously installed iqm plugin (Latest confirmed working version of Blender: 2.67a, download here: http://lee.fov120.com/iqm/ ) by going to export -> inter-quake-model (.iqm). In the now opening dialog leave all the options as they are, just choose a file name (e.g. "test.iqm") and paste this:

Code:
dieone,dietwo,draw,duck,duckwalk,duckjump,duckidle,idle,jump,fly,painone,paintwo,shoot,taunt,run,runbackwards,strafeleft,straferight,deadone,deadtwo,forwardright,forwardleft,backright,backleft,melee,duckwalkbackwards,duckstrafeleft,duckstraferight,duckforwardright,duckwalkforwardleft,duckbackwardright,duckbackwardleft

Into the left-hand side box called "animations". Then press "export IQM" at the top.

8. It will take a few seconds and hopefully show no errors afterwards. The resulting "test.iqm" should be around a megabyte in size (if it is much less you did something wrong, could be much more depending on the complexity of your mesh though).

9. Copy the resulting test.iqm into your user directory (e.g. on Linux home/"user"/.xonotic in a subfolder structure mimicking the Xonotic .PK3 e.g. /data/models/player. The texture ("test.tga") belongs in /data/textures (I will cover compressed .dds textures later)

10. Also open the Xonotic data PK3 (it's a renamed .zip file) and navigate to the playermodels directory (e.g. ./data/models/player) and copy the additional files of the original rig you chose (f.e. Ignis) into the same directory as you put your test.iqm. These are the .iqm.framgroups , the .iqm_0.sounds and the .iqm_0.txt. Adjust the details in the txt file according to your liking and rename all to your model name e.g. test.iqm_0.txt and so on. Also copy or better make a preview image for the menu (e.g. the .iqm_0.jpg and .iqm_0_alpha.jpg). If you want you can also edit the .iqm.sounds file, but don't mess with the .iqm.framegroups file.

11. Fire up Xonotic, chose the new model and playtest. Binding "toggle chase_active" to a key in the menu can help you view the model from a 3rd person perspective. To view it nicely from all angles, record a demo and then start the demo after typing "camera_enable 1" into the console.

12. Adding a normal-map: This is a complex topic, but if you want it quick and dirty just run your diffuse texture through a normalmap filter plug-in in GIMP ( http://code.google.com/p/gimp-normalmap/ ) and it will give you a relatively flat and messy normal-map. Better is to make a higher-poly model and bake a normal map from it onto your game-model. Check out this Blender tutorial for details: http://joeyspijkers.com/t_normalmapping.html (Note: errors in a baked normal map can also be fixed by hand-painting each individual RGB in GIMP and running it through a normalizing filter afterwards. Blue is the hight, Red and Green two different light angles)
Once you have a normalmap, just place it called "test_norm.tga" in the usual texture folder. If it looks inverted you are not using the OpenGL normal-map style and have to invert the normal-map in the above GIMP filter (one click).

13. Adding team colors: To have red and blue colors in team games one needs to actually split the above created "test.tga" into a "test.tga" that has all the to be colored parts painted black and a "test_shirt.tga" that has everything but the to be colored parts painted black. Note that you don't actually have to color anything yourself, the engine will do it for you.
As such a split diffuse is a mess to work with if you still want to make some changes, I found it useful to create a selection channel in my .xcf gimp file that allows me to easily and very quickly recreated the split .tga files.

14. Next you can create a specularity map, called "test_gloss.tga". This will define the shininess of individual parts of the texture. Basically it is a greyscale image of your diffuse texture with the shinier parts increased in brightness and the duller ones darkened. Keep it overall relatively dark, or your model will shine like a plastic toy.
For advanced users it is also possible to have a full color gloss map, where the color defines the so called "specular exponent". This way you can even better emulate the material a surface is supposed to be made of. Plastics or car paints can stay a shade of gray, copper has an orange specular color, gold has a yellow specular color, steel has a very slight blue tint to its otherwise white specular color, aluminum also has a very slight tint.

15. Last but not least you can add a "test_glow.tga" texture that defines which part of the texture should glow like an LED (note: this is also used for full-bright textures I think, more to that later). This needs to be all black, with brighter areas only where it is supposed to glow. I have yet to test this fully, but it seems like if it is kept grey-scale it will also pick up the team-colors, but if you color it the result will glow in that specific color. (can anyone confirm this?)

Stay tuned Smile
Reply

#2
Amazing, I'm going to have to give this a shot. But on the other hand, how can I get good character topology?
Reply

#3
Uhmm, that is a broad question. Obviously you would need some modeling practice. It might help you to start with a good human base-mesh however. I did one (not perfect mind you) a while ago: http://opengameart.org/content/low-poly-...ale-female , but you can find many more on OpenGameArt.
Reply

#4
while you are looking into the models/animation stuff ...
could you get a working example of how to make a looping animated mesh for a map?
Reply

#5
Hmm... weren't those supposed to be very bad for performance? Hmm maybe not anymore now that Darkplaces supports GPU run skeletal animations...
No idea where to start with those animated map-models though, I am just using the existing animation for now, so I don't mess with those.
However it occurred to me that it would be nice to add some "turning on the spot" foot animations for the player models, as that still looks a bit strange right now.

Edit: Hmm, this wiki entry ( http://dev.xonotic.org/projects/xonotic/...ramegroups ) might be a starting point, however it mostly explains it for playermodel animations... there is a loop option though and it mentions: "If you make 1 looping animation and place model on map as misc_gamemodel it will be animated". However, is it possible to use .iqm for map models (e.g. load them in Netradiant)? Animated md3 would work of course, but then we have the performance problem again I guess.
Reply

#6
ive seen that already :/

the information is out there ... its just scattered into so many little pieces ... I cant make any sense of it ...

somebody knows how to make animated models .... but whenever I think I found them ... i get pointed to somebody else ...

as for performance ...
it shouldn't be a problem if used sparingly and wisely ... (like ... not several large animated models over reflective water cortez666)
Reply

#7
Uhmm... without having tried it, I would say it is pretty strait forward, no?
Get the Blender MD3 exporter (http://www.katsbits.com/tools/ ) make a looping animation (e.g. first and last keyframe should have more or less the same position), then export as .md3. Put it in the map models directory with a "whatever.md3.framegroups" file and write in it a single line that specifies where the animation starts and stops plus the framerate and the "1" for looping.
Last step, include model in a map and see it moving in game.
Reply

#8
the thing for a animated mapmodel is that is has to be misc_gamemodel or misc_clientmodel NOT a misc_model to work (excuse if i got the ent names wrong, long time since i made a xono map, but you get the idea). Aside from that it should be the same approach as with making any looped animated model, eg use framegroups. iirc one or both of the game/client model/s also has entity keys to assign animations. The entity inspector is your friend!.
Reply

#9
Cool, thanks for the additional details! I guess misc_clientmodel would be the right choice in most cases then to avoid using up unnecessary network-bandwidth.

Edit: I mentioned here a CoD like model on Blendswap, but that turned out to be a model ripped from a commercial game (was likely a bad April's Fool joke).
Reply

#10
thanks tzork ... I didn't know about that ...

as for the model ... i dont know ... looks rather presenty ... not very futurey
Reply

#11
Yes, time travelers for the big intergalactic tournament Wink
Reply

#12
The thing with misc_model is, q3map2 baked this geometry into the .bsp same as any brush you make in radiant (think of it at detail brushes, thats the closest thing you have brush-wise). Thus it can't be animated. What you can do if you need simple animations, say something that rotates or bobs, is targeting the misc_model to a invisible func_* (ex func_rotating). This instructs q3map2 to add the models mesh to that targeted "brush entity" (and its also the only way to get a lightmapped, for better and worse, animated model).

Sorry for derailing the thread a bit (but i diden't start! ; )
Reply

#13
Maybe one of the mods can spit this topic and include all the info on animated map-models in another thread? Thx.
Reply

#14
how about this thread http://forums.xonotic.org/showthread.php?tid=2899
Reply

#15
Check the first post. I added points 12 to 15 which explain all the textures you need.

After you have done all that, you model should looks something like this in game:

.png   shirtblue.png (Size: 219.96 KB / Downloads: 264)

(Note: heavy WIP of a new playermodel set for Xonotic I am very slowly working on)
Reply

#16
(04-02-2013, 01:21 PM)hutty Wrote: ive seen that many people are satisfied with PhenQ already :/

the information is out there ... its just scattered into so many little pieces ... I cant make any sense of it ...

somebody knows how to make animated models .... but whenever I think I found them ... i get pointed to somebody else ...

as for performance ...
it shouldn't be a problem if used sparingly and wisely ... (like ... not several large animated models over reflective water cortez666)

I know, same here. Does anyone know of any step by step tutorials on creating animated models?
Reply

#17
Asked community hard to find help http://forums.xonotic.org/showthread.php?tid=5879 wish we had more mappers and modelers I feel like something is missing.
Reply

#18
That thread is about importing custom models (as the title suggests), not creating new models.

What you need can be found here: http://lmgtfy.com/?q=creating+animated+model
[Image: 230.png]
Reply

#19
Speaking of that what about Mega Nyx ( http://forums.xonotic.org/showthread.php?tid=5985 ) We got Mega Erebus and Erebus we have a female erebus named Nyx but no female Mega Nyx. Or how about more Alien Player Models? Too many CTF servers forcing with Mega Erebus eh we gotta change Player Model sizes too they are so tiny, the only perfect size is Mega Erebus.

Or maybe what about this?


.jpg   Swk_greedo.jpg (Size: 182.28 KB / Downloads: 184)
Reply

#20
Kind of looks like GAK
Reply

#21
I originally would not have bothered making this post, but since Xonotic has a community within Steam, I am guessing that I have a legit reason too. As some of you might be aware of, no gaming community on Earth has more player models for it than Steam's Source engine does. However, that does not mean that making them playable in Xonotic is an easy task. In fact, it can be difficult. For those inclined to try their hand at it, the links shown below might be useful:
http://www.moddb.com/games/half-life-2/t...in-blender
http://steamcommunity.com/sharedfiles/fi...=150436586

Quake 3 Arena and its mods have a fair number of player models as well, but getting those to work within Xonotic, as I was informed in the past, is difficult.
Reply

#22
Quake 3 models are a nightmare to port, as they're separated into 3 parts.
I would assume any model from the Source engine would require a completely new animated skeleton (i.e. ours) to work properly, and even then, the license makes these incompatible with the game.

As far as custom mods go, even the current collection of ~25 models aren't ever used on servers, as they're either too small compared to Mega Erebus, or they look "silly" and sound annoying (like the ponies).
They were generally poorly received on the SMB servers.
[Image: 230.png]
Reply

#23
(04-02-2013, 12:54 AM)poVoq Wrote: Hmm... weren't those supposed to be very bad for performance? Hmm maybe not anymore now that Darkplaces supports GPU run skeletal animations...
No idea where diet pills like phenq to start with those animated map-models though, I am just using the existing animation for now, so I don't mess with those.
However it occurred to me that it would be nice to add some "turning on the spot" foot animations for the player models, as that still looks a bit strange right now.

Edit: Hmm, this wiki entry ( http://dev.xonotic.org/projects/xonotic/...ramegroups ) might be a starting point, however it mostly explains it for playermodel animations... there is a loop option though and it mentions: "If you make 1 looping animation and place model on map as misc_gamemodel it will be animated". However, is it possible to use .iqm for map models (e.g. load them in Netradiant)? Animated md3 would work of course, but then we have the performance problem again I guess.

I am kinda new to this but q3map2 baked this geometry into the .bsp same as any brush you make in radiant (think of it at detail brushes, thats the closest thing you have brush-wise). Thus it can't be animated. What you can do if you need simple animations, say something that rotates or bobs, is targeting the misc_model to a invisible func_* (ex func_rotating). This instructs q3map2 to add the models mesh to that targeted "brush entity" (and its also the only way to get a lightmapped, for better and worse, animated model).
Reply

#24
(06-19-2013, 02:17 PM)poVoq Wrote: Check the first post. I added points 12 to 15 which explain all the textures you need.

After you have done all that, adeleweightloss.com you model should looks something like this in game:


(Note: heavy WIP of a new playermodel set for Xonotic I am very slowly working on)

This instructs q3map2 to add the models mesh to that targeted "brush entity" (and its also the only way to get a lightmapped, for better and worse, animated model).
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Bot waypoints tutorial Karamel 3 6,657 12-25-2020, 01:15 PM
Last Post: terencehill
  Xonotic custom icon for profile users - editing image tutorial LegendGuard 4 2,569 12-14-2020, 12:16 PM
Last Post: Julius
  Having trouble getting transparent textures to work Notavi 5 2,892 07-17-2018, 07:39 AM
Last Post: Notavi
Brick trying to get into mapping, HAALP TheSmasher1992 21 8,547 06-14-2018, 02:04 PM
Last Post: Julius
  [Discussion] Tutorial and Training maps -z- 41 33,477 01-28-2016, 07:19 AM
Last Post: Mario
  [TLC required] Maps, packs, textures, other stuff in progress I never finished -z- 0 4,587 12-24-2013, 05:08 PM
Last Post: -z-
Video A Video Tutorial for Mappers: Modular Geometry unfa 23 27,587 11-03-2013, 09:41 AM
Last Post: aa
  New Playermodel; need some technical help poVoq 16 23,298 08-31-2013, 11:12 AM
Last Post: Orbiter Sunblast
Thumbs Up New Crylink model in progress poVoq 17 13,789 06-16-2013, 11:56 AM
Last Post: poVoq
  Tutorial (basics) - Howto edit a playerskin/texture. paperclips 0 3,871 03-23-2013, 12:46 PM
Last Post: paperclips

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-