Jump to content
Ranwer135

Binocular model issue with hands - First person view

Recommended Posts

G'day guys,

 

 

I am trying to figure out why my custom model appears to be outside of the player's hands in first person view (different animations have no effect on solving the issue, either):

 

Wqco3HW.jpg

 

 

Whereas in third person it is completely fine, as shown here:

 

OSPWnT2.jpg

 

I have also adjusted the position of the model and still no solution.

 

 

The model inherits from the binocular class, which my config looks like this:

class CfgWeapons
{
	class Binocular;
	class DSS_SodaEquip_F: Binocular
	{
		author = "Rawner135";
		descriptionShort = "$STR_DSS_Item_CanteenFilled_Desc";
		displayName = "$STR_DSS_Item_CanteenFilled";
		distanceZoomMax = 0;
		distanceZoomMin = 0;
		model = "\dss_items\models\Can_Equipped.p3d";
		modelOptics = "";
		opticsZoomInit = 0.05;
		opticsZoomMax = 0.05;
		opticsZoomMin = 0.01;
		picture = "\dss_items\inv\CanRedgull_ca.paa";
		scope = 2;
		visionMode[] = {};
		weaponInfoType = "RscOptics_Rangefinder";
	};
};

The model also has the following Memory LOD points (since it is considered to be a 'weapon'):

 

- konec hlavne

- usti hlavne

- Nabojniceend

- Nabojnicestart

- zbran

 

 

 

Does anyone know why the model causes this first person issue? I have tested the other binoculars and they seem to work fine. If anyone could help solve this issue, that would be appreciated.  :)

 

 

Best Regards,

 

 

 

Rawner135

Share this post


Link to post
Share on other sites

How is the can model set up? what LODs do you have and is the can a proxy object? 

Viewpilot (first person) lod and the mesh in it is in my understanding rendered on top of everything else so if for example you have no view pilot lod and it uses the lod1 it might cause this.

In any case I would say the problem is in the .p3d and view LODs.

Share this post


Link to post
Share on other sites

How is the can model set up? what LODs do you have and is the can a proxy object? 

Viewpilot (first person) lod and the mesh in it is in my understanding rendered on top of everything else so if for example you have no view pilot lod and it uses the lod1 it might cause this.

In any case I would say the problem is in the .p3d and view LODs.

 

Here are the photos for each LOD of the model in Object Builder:

 

1.000

 

KKuIvY3.png

 

 

View - Pilot

 

vpxQ0ai.png

 

 

ShadowVolume 1.000

 

f20sNbh.png

 

 

Geometry

 

kSOqosC.png

 

 

Memory

 

NI67Gt9.png

 

 

As you can see, LODs 1.000 and View - Pilot are replicas, including LODs ShadowVolume and Geometry. However, I am not sure what you mean by proxy object (I know what a proxy is, and that it can be used for muzzles/attachments. But not sure about proxy object)?

 

Also, since I have triangulated the ShadowVolume model. Is it possible for the Geometry LOD to effect this issue, since it is also triangulated?

Share this post


Link to post
Share on other sites

Is there an alpha channel in the texture?

 

What are you using to convert to .paa? According to this thread, sometimes viewPilot objects go funny if they're using DXT5 formatted .paa:

https://forums.bistudio.com/topic/79098-view-pilot-lod-weapon-problem/

 

Named property forceNotAlpha = 1 might resolve it if you object does need an alpha texture (scope models usually have this property)

  • Like 1

Share this post


Link to post
Share on other sites

By proxy I meant that you can add any object into another as a proxy, but thats not the case here. Was just trying to cover as many angles as I came up with.

What I gather your LODs should be enough for it work. It looks like some sort of z-buffer thing where the character pilot view is drawn completely on top of the weapon model, but haven't really experienced such with characters in arma. Seen similar with vehicles in VBS and I think there was some named property or something that may have helped there back then, but Im not sure if theres one like it in Arma but I can look into it.

You could maybe check the binocular models from A2 released content if theres anything special in there (and if youre not already done that). Or try with different texture and/or rvmat shaders, they could also be treated differently in this situation. Also theres the face sorting function in Object Builder (for alpha textures), but since its simple to try might be worth a shot though it is quite far fetched. Also fast to try would be copying the geometry as view geometry for just in case.

Also for debug you could use some other weapon object that has worked normally in the cans place to test if the same occurs. 

--edit

Also da12thMonkey could be on to something! Good catch!

  • Like 1

Share this post


Link to post
Share on other sites

Is there an alpha channel in the texture?

 

What are you using to convert to .paa? According to this thread, sometimes viewPilot objects go funny if they're using DXT5 formatted .paa:

https://forums.bistudio.com/topic/79098-view-pilot-lod-weapon-problem/

 

Named property forceNotAlpha = 1 might resolve it if you object does need an alpha texture (scope models usually have this property)

 

By proxy I meant that you can add any object into another as a proxy, but thats not the case here. Was just trying to cover as many angles as I came up with.

What I gather your LODs should be enough for it work. It looks like some sort of z-buffer thing where the character pilot view is drawn completely on top of the weapon model, but haven't really experienced such with characters in arma. Seen similar with vehicles in VBS and I think there was some named property or something that may have helped there back then, but Im not sure if theres one like it in Arma but I can look into it.

You could maybe check the binocular models from A2 released content if theres anything special in there (and if youre not already done that). Or try with different texture and/or rvmat shaders, they could also be treated differently in this situation. Also theres the face sorting function in Object Builder (for alpha textures), but since its simple to try might be worth a shot though it is quite far fetched. Also fast to try would be copying the geometry as view geometry for just in case.

Also for debug you could use some other weapon object that has worked normally in the cans place to test if the same occurs. 

--edit

Also da12thMonkey could be on to something! Good catch!

 

da12thMonkey was spot on! :icon_w00t:

 

 

The problem was the button that I have highlighted in the photo below:

 

ujzKSmP.png

In the model, I had forgotten to take off the custom colour I applied to one of the parts of the model, due to creating the texture while UV mapping. That being said, I had an itch in myself that something was wrong, so I checked the Face Properties and sure enough it had something of an RGBA appearance.Thanks to you guys, it now finally works!

 

 

 

Cheers! :cheers:

 

EOSnjdY.jpg

 

 

 

 

- Rawner135

Share this post


Link to post
Share on other sites

I have exactly this same problem but I think it is due to adding static weapons to a vehicle using memory points.  no idea how to solve that.

Share this post


Link to post
Share on other sites

I have exactly this same problem but I think it is due to adding static weapons to a vehicle using memory points.  no idea how to solve that.

From the top of my head theres nothing you can do if you have no access to the original models. Its a feature how the driver/pilot/gunner/firstperson views are drawn.

Share this post


Link to post
Share on other sites

From the top of my head theres nothing you can do if you have no access to the original models. Its a feature how the driver/pilot/gunner/firstperson views are drawn.

I have all the access I want -- I built them :)  I use a script to load each cannon and its crew onto the deck, so when I am in first person they look like they're outside.   Third person looks fine, and the guns and crew on other ships looks okay too.

Share this post


Link to post
Share on other sites

Could you post a picture? Would make your situation more clear. From what you said I gather youre building a ship or something like that? I'll try to find the model that had the same issue and see what fixed it but do you have to use separate objects? could they be pieced together on the vehicle with proxy parts?

Share this post


Link to post
Share on other sites

If you're using attachto to connect the gun models to the ship, they will not draw "inside" the viewPilot LOD since they are part of the environment rather than the vehicle itself . The viewPilot LOD is rendered on top of everything else in the scene rather than existing within the game environment.

 

In the view LODs at least, the turrets need to be modelled as part of the vehicle somehow. And as Goat said, you can use proxies for this rather than attachto.

  • Like 3

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×