[CSM] Questions about faces, hands and stuff

Ask questions, discuss ideas, get answers

Questions about faces, hands and stuff

Postby Sgt.Killboy » Sat May 07, 2011 11:34 am

In EoD we just stumbled across some serious problems due to adding african americans to our US team. The first problem that appeared is the LODs of the soldiers. Every team seems to use one single LOD sytem, so when I start walking backwards away from our african american soldier, his face turns from black to white with moustache when reaching the distance where the next LOD starts to be displayed. Thats almost the distance you reach when hitting 3 times "C" ingame.

Since african americans played a big role in the US army in vietnam we really want some to be added to the teams. Same is for female vietcong soldiers.

Since it would'nt make much sense to have females or colored people that switch to male, white with moustache, there has to be a way to fix this.

So what I'm asking for now, is an Idea how to get this solved. The LOD setup seems to be hardcoded, so i thought about additional faces with different LOD settings to overlay the original ones ingame.
Maybe like having one original face that displays when near, with all it's animations and a secondary you see when further thats stuck to the kit parts...

In case of the female playermodel, additional hair instead of a hat or helmet might be helpfull.

Any part of an idea will be helpfull.
My anger management class pi**e* me off.
Image
Sgt.Killboy
 
Posts: 59
Joined: Thu Mar 24, 2011 6:16 pm

Re: Questions about faces, hands and stuff

Postby Senshi » Sat May 07, 2011 12:24 pm

Actually you could just disable the LODs and make the game exclusively use the LOD0 (highest quality) object. Or at least increase it to a distance where no detail on the face can be recognized anyway. The impact on perfomance is absolutely minimal. At least it has been when I did this for BG42, and I think the level of overall complexity and perfomance demand of these two mods is fairly similar.

I mean, nobody, really nobody has a gaming system that dates from 2002 these days. And anything newer than that really ha no issues with that.

EDIT: Also moved the topic to the correct forum and prefix ;) .
User avatar
Senshi
 
Posts: 695
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany

Re: Questions about faces, hands and stuff

Postby Sgt.Killboy » Sat May 07, 2011 12:36 pm

Oh well...that sounds quite simple.

:D

For the wrong placement of the topic...well sorry. I noticed it when i already posted it.

:oops:
My anger management class pi**e* me off.
Image
Sgt.Killboy
 
Posts: 59
Joined: Thu Mar 24, 2011 6:16 pm

Re: Questions about faces, hands and stuff

Postby Apache Thunder » Sun May 08, 2011 4:28 pm

This line of code governs the LOD behavior for soldier parts:

Code: Select all
ObjectTemplate.addTemplate USSoldierComplexHead
ObjectTemplate.setRandomGeometries 3
ObjectTemplate.setIsFirstPersonPart 0
ObjectTemplate.setLodValue 0.01
ObjectTemplate.bindToSkeletonPart Bip01_Spine3 3

ObjectTemplate.addTemplate USSoldierHead
ObjectTemplate.setIsFirstPersonPart 0
ObjectTemplate.setLodValue -0.01


"ObjectTemplate.setLodValue".

The above example shows how the head is set up. The complex version has a setLodValue of 0.01 while the non random version of the head uses setLodValue of -0.01. So it's set up in a way that the complex head disappears at the same time the non random version becomes visible.

You can do one of two things here. You can increase the setting to something like 1.0 for complex head and -1.0 for the non random version, or you can remove the non random head completely and rem out the setLodValue setting on the random complex head.

I also recommend doing this for the hands. Increase the lodvalue spread on those as default set ups have the hands disappearing from a distance that is still noticable. This occurs because the hands do not have a second 3p version of themselves like the head does. There is the 1p version and the 3p version. So as a result, the setLodValue of 0.3 on the hands makes them disappear at a distance. Increase this setting or rem it out completely to avoid disappearing hands. Rem it out from the 1p hands....there's no reason at all for 1p hands to have that code at all.
ImageImageImage

I have cameras in your head!
User avatar
Apache Thunder
 
Posts: 1192
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA

Re: Questions about faces, hands and stuff

Postby Sgt.Killboy » Sun May 08, 2011 5:13 pm

Wow! Thanks. That helps a lot.

For the hands part of it. As our goal is, to have an african american soldier, we need to use black hands too. I guess the game engine assigns the different heads the random way. So if you spawn as an engineer you might be black, the other time white.
How do we get the game engine to assign black hands to a black face? Or would we probably have to use gloves for all, to get rid of that?
My anger management class pi**e* me off.
Image
Sgt.Killboy
 
Posts: 59
Joined: Thu Mar 24, 2011 6:16 pm

Re: Questions about faces, hands and stuff

Postby Apache Thunder » Sun May 08, 2011 5:34 pm

You could assign the same amount of random geometries for hands as you do the heads. But I've heard they won't always match up. You may have to use gloves unfortunately. :(
ImageImageImage

I have cameras in your head!
User avatar
Apache Thunder
 
Posts: 1192
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA

Re: Questions about faces, hands and stuff

Postby Senshi » Sun May 08, 2011 9:52 pm

IIRC the "random geometries" actually aren't random at all. They simply count up. So the first instance of the object will get geometry 1, the second geometry 2 etc. .
So if you have the very same amount of faces as hands, you should be on the right side.
User avatar
Senshi
 
Posts: 695
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany

Re: Questions about faces, hands and stuff

Postby Sgt.Killboy » Sun May 08, 2011 10:27 pm

Well. Youre awesome guys.

My last question would be, does that mean if we have a set of 5 classes, and the medic (wich is maybe class 3) should always be a female soldier, we need 5 faces, 5 sets of hands and 5 bodies and make the 3rd of all parts female, to ensure class 3 is always female?

Like:

class 1 - gunner : head, hands, body
class 2 - sniper : head, hands, body
class 3 - medic : female head, nail polished hands, body that brings all the boys to the yard
class 4 - machine gun: hands, head, body
class 5 - support: hands, head, body

...to get all the parts fit like they should?
My anger management class pi**e* me off.
Image
Sgt.Killboy
 
Posts: 59
Joined: Thu Mar 24, 2011 6:16 pm

Re: Questions about faces, hands and stuff

Postby Apache Thunder » Sun May 08, 2011 11:04 pm

I'm aware of how the random geometry code works. But I recall someone saying it still would cause mismatches even if the order of the child objects were the same and such.
ImageImageImage

I have cameras in your head!
User avatar
Apache Thunder
 
Posts: 1192
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA

Re: Questions about faces, hands and stuff

Postby Sgt.Killboy » Sun May 08, 2011 11:35 pm

So maybe it's possible without the random stuff.

I'm not a coder, so I got no clue of it, but maybe if the code says

Code: Select all
ObjectTemplate.addTemplate USSoldierComplexHead
ObjectTemplate.setGeometries 5


instead of

Code: Select all
ObjectTemplate.addTemplate USSoldierComplexHead
ObjectTemplate.setRandomGeometries 3


Would that probably work?

Cause...thats for the female now...the problem ist the haircut too.

BF1942 uses short haired heads. To get a female, i thought having a head with some kind of bun would be the best way, to make sure, the hair doesnt "grow" into the body in some or most positions but look female...
Having a head with a bun means, its not possible to use a hat or helmet, thats used by short haired heads, cause the bun would go half through the helmet/ hat and appear on the outside of it.

I thought having 5 classes, 5 heads and 5 bodies might be the way, to ensure the female uses a female body and a kit with no hat.
My anger management class pi**e* me off.
Image
Sgt.Killboy
 
Posts: 59
Joined: Thu Mar 24, 2011 6:16 pm

Next

Return to 1942 Modding Discussion

Who is online

Users browsing this forum: Baidu [Spider] and 30 guests

cron