Home   Help Search Login Register  

Author Topic: helmet visible in 1st person view  (Read 4615 times)

0 Members and 2 Guests are viewing this topic.

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
helmet visible in 1st person view
« on: 26 Feb 2005, 18:15:36 »
hi all,
as you all probably know im:uc mod has released its teaser pack. the strangest bugs is that the edge of the helmet is visible in 1st person view, but only when the soldier is in a vehicle.
has anyone an idea why? there is no helmet in the pilot view lod, that's the strange thing about it.
we're looking for members: IM:UC MOD

Offline Pilot

  • Contributing Member
  • **
Re:helmet visible in 1st person view
« Reply #1 on: 26 Feb 2005, 21:18:58 »
Something about this came up on the official forums, a possible solution is as follows:

Quote by Sniperwolf572 on the official forums:
Quote
OK I've found an solution to this problem thanks to my friend Jackal326, the trick is to have all the points on the head (that you DON'T want to show in vehicle while in first person mode) in the "hlava" named selection, altough this is a quite easy solution I was wondering how did I overlooked it.

Hope this helps anyone else with this problem.

Here's how to do this:
Quote
1. Select all the parts you don't want to be seen
2. Find the component "hlava" in the Named Selections window
3. Right click the "hlava" component
4. Click Redefine

I don't know if this needs to be done in all LODs but to be sure I did this in every resolution LODs.
Here is the thread:
http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?s=3812a0e847193aa6955dbc6916d2294a;act=ST;f=48;t=44002;st=0;r=1;&#entry685071

This is not guartenteed to fix the problem, but hopefully it will!

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:helmet visible in 1st person view
« Reply #2 on: 26 Feb 2005, 23:50:31 »
unfortunately that doesn't help-
the helmet is part of the hlava selection in all lods, otherwise it wouldn't move with the head.
... but thanks for the pointers to the forum thread.  :D
we're looking for members: IM:UC MOD

Offline Pilot

  • Contributing Member
  • **
Re:helmet visible in 1st person view
« Reply #3 on: 27 Feb 2005, 05:04:05 »
Yeah, as I said, it wasn't guarenteed to work ::).  Sorry that didn't help :'(  I'm not familiar with making soldier addons, so I can't suggest anything elso to do, sorry!

Kyle Sarnik

  • Guest
Re:helmet visible in 1st person view
« Reply #4 on: 28 Feb 2005, 18:40:16 »
Ahh, I have had the same problem with my units, and I figured out why, but I have no solution. Anyways this happens because I noticed that while a unit is in a vehicle (or more specific, any type of crew LOD), your first person view while in a vehicle will be that of the vehicles, not the soldier, so, while in a vehicle and in first person, you don't view yourself from the view - pilot LOD, but instead from the lowest resolution LOD, my guess is because you are using the vehicles first person view and in the vehicles first person your soldier is nothing but a proxy, so you are pretty much the outside of your soldier from a camera positioned in the head. Now, I noticed that no other soldiers had this problem, but I also took into consideration that the fact I am using setobjecttexture to remove/add the helmets from/to my units, that it must be causing problems with this. I am guessing you are doing the same with your units?

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:helmet visible in 1st person view
« Reply #5 on: 01 Mar 2005, 00:06:15 »
yeah, i do use that feature, and the probs only appear on units with it.
what you said in the first place led me to soem kind of solution. i don't pretend it applies for everyone, but in my specific case it might help to a certain extend.
this is the soldier in 1st person view in a vehicle:

this cannot be the lowest res lod, because in it the helmet is a low poly pot shaped "thing" without interior textures. only the 1st and 2nd res lod have these interior helmet textures:

what you see ingame (in this case) is in fact the 2nd res. lod, so a simple solution might be to remove the faces pointing inside.

that doesn't solve the whole problem, cos you still see the prominent part of the beret if you put it on, but it's a start.
this leaves me with one question: is it hardcoded which res lod is used for 1st person view in vehicles or is it editable somehow? at least it doesn't seem to be editable in the lod properties dialog in o2.
« Last Edit: 01 Mar 2005, 00:07:49 by remcen »
we're looking for members: IM:UC MOD

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:helmet visible in 1st person view
« Reply #6 on: 01 Mar 2005, 00:31:20 »
no, wait... folks,  just found out it's the 1st res lod, so i can'T remove the interior textures cos that would look awful. no simple solution - bummer.
ok, more urgent than before: usage of res lod for handling in-vehicle view by the game engine: hardcoded or editable?

edit: know what, forget about my two posts, they don't make much sense after thinking about it. of course the 1st res lod =  lowest lod, which i didn'T get when i first read kyle's post. and of course this lod is used in vehicles. everything else wouldn't make sense.
kyle is right and i am clueless. fullstop-  
« Last Edit: 01 Mar 2005, 01:30:01 by remcen »
we're looking for members: IM:UC MOD

Kyle Sarnik

  • Guest
Re:helmet visible in 1st person view
« Reply #7 on: 01 Mar 2005, 01:30:49 »
I was thinking of making a script that would automaticly take of the soldiers helmet when he enters a vehicle, but then I thought forcing it might not be a good idea, but luckily if you take off the helmet, then the prob is solved, simple as that, besides in vehicles helmets are pretty much useless, not that they do anything in OFP anyways except look good  ;D

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:helmet visible in 1st person view
« Reply #8 on: 01 Mar 2005, 17:20:19 »
ok, to sum it up: there seems to be no way to overcome the problem, but at least it helps to understand how the game engine handles soldier models.
a solution might be not to make helmets with faces pointing towards the pilot-selection in the memory lod, like it was done for the kmarns int infantry models. but then you have to decide: high detailed models/changing headgear or no probs.

swapping to the beret in vehicles in my case does only help a bit cos you still see prodruding parts of the beret. and it wouldn't make that much sense either cos our next vehicle release will be most likely a zpu-4. it would make no sense to take off ones helmet when manning its gunner seat cos there's no protection from outside like in a car.

in the end:
why is there no problem if i don't use setobjecttexture to change the headgear? might it be that ofp sets the texture of the hlava-selection to 'no texture' by an internal, hardcoded setobjecttexture command if a unit enters a vehicle and that we by using our own setobjecttexture command circumvent this???
we're looking for members: IM:UC MOD

Kyle Sarnik

  • Guest
Re:helmet visible in 1st person view
« Reply #9 on: 01 Mar 2005, 18:20:54 »
Well, you could make the beret optional, like on my troops, soldier can take his helmet off so he is bare headed, and then gets another option to either put on the helmet or his hat.

Or, you could try making a new res LOD, and giving him a helmet without any faces pointing towards your view, and set the resolution so that you can only see this LOD if you are really really (I mean really close), something like that, that way when in a vehicle, since your view will be inside the head, you will be forced to use that LOD, no? Well anyways give that a try I would like to see how it turns out  ;D

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:helmet visible in 1st person view
« Reply #10 on: 03 Mar 2005, 13:44:10 »
it works in principle, but not satisfying.
there has to be a gap between the two resolutions of 0.05 otherwise the very lowest lod is ignored when you're in a vehicle. this also means that the models close to the player don't have interior helmet textures which looks kind of odd.
i tested them on desert island, so there was no need for the game engine to swich to the next lod, so it might be different on nogova, with lots of other units, etc. also the necessary width of the gap might be different on different systems.
however i think we'll keep this until i figure out a better solution (if there is one :P) and wait for what the beta-testers think when they scrutinise the pack.
*thumbsup* - thanks so far m8
« Last Edit: 03 Mar 2005, 13:46:26 by remcen »
we're looking for members: IM:UC MOD

Kyle Sarnik

  • Guest
Re:helmet visible in 1st person view
« Reply #11 on: 03 Mar 2005, 20:54:09 »
Yes, I thought that might happen. I though of maybe a different solution, using texture alpha channels. You should try something like this (0.150 LOD only):

1. Make an object (or objects) that fits tightly (must be covering the entire thing) around the helmet and beret (both), but not too far out, kinda like wraping it in a tight plastic bag.

2. Make a transparent texture with a very very slight grey tint to it. Apply this to that new object. Name the selection(s)

3. Make the helmet and beret textures .paa format, then select the entire soldier model, go to faces, then press "move top", next select the clear object(s) surrounding each of the headwear, and do the same, then do the same for the helmet and beret. You MUST do it in this order.

4. Add the named selection to hiddenselections, then create a new script that runs only on players and only localy (for MP, only runs on the players side). Have a loop to detect if:vehicle soldier != soldier , then if so, setobjecttexture that new selection with the new transparent grey texture. Then be sure to add a part which setobjecttextures it to no texture when the player leaves a vehicle.

It might just work. Give it a try.

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:helmet visible in 1st person view
« Reply #12 on: 04 Mar 2005, 00:07:55 »
it also works... in principal - not only the edge of the helmet vanished, but it made the jeep an open convertible:
clicky

the idea was good, only the game engine doesn't understand us obviously  ;D

anyone an idea why the game engine ignores the lowest lod if the gap is less than 0.05? (see two posts above) if we could overcome that and set the lods to 0 (-> no interior helmet textures) and 0.0001 (with interior helmet textures) the prob would be solved. but if i should guess (again): hardcoded.
we're looking for members: IM:UC MOD

Kyle Sarnik

  • Guest
Re:helmet visible in 1st person view
« Reply #13 on: 04 Mar 2005, 00:44:54 »
Hmm. Crap I guess I forgot about that. Ill do some more experiments with that.

Kyle Sarnik

  • Guest
Re:helmet visible in 1st person view
« Reply #14 on: 06 Mar 2005, 18:58:25 »
Ok, this solution should work. Make a script that runs only on player and localy for MP games, use the script to setobjecttexture ALL headgear off when in vehicles, then make the correction when they are not in vehicles. Should work since AI won't care at all and if its local only that player can view the change.

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:helmet visible in 1st person view
« Reply #15 on: 06 Mar 2005, 22:35:38 »
well, i don't think forcing the player to put off all headgear is that good.
our solution atm is a modified lod-gap-solution or whatever one should call it. the gap is still 0.05 but only the inner textures at the front of the helmets were removed in the lowest lod.
first responses from our testers sound encouraging, as you have to crouch on the ground close to the model and look upward to see the difference.
and to be honest i'd prefer this  lod-based solution rather than a scripted one which yet could cause probs in multiplayer.
we're looking for members: IM:UC MOD

aries_pup

  • Guest
Re:helmet visible in 1st person view
« Reply #16 on: 02 Jun 2005, 07:29:33 »
hey, this has something to do with the config of the soldiers...

the class of the soldier should be the same name as the p3d.

class = soldier
p3d = soldier.p3d

we had that problem once and manage to solve it by doin that...
remember to define the class as well...

hope i make sense and helped~
cheers~

Offline remcen

  • Contributing Member
  • **
  • a.k.a. hottentotten_mike
    • IM:UC
Re:helmet visible in 1st person view
« Reply #17 on: 02 Jun 2005, 10:55:41 »
umm, sorry man, doesn't work. i'm not sure if we really have the same problem.

and how would you make several units in the cfgvehicles class from the same model with this method? all would have to be different models  :-\
we're looking for members: IM:UC MOD

The KMan 3000

  • Guest
Re:helmet visible in 1st person view
« Reply #18 on: 11 Jun 2005, 19:52:14 »
The way I fixed this problem was to select the entire helmet, not just the points, and define it as hlava.

Hope that helps.