Jump to content

Home

Disabling model parts - nodraw is NOT the answer


Twinstar02

Recommended Posts

I asked about this earlier, but does anyone know how to disable certain parts of a model?

 

For example, if you look at the Jan model you can see that she has a full shirt under her vest and you should be able to disable the vest somehow so that only the shirt shows.

 

If you use the nodraw command on the vest it still renders the vest, but just as a white-ish non-textured model, so this is of no use.

 

If you look at the npcs.cfg you can see that it points to the Jan model but calls it JediF (as in, female jedi) and has certain model parts turned off, and when you spawn the JediF npc in the single player game, it is indeed Jan without her vest or chaps on.

 

This is also the deal with the stormtrooper, there is a stormtrooper and stormtrooper2 entry in the npcs.cfg, one has the shoulderpad , the other does not.

 

What we need to figure out is how to reference the npcs.cfg file with our custom models (or thats my guess anyway). Obviously it can be done because that is where it is pulling the multiplayer stormtrooper from (without the shoulderpad).

 

Does anyone have any clue about this? If I knew it wasnt possible that would be one thing, but the nodraw solution really isnt a solution at all.

 

-Twinstar :deathstar:deathii:

Link to comment
Share on other sites

it doesn't really. the problem is for certain parts this will work, because the rest of the model is still drawn under it. for others it will not work. for example take the vest on jan

 

you can make it no draw, or do the alphathing tems sugested, doesn't really matter they have the same effect... a huge hole... this is because the torso under it is never drawn, because that part of the model isn't turned on (torso_augment I think it was called).

 

but i think you need a model editor (3dmax?) to turn them on, and then recompile the model to make it work in MP. For single player you can just edit the NPCS.dat in assets0.pk3 and include the lines surfon and surfoff to specify wich parts you want to see and wich not.

Link to comment
Share on other sites

Is this what you're talking about? Hope they show up....

 

shot0005b.jpg

and this?

shot0007b.jpg

 

Basically here is what I did, I went into ModView to find out what surfaces had to be turned on and off for the Jan model to remove the jacket. below are the changes I made to the npcs.cfg file.

 

surfOn "torso_augment_off hips_augment_off hips_torso_off"

surfOff "head_goggles torso_comp torso_vest"

 

I added this right under "playerModel jan".

 

(hoping the formating holds)

Jan

{

fullName "Ors, Jan"

playerModel jan

surfOn "torso_augment_off hips_augment_off hips_torso_off"

surfOff "head_goggles torso_comp torso_vest"

 

 

I don't know yet if it works in multiplayer but it works in single player.

Link to comment
Share on other sites

The npcs.cfg file only changes the single player aspect of the game. I tried playing around with the bot files but with no luck. The bot files only tell it what model to use so it load with the default of the jacket on. We'll probably have to wait till the SDK is out to change it for multiplayer.

Link to comment
Share on other sites

hi, can I ask a favour, can u send teh npsc.cfg file to Lazarus2002@barrysworld.com along with a new bot file if u know how to create one without the items.

Im not trying to overwrite the jan skin for multiplayer, but Ive pretty much created (well modified) a new skin just need to get rid of the vest and goggles, and then Im pretty much sorted, think I need to change the eye colour aswell, will have to see.

 

the only major problem being that she still has the same face, which is a bit of a let down

Link to comment
Share on other sites

Actually, it is very simple.

 

In the skin file, just do not assign a texture to the model part you don't want to show up, instead assign the word "clear".

 

Example: In kyles model_default.skin

 

Change this:

torso_shoulder_pad,models/players/kyle/kyle_extras.tga

 

To this:

torso_shoulder_pad,clear

 

And presto! No shoulderpad, his shirt is clearly seen underneath. This works in both singleplayer and multiplayer.

Link to comment
Share on other sites

Originally posted by Darth Valinor

Actually, it is very simple.

 

In the skin file, just do not assign a texture to the model part you don't want to show up, instead assign the word "clear".

 

Example: In kyles model_default.skin

 

Change this:

torso_shoulder_pad,models/players/kyle/kyle_extras.tga

 

To this:

torso_shoulder_pad,clear

 

And presto! No shoulderpad, his shirt is clearly seen underneath. This works in both singleplayer and multiplayer.

 

this may work with kyle, i dunno, but it doesn't work with jan as i've already tried it

Link to comment
Share on other sites

Sorry, I had not tested this with everyone. Here is how it really works.

 

Using "clear" instead of a texture will infact remove that part of the model, the problem is, with Jan especially, some models do not normally draw what is underneath of that part of the model. For instance with Kyle or Jeditrainer's shoulder pad, changing the texture assigned to it to "clear" will make it invisible(showing the shoulder underneath). As far as Jan goes, her watch, torso computer, and goggles can be removed this way with no problems, but to remove her belt, vest, or chaps, you have to find a way to turn on the torso_augment_off, torso_hips_off, and hips_augment_off sections of the model. This can be done with surfoff and surfon inside the npcs.cfg file. Unfortunately this only works for single player. It will not allow you to turn them on with the skin file. (This explains why you cannot make the stormtrooper's shoulderpad visible, because that model part is off by default.) So until the SDK comes out, or Raven decides to tell us how to do this, you can only turn surfaces off not on, so if the default skin file for the model you want to skin has anything like torso_augment_off, then part of the model will not be visible if you turn something else off. But if there are no augment_off parts, then it should be safe to get rid of any extra parts(shoulderpads, belts, etc).

Link to comment
Share on other sites

ok, so can you use the surfoff and surfon in SP for your OWN character, I know you can for npcs, but say I want to make my kyle model jan (which i can do) but lose the vest and chaps without making those parts invisible.

 

Cause you're all talking about MP, and I'm confused :p

 

Thanks

Link to comment
Share on other sites

I had some ideas on this myself last night, when I discovered the 'clear' lines in the dismembered Kyle skin files.

 

When you set a model part's texture to 'clear,' yes, it leaves a gap. I believe that the answer lies in the other lines of the skin file.

 

Jan, for instance, has lines in her skin file like:

hips_augment_off,models/players/jan/legs.tga

 

I believe the answer lies here. This should be an instruction that tells the system that when the augmentation is off, i.e., no texture, this is the texture file that should show beneath it.

 

Problem is, this line is how it appears in the file now, and I think when you set her chaps to 'clear,' the legs texture does *not* show beneath.

 

Don't have the game here in front of me; maybe some of you out there can take this and run with it. I've already built a test skin to try out some ideas when I get home, but I won't know till then if they work.

 

~JediMouse~

Link to comment
Share on other sites

Almost forgot: one more thing for you guys to run with in the meantime:

 

In the stormtrooper skin file, you'll see these lines:

 

torso_armor_neck_augment,models/players/stormtrooper/torso_legs.tga

 

torso_pauldron_off,models/players/stormtrooper/shoulder.tga

 

torso_body_neck_augment,models/players/stormtrooper/torso_legs.tga

 

Notice that these seem to be backwards -- the 'off' line refers to the shoulder pauldron file, and the normal 'augment' lines refer to the normal armour textures. I believe this was done in reverse intentionally so that the default stormtrooper does *not* have the shoulder pauldron, and you must turn the augmentation *off* to make it appear.

 

Thus, try what you'd try for my Jan suggestions above, as if you were trying to turn the augmentation *off*, and see what happens.

 

~JediMouse~

 

P.S. What do I get if I'm right? ;)

Link to comment
Share on other sites

Here is the funny thing. I make the exact changes to the npcs.cfg, but unfortunately it seems to have absolutely no effect whatsoever. Anyone know why? It just defaults to the reg Jan skin. Very strange indeed. If you have a theory or a good npcs.cfg then post or send me an e-mail. johnnymacjman@hotmail.com Man, this one is giving me a headache. Shame, jan is definately hot under all the garbage they put on her.

 

 

SDK

SDK

SDK

SDK

Please Raven :)

Link to comment
Share on other sites

After experimenting some more, I have found out that the character entry for Kyle in npcs.cfg is only used for parts where you do not control him, i.e. cinematic sequences. I have no idea where the default config is for player controled Kyle, but this is where you would have to put the surfon/off settings to disables parts of the model that you are using. Unfortunately, it looks like this might be hard coded into the game(through the qvm compile). As I cannot find a file that affect the player controlled Kyle.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...