Different gibs and blood for every character species

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators


  • I thought it would be a good idea to make a topic for this feature alone given the fact it's a bit more complicated to implement but should be possible by now. I think we should focus on making different types of blood and gibs based on each character's species by now, so robots and aliens won't gib red meat chunks and bleed with red blood.

    I looked into the code for some time but it's something too complicated to just open a text editor and implement, so I thought I should post what I believe and have noticed on the technical part here so maybe we can all get an idea on how this would be doable. I'm not saying this should be done the exact way I describe it here, it's just what I believe is best to follow from what I have examined.

    First of all what I think it should do: There should be 3 gib and blood types in total. First one is the current red gibs which should be left as they are for all human characters. The second type should be a greenish-blue type of meat and blood for all types of aliens and lizards (something like this). Third type finally should be black oil for blood (something like this) and mechanical parts for gibs in the case of robots. The species of each player model that would specify which gibs / bloods apply to which character should be written in models\player\playername.txt in one of the lines there as "human", "alien" or "robot".

    As far as my understanding goes, the gibing event must basically read the character type of the victim whenever it's called and spawn different gib models depending on what it sees. The blood code seems to be separate from gibs, so the blood effect spawners would need to read the character type separately in the same way and spawn different blood particles and decals depending on what character species they read in each case.

    More into the code, the files I found of most interest are cl_player.qc and g_violence.qc in the server code, and gibs.qc in the client code (as gibing and blood are client side effects now). gibs.qc is the file where the gibs models are specified, so a new switch needs to be added here pointing to different gib models which can be called by the event that invokes gibing ("case 0x01" is the switch for the current gib types, that switch probably needs duplicating with new TossGib()s pointing to different models in each case). Each of these switches now would be used either from cl_player or g_violence where reading the character's species needs to occur and in each case use a different "case" from gibs.qc (the lines "if(sv_gentle) | e.state |= 0x80;" in g_violence.qc are probably a good example although I'm not sure).

    Putting a reader for each gibing character's type is the biggest challenge. Different gib models and blood textures would need to be done as well of course. Also a new gib sound would need to be created for robots, since the current meaty "Splash!" can apply to gibing humans and aliens but for robots that would need to sound as someone smashing a computer against a wall.

    I am of course willing to try and help with implementing this but can't do it by myself so I'd like to know what everyone else thinks and knows so far. You can post any partial code patches here and new gib models and textures as well if anyone makes any (as requested by the admins, try to use use the sourceforge project page for posting patches or modifications).
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Sun Feb 01, 2009 6:56 pm

  • I completely support this initiative, once/if someone makes the new gibs and/or sounds I can help with whatever is needed at code level.
    User avatar
    mand1nga
    Alien trapper
     
    Posts: 321
    Joined: Mon May 12, 2008 12:19 am

Sun Feb 01, 2009 9:10 pm

  • mand1nga wrote:I completely support this initiative, once/if someone makes the new gibs and/or sounds I can help with whatever is needed at code level.


    Temporarily they can be tested with any compatible model or texture... I don't believe these will be a problem. Anyway I'll take a look at making new blood textures although for the gibs I'm not so sure how since it requires editing and re-saving the gib models to re-texture (since I initially had the idea that the gib models should always be the same, just differently textured in each case).
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Sun Feb 01, 2009 9:20 pm

Sun Feb 01, 2009 9:34 pm

  • Alright, I wanted to take a look at modifying the blood but encountered something very odd; There doesn't appear to be any blood texture at all, while yet one is used in the game. I tried renaming the folders env, textures, gfx and even models but even without these there is a blood texture in the game. Where is the current one located? Is it a .tga file?
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Sun Feb 01, 2009 11:02 pm

Mon Feb 02, 2009 8:19 am

  • Because nobody made models/particles for them. Simple.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Mon Feb 02, 2009 10:12 am

  • Totally wanted this feature since I started playing. I'll make some gib models and stuff if needed.

    When I blow a robot up I expect oil, flames and sparks. I think that using player/team specific colours for the gibs could be a good idea.

    I like the Unreal gibs where you can see recognisable bits of the other players anatomy flying around when you gib them.
    Taiyo.uk
    Alien trapper
     
    Posts: 436
    Joined: Mon Apr 17, 2006 8:48 pm
    Location: Reading, IN-GER-LUND!!!

Mon Feb 02, 2009 11:37 am

  • divVerent wrote:Because nobody made models/particles for them. Simple.


    I thought the real reason was the code being too complicated to get working... the gibs should be piece of cake to make I think. I wonder if I can edit md3 and mdl files directly with Blender... if I can I'll have the new gib models up and running quickly. As for blood I cannot find where the blood texture is located, if anyone knows where it is that would be of great help.

    And team colored gibs would not be such a good idea I think. If someone is in the blue team then they'd gib blue which wouldn't be right. Probably a few spots on the gibs colored in the team's color but that could look ugly. The team colors are basically the color of the shirt / pants, while the gibs are the flesh / metal.
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Mon Feb 02, 2009 2:07 pm

  • He meant gibs with parts of clothes, paint, which would red/blue.
    Alien
    Forum addon
     
    Posts: 1212
    Joined: Tue Apr 22, 2008 7:12 am

Mon Feb 02, 2009 4:33 pm

  • Yeah, perhaps I should have been more clear - the gibs only bear team colours on (what were) external surfaces. Blood/internal organ/etc. colour remains unaffected by the team colours.
    Taiyo.uk
    Alien trapper
     
    Posts: 436
    Joined: Mon Apr 17, 2006 8:48 pm
    Location: Reading, IN-GER-LUND!!!

Tue Feb 24, 2009 1:02 am

  • *gentle bump to the topic as I really think it would be a shame to let this feature die out and be forgotten again*

    Was wondering if there's any progress with this so far. I was still planning to try and modify some gibs myself but I really don't trust (and am not sure if I can use) my .md3 exporter for Blender. I have however found a few helpful hints on how to modify some of the current gibs to retexture them if they help any:

    First of all some of the models in data\models\gibs have the path to their texture written in readable words between code. If you have Notepad++ you can open them and look for ".tga" and modify that line to the path of the new texture. Those models who don't have a clear path to the texture file in them may likely take the texture with the same name as the model file from Textures (all the gib model textures appear to be located directly under data\textures).

    Now... if the plan is to only have differently textured gibs but not different models, there might be another way; Modifying the TossGib function so textures can be specified manually for each model. This is the current example of a tossgib from client\gibs.qc:

    TossGib("models/gibs/eye.md3", org, vel, prandomvec() * 150, 0);

    I believe it could be an alternative if we could manually specify texture overrides in this function so we could have the same models but using different textures in each case (I'm not sure if that's a good idea or not but probably worth trying).

    If modifying the models isn't needed I can nicely take the textures and make the needed versions in at most a few hours. Just tell me if that is of any help or if everyone believes someone who can remodel all the .md3's should take care of it all entierly.
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Tue Feb 24, 2009 7:56 am

  • would be awesome to have even more blood than now :D
    User avatar
    liolak
    Alien
     
    Posts: 114
    Joined: Fri Jan 25, 2008 12:16 am
    Location: Montréal, Canada

Fri Feb 27, 2009 4:20 am

  • I made tech gibs for the robots 2 weeks ago. Someone needs to texture them (i'm bad at that). I am sure that no one will texture them, however, due to a grudge against me.

    Here is the GPL'd blender file:
    https://cat2.optus.nu/cat2/nutsandbolts.blend

    Gears (helical, spur, wish bone), nuts, bolts, capacitors, spring, pnumatic/hydrolic ram.
    It's all there. I am sure, however, that it will not be textured solely due to the hatread the artists have for me and my social beliefs.

    These are all centered correctly so that the "center" of each object is at the point of contact with the ground or (in the case where there are 2 copies (nuts and bolts)) the point where it would enter whatever it's being bolted into. All that needs to be done is: UVmap and export.

    So, there are the tech gibs all ready for texture and then use, and they won't be in the game ever: I'm sure of it.
    tundramagi
    Forum addon
     
    Posts: 974
    Joined: Sun Jan 04, 2009 4:53 pm

Fri Feb 27, 2009 4:36 am

  • Your set of 'tech gibs' has approximately 3-4 times the number of triangles (~12,000) as the more detailed player models.
    Image
    User avatar
    torus
    Forum addon
     
    Posts: 1341
    Joined: Sun Dec 24, 2006 6:59 am
    Location: USA

Fri Feb 27, 2009 7:29 am

  • torus wrote:Your set of 'tech gibs' has approximately 3-4 times the number of triangles (~12,000) as the more detailed player models.


    Yes: the reason is that it is _One_ file with Many gibs in it. Nice rim shot attempt though: someone reading your comment might think that there are just a few gibs and they take up said amount of polys. Oh and the most detailed nexuiz player model isn't very detailed. Oh and btw: when is a 16 sided cylider just too many triangles to render (since never). Btw why do you quote 'tech gibs' as if they aren't worthy of the word gibs?
    tundramagi
    Forum addon
     
    Posts: 974
    Joined: Sun Jan 04, 2009 4:53 pm

Fri Feb 27, 2009 7:54 am

  • MirceaKitsune: Could you texture these: https://cat2.optus.nu/cat2/nutsandbolts.blend
    If you do that then we'll have tech gibs probably. You were able to make the fox-lady so I think you will beable to do a good job on these. There are gears, bolts, capacitors, etc.
    tundramagi
    Forum addon
     
    Posts: 974
    Joined: Sun Jan 04, 2009 4:53 pm

Fri Feb 27, 2009 1:18 pm

  • tundramagi, downloaded them and they look good, though I probably won't be using each of them as there are too many similar models. Due to my Blender .md3 exporter not working as it should I'll probably be manually giving you the textures so you can stick them to the models unless I can finally find a way to export them.

    Btw, I will be leaving for 3 weeks the day after tomorrow though I'll be taking my laptop with me. It's possible I may not get to do it in this time or will be slow though I will try to take them there and texture them since I have Photoshop installed on my lappy.

    Until them maybe you can also make one set of alien gib models too, and I can texture these as well in the meantime. Also can you please post them each as a single .blend file for each model in a .zip or .rar archive? It's much easier to work with them that way.
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Fri Feb 27, 2009 4:37 pm

  • Here is a working md3 exporter:
    https://cat2.optus.nu/cat2/md3_export_texturefix.py

    Exporting each individually is one of the things I wished to avoid untill the texturing was done (otherwise one needs to reexport after making a change/fix).
    Last edited by tundramagi on Fri Feb 27, 2009 5:35 pm, edited 1 time in total.
    tundramagi
    Forum addon
     
    Posts: 974
    Joined: Sun Jan 04, 2009 4:53 pm

Fri Feb 27, 2009 5:19 pm

  • Thanks, I think I finally got it working :D I will try to make both these and the alien gib models and post them as textured .md3's once they are ready, though it may take a while given the fact I will be gone for a month. If someone can take care of the code as well till then they should be ready to fit.
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Fri Feb 27, 2009 6:56 pm

Fri Feb 27, 2009 7:02 pm

  • The folders in that archive are empty. Can you repack and repost them again please?
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Fri Feb 27, 2009 8:00 pm

Fri Feb 27, 2009 9:36 pm

  • Tested them and they look very good so far :) However I think they should be a bit bigger, when a player explodes in them it looks like half of the body vanishes in the air. Maybe some bent metal patches would look nice as well, not only mechanical parts.

    Couldn't help it and made two screenshots of how they look like as gibs (just replaced the original gib models with them, no per player gib code yet).

    Image

    Image

    I'm tempted to try making the alien ones myself, though I still have some problems with specifying the textures and shaders correctly in Blender so in the worst case I'll just pack them as .blend files.
    User avatar
    MirceaKitsune
    Keyboard killer
     
    Posts: 593
    Joined: Thu Aug 14, 2008 6:48 am
    Location: Romania - Bucharest

Sat Feb 28, 2009 12:45 am

  • Ok, next I'll texture and export the pnumatic ram part, and then maybe metal plates etc :).
    tundramagi
    Forum addon
     
    Posts: 974
    Joined: Sun Jan 04, 2009 4:53 pm

Sat Feb 28, 2009 3:22 am

  • Added pnumatic ram:
    https://cat2.optus.nu/nexuizserv/m_nutsandboltszip.pk3

    Do gibs support pants/shirt colors (do they inherit from parent?)

    Oh and to set textures in blender you just make the _material name_ the texture (without extention)

    So if you had a texture in nexuiz/textures/ambose/megablood.tga
    you would set in the material box:
    ambrose/megablood

    It's the box that has ME:blabla.001
    You have to press Add material for it to be around.
    The md3 exporter I posted is one I hacked to make it work correctly like that.
    tundramagi
    Forum addon
     
    Posts: 974
    Joined: Sun Jan 04, 2009 4:53 pm

Sat Feb 28, 2009 3:04 pm

  • I've added gloss maps aswell now.
    tundramagi
    Forum addon
     
    Posts: 974
    Joined: Sun Jan 04, 2009 4:53 pm

Sun Mar 01, 2009 6:16 pm

  • haha, that looks awesome already! :D
    User avatar
    Fnilp
    Member
     
    Posts: 14
    Joined: Sat Nov 01, 2008 6:18 am

Tue Mar 03, 2009 6:55 am

  • Thanks.
    What does everyone else think?
    tundramagi
    Forum addon
     
    Posts: 974
    Joined: Sun Jan 04, 2009 4:53 pm

Tue Mar 03, 2009 11:00 am

  • Amazing work guys, keep it up !

    Have you decided how to set different gibs animations and "blood" effects to models?

    The only thing I would want to add is a little broken/deformed pieces of steel, replacing in some form the pieces of meat. I think anyone will expect to see more or less the same mass amount for body and gibs.
    User avatar
    mand1nga
    Alien trapper
     
    Posts: 321
    Joined: Mon May 12, 2008 12:19 am

Next


Return to Nexuiz - Development




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest