Jump to content
Sign in to follow this  
eggbeast

very weird issue with buldozer weapon anim

Recommended Posts

This is a frickin mind bender. can anyone point me to the solution please?

 

uns_k50mdrum.p3d is a vietnamese K50m SMG with a drum mag I added from our ppsh41 to replace it's normal 35 round banana mag.

the exact working model with banana mag (uns_k50m.p3d) was taken and magazine deleted, and drum inserted. This was the only change. I then saved it as uns_k50mdrum.p3d.

 

so in the picture below:

1 top pic is the model i want to work - see how none of the anims work in buldozer. no muzzleflash, no hidden sling (i have two - one for stock folded and one for stock open)

2 second pic is shot from O2, showing the model with selection magazine highlighted

3 third pic is same model with magazine selection deleted. works in buldozer - note muzzle flash (using [] keys i animated isselected to 1 to show the hidden sling)

k50_drum1_zpsyx5iqin7.jpg

 

 

so, if we put the drum mag in the model, it KILLS buldozer.

I tried building it in binpbo and got this error log

<model = "p:\uns_weap_w_test\k50\uns_k50m.p3d">
Warning: p:\uns_weap_w_test\k50\uns_k50m.p3d:0 Error while trying to generate ST for points: 8417, 8420, 8416
Warning: p:\uns_weap_w_test\k50\uns_k50m.p3d:0 Error while trying to generate ST for points: 8325, 8328, 8324
Warning: p:\uns_weap_w_test\k50\uns_k50m.p3d:VIEW_PILOT Error while trying to generate ST for points: 8417, 8420, 8416
Warning: p:\uns_weap_w_test\k50\uns_k50m.p3d:VIEW_PILOT Error while trying to generate ST for points: 8325, 8328, 8324
Warning: p:\uns_weap_w_test\k50\uns_k50m.p3d: Selection magazine needs a section. The shadow volume may not work well.
Warning: p:\uns_weap_w_test\k50\uns_k50m.p3d: Selection stock needs a section. The shadow volume may not work well.
Warning: p:\uns_weap_w_test\k50\uns_k50m.p3d: Selection magazine needs a section. The shadow volume may not work well.
Warnings in p:\uns_weap_w_test\k50\uns_k50m.p3d:11000
</model>
<model = "p:\uns_weap_w_test\k50\uns_k50mag.p3d">
Warning: p:\uns_weap_w_test\k50\uns_k50mag.p3d:0 Error while trying to generate ST for points: 2093, 2077, 2076
Warning: p:\uns_weap_w_test\k50\uns_k50mag.p3d:0 Error while trying to generate ST for points: 2334, 2318, 2317
Warning: p:\uns_weap_w_test\k50\uns_k50mag.p3d:0 Error while trying to generate ST for points: 480, 464, 463
Warning: p:\uns_weap_w_test\k50\uns_k50mag.p3d:0 Error while trying to generate ST for points: 239, 223, 222
Warnings in p:\uns_weap_w_test\k50\uns_k50mag.p3d:11000
</model>
<model = "p:\uns_weap_w_test\k50\uns_k50magdrum.p3d">
</model>
<model = "p:\uns_weap_w_test\k50\uns_k50mdrum.p3d">
Warning: p:\uns_weap_w_test\k50\uns_k50mdrum.p3d:0 ErroO:\Arma3CommunityTools\CfgConvertFileChng\CfgConvertFileChange.exe returned error 22: Invalid argument
O:\Arma3CommunityTools\CfgConvertFileChng\CfgConvertFileChange.exe returned error 22: Invalid argument
O:\Arma3CommunityTools\CfgConvertFileChng\CfgConvertFileChange.exe returned error 22: Invalid argument
O:\Arma3CommunityTools\CfgConvertFileChng\CfgConvertFileChange.exe returned error 22: Invalid argument
O:\Arma3CommunityTools\CfgConvertFileChng\CfgConvertFileChange.exe returned error 22: Invalid argument
Convert model p:\uns_weap_w_test\k50\uns_k50m.p3d -> C:\Users\Rob\AppData\Local\Temp\ARMAaddons\uns_weap_w_test\k50\uns_k50m.p3d
Convert model p:\uns_weap_w_test\k50\uns_k50mag.p3d -> C:\Users\Rob\AppData\Local\Temp\ARMAaddons\uns_weap_w_test\k50\uns_k50mag.p3d
Convert model p:\uns_weap_w_test\k50\uns_k50magdrum.p3d -> C:\Users\Rob\AppData\Local\Temp\ARMAaddons\uns_weap_w_test\k50\uns_k50magdrum.p3d
Convert model p:\uns_weap_w_test\k50\uns_k50mdrum.p3d -> C:\Users\Rob\AppData\Local\Temp\ARMAaddons\uns_weap_w_test\k50\uns_k50mdrum.p3d
r while trying to generate ST for points: 7112, 7115, 7111
Warning: p:\uns_weap_w_test\k50\uns_k50mdrum.p3d:0 Error while trying to generate ST for points: 7020, 7023, 7019
Warning: p:\uns_weap_w_test\k50\uns_k50mdrum.p3d:VIEW_PILOT Error while trying to generate ST for points: 7112, 7115, 7111
Warning: p:\uns_weap_w_test\k50\uns_k50mdrum.p3d:VIEW_PILOT Error while trying to generate ST for points: 7020, 7023, 7019
Warning: p:\uns_weap_w_test\k50\uns_k50mdrum.p3d: Selection magazine needs a section. The shadow volume may not work well.
Warning: p:\uns_weap_w_test\k50\uns_k50mdrum.p3d: Selection stock needs a section. The shadow volume may not work well.
Warning: p:\uns_weap_w_test\k50\uns_k50mdrum.p3d: Selection magazine needs a section. The shadow volume may not work well.
</model>
Creating texture headers file...
13 texture headers saved to file "C:\Users\Rob\AppData\Local\Temp\ARMAaddons\uns_weap_w_test\texHeaders.bin"
w:\C_branch\Poseidon\Arrowhead\El\FileServer\fileServer.cpp(2513) : Assertion failed 'req->RefCounter()==1'

running diagnostics on the magazine selection we have a few non planar faces

k50drum2_zpsorrj0xe4.jpg

gun model in lod0 has

8062 points

9043 faces

8 sections

 

of which, magazine has

878 points

1003 faces

 

model.cfg is same for the uns_k50m and the uns_k50mdrum.

when building with addonbuilder, the animations work perfectly on the banana mag version but not the drum version.

 

I have literally no idea why the animations fail. can anyone help enlighten me ?

 

model.cfg in case it helps

class CfgSkeletons
{
	class Default
	{
		isDiscrete=1;
		skeletonInherit="";
		skeletonBones[]={};
	};
	class uns_k50_skel: Default
	{
		skeletonBones[]=
		{
			"Magazine", "",
			"bullet", "magazine",
			"mag_switch", "",
			"Bolt",	"",
			"Trigger","",
			"Selector","",
			"zasleh","",
			"stock","",
			"siderail","",
			"ironsights","",
			"sling","",
			"slingf","",
			"rearsight_1",""
		};
	};
};
class CfgModels
{
	class Default
	{
		sectionsInherit="";
		sections[]={};
		skeletonName="";
	};
	class uns_k50_base: Default
	{
		sectionsInherit="Default";
		skeletonName="uns_k50_skel";
		sections[]=
		{
			"zasleh","Trigger",
			"bullet","magazine","mag_switch",
			"Bolt",
			"sling","slingf","stock",
			"siderail","ironsights"
		};
		class Animations
		{
			class Zeroing100m //rotate sight up or down
            {
				type="rotationZ";
                source="zeroing1";
                selection="rearsight_1";
                axis = "rearsight_1_axis";
                minValue = 0;
                maxValue = 0.1;
 				angle0="rad 0";
 				angle1="rad -90";
            };
			class MuzzleFlashROT
 			{
 				type="rotationX";
 				source="ammoRandom";
 				sourceAddress="loop";
 				selection="zasleh";
 				axis="barrel_axis";
 				centerFirstVertex=true;
 				minValue=0;
 				maxValue=4;
 				angle0="rad 0";
 				angle1="rad 360";
 			};
            class muzzleflash_hide
            {
                type="hide";
                source="hasSuppressor";
                selection="zasleh";
                minValue = 0.0;
                maxvalue = 0.25;
                hideValue = 0.01;
            };
			class siderails_hide
			{
				type="hide";
				source="hasAccessory";
				selection="siderail";
				animPeriod=0;
				minValue=0.0;
				maxValue=0.3;
				minPhase=0.0;
				maxPhase=0.3;
				hideValue=0.1;
				sourceAddress="mirror";
			};
			class backsight_hide
			{
				type="hide";
				source="hasOptics";
				selection="ironsights";
				animPeriod=0;
				minValue=0.0;
				maxValue=0.3;
				minPhase=0.0;
				maxPhase=0.3;
				hideValue=0.1;
				sourceAddress="mirror";
			};
			class trigger
			{
				type = "rotationZ";
				source = "reload";
				selection = "trigger";
				axis = "trigger_axis";
				minValue = 0;
				maxValue = 1;
				angle0 = "rad 0";
				angle1 = "rad -30";
			};
			class FireModeSwitch 
			{
				type = "translation";
                source="weaponMode";
                selection="Selector";
                axis="Selector_axis";
				memory = 1;
				minValue = 0.2;
				maxValue = 0.7;
				offset0 = 0.8; //fwd full auto
				offset1 = -0.8;
//				begin = "stock_axis_begin";
//				end = "stock_axis_end";
            };
			class Mag_switch1
			{
				type = "rotationz";
                source="reloadMagazine";
                memory=1;
                selection="mag_switch";
                animPeriod=0;
                axis="mag_switch_axis";
                minValue=0;
                maxValue=0.15;
                minPhase=0;
                maxPhase=1;
				angle0= 0;
				angle1= "rad 70";
			};			
			class Mag_switch2: Mag_switch1
			{
                minValue=0.500001;
                maxValue=0.6;
                minPhase=0;
                maxPhase=1;
				angle0= 0;
				angle1= "rad -70";
			};	
			class unloaded_magazine_hide
			{
				type = "hide";
				source = "hasMagazine";
				selection = "magazine";
				hideValue = 0.1;
			};
			class magazine_hide: unloaded_magazine_hide
            {
                source="reloadMagazine";
                minValue=0;
                maxValue=1;
                hideValue=0.15;
                unhideValue=0.51;
            };
			class magazine_bullets_hide: magazine_hide
            {
                selection="bullet";
                hideValue=0.01;
            };
            class rounds_empty
            {
				type="hide";
                source="isEmpty";
                selection="bullet";
                animPeriod=0;
                minValue=0;
                maxValue=1;
                hideValue=0.1;
            };
			class empty_magazine_bullets_hide
            {
                type="hide";
				source = "isEmptyNoReload";
                selection="bullet";
                minValue=0;
                maxValue=1;
                hideValue=0.01;
            };
			class reload_magazine_hinge
           	{
				type="translation";
                source="reloadMagazine";
               	selection="magazine";
                minValue=0.1230769230;
                maxValue=0.153846153;
                axis="magazine_axis";
				begin = "bolt_axis_begin";
                end =  "bolt_axis_end";
				offset0 = 0;
				offset1 = -1.5;
            };
			class reload_magazine_hinge2
           	{
				type="translation";
                source="reloadMagazine";
               	selection="magazine";
				begin = "bolt_axis_begin";
                end =  "bolt_axis_end";
                minValue=0.46153846153;
                maxValue=0.5076923076;
                axis="magazine_axis";
				offset0 = 0;
				offset1 = 1.5;
            };				
            class boltreload
            {
                type = "translation";
				source="reloadMagazine";
                selection = "Bolt";
                axis = "bolt_axis";
                begin = "bolt_axis_end";
                end = "bolt_axis_begin";
                minValue = 0.753846153;
                maxValue = 0.77692307;
                offset0 = "0";
                offset1 = "1";
            };
            class boltreload2: boltreload
            {
                minValue = 0.792;
                maxValue = 0.807692;
                offset1 = "-1";
            };
            class bolt: boltreload
            {
                source = "reload";
                minValue = 0;
                maxValue = 0.5;
            };
            class bolt2: bolt
            {
                minValue = 0.5;
                maxValue = 1;
                offset1 = "-1";
            };
			class slide_back: bolt
			{
				source="isEmpty";
			};
			class stock_translate
			{
				source="isSelected";
				type = "translation";
				selection = "stock";
				axis = "stock_axis";
				begin = "stock_axis_begin";
				end = "stock_axis_end";
				memory = 1;
				minValue = 0.2;
				maxValue = 0.7;
				offset0 = -0.5;
				offset1 = 0;
			};
			class sling_hide
            {
                type="hide";
                source="isSelected";
                selection="sling";
                minValue = 0;
                maxvalue = 0.7;
                hideValue = 0;
                unhideValue = 0.6;
            };
			class slingf_hide //shorter sling
            {
                type="hide";
                source="isSelected";
                selection="slingf";
                minValue = 0;
                maxvalue = 0.7;
                hideValue = 0.6;
            };
    	};
	};
	class uns_k50m: uns_k50_base {};
	class uns_k50mdrum: uns_k50m {};
};

Share this post


Link to post
Share on other sites

HI, everything seems correct. Only guess, try to inherit class of drum SMG from base class (last row):

class uns_k50mdrum: uns_k50_base {};

Share this post


Link to post
Share on other sites

i had that originally, but it didn't work either. that was why i changed it - to prove that it definitely is not the model.cfg.

something in that drum p3d, or in what happens to the whole p3d when the drum is pasted into it, is causing this.

 

what does this error mean?

 

Warning: p:\uns_weap_w_test\k50\uns_k50mdrum.p3d:0 ErroO:\Arma3CommunityTools\CfgConvertFileChng\CfgConvertFileChange.exe returned error 22: Invalid argument
O:\Arma3CommunityTools\CfgConvertFileChng\CfgConvertFileChange.exe returned error 22: Invalid argument

Share this post


Link to post
Share on other sites

not sure if skeleton names are case sensitive, but try it to rename to lower case.

 

"Magazine", "",
"bullet", "magazine",

Share this post


Link to post
Share on other sites

i had that originally, but it didn't work either. that was why i changed it - to prove that it definitely is not the model.cfg.

something in that drum p3d, or in what happens to the whole p3d when the drum is pasted into it, is causing this.

 

what does this error mean?

 

If you think it's the .p3d trouble shoot the .p3d.  Create a new .p3d file and past it into the file piece by piece while checking all of the name selections, properties .etc.  It could be some property value you inadvertently added.  Is the drum mag on the same texture as the whole gun?

 

Not trying to nick pick but I would to stick to either camel case or lower case.

Share this post


Link to post
Share on other sites

thanks for helping guys - I appreciate it

 

case sensitivity doesn't affect it with the banana clip instead of drum - with exact same naming. they share same complete model.cfg and so long as i dont paste in the drum mag, it works, even without a magazine selection.

 

Create a new .p3d file and past it into the file piece by piece while checking all of the name selections, properties .etc.

 

ok there are only 2 properties used i nthe model

autocenter 0

LODNoShadow 1

 

this model works perfectly without that drum.

Share this post


Link to post
Share on other sites

In the k50mdrum model i can remove the magazine to an edit lod, start bulldozer in lod 0 - all anims working. paste in the magazine while buldozer is open - the anims break

see movie below - in same lod, and in real time,

at 9s I ctrl V (paste) the mag,

then at 19s I ctrl Z to remove it.

 

i deleted all the "non planar" faces and "cannot generate st coordinates" parts from the magazine model. pasted in the remainder - still no anims.

I also deleted the selection names bullet and magazine from the mag model. as soon as i paste in the model even without any naming or properties assigned to it, it stops buldozer animating the previously working gun model

 

As an aside the ppsh41 (the root model where all these problems seem to originate) only shows lod 4 in third person view in game - with loads of parts missing etc.

the ppsh41 (different model, uses texture that the drum does) with or without the drum doesn't animate either...

any idea why this might happen, or how i can get some kind of log file about it?

 

ok so i pasted in the ppsh41 trigger only (uses same rvmat and texture as drum) and that also killed the animations

Share this post


Link to post
Share on other sites

ok i found it by elimination in the rvmat
it's this file that causes the problem
texture="uns_weap_e\uns_ppsh41\data\uns_ppsh41_nohq.paa";
i remade it from the tga and it WORKS.

 

SOLVED.

 

thanks for the nudges in the right direction. who frickin knew the nohq would spazz out the anims?

Share this post


Link to post
Share on other sites

Why don't you weigh the end of the sling to the stock instead of using the much more obvious hide animation?

Share this post


Link to post
Share on other sites

i don't even know what that means.

Share this post


Link to post
Share on other sites

Weighting are used for organic objects or clothes when you need to animate some vertices not by 100%. Animation is then affected by color of vertices from 0 (blue vertices ) to 100% (red). In oxygen type "N" for paint selection color and your model.cfg need isDiscrete property set to "0".

 

tutorial:

https://forums.bistudio.com/topic/109501-stalkergbs-weighting-overview/

Share this post


Link to post
Share on other sites

I consider assigning vertices to a name selection for animation purposes to be weighing, whether it's 1%, 99% or 100%.  I know the term is traditionally for organic animation but the same approach can be applied to inorganic models, such as canteens, helmets and other rigid pouches that do not deform on a character but can be weighed at 100% such as hats.

 

So why not assign the end vertices of the sling to the stock name selection so the sling deforms with the movement of the stock vs using the hide animation for two different slings?

Share this post


Link to post
Share on other sites

so i guess the textures will stretch? i guess they are anyway, as im using scale X for making the longer one. however when i scale it, the texture stretches uniformly across all parts. if i just stretch some parts, i imagine they will look awful. im not very gifted at this stuff tbh. certainly not managing individual vertices in O2. im ok with selections, but points and faces are beyond me a little.

 

if someone wanted to make it for me as an example, i could then apply it to he other weapons that have slings on moving stocks, but i have so much work on in unsung (tanks, planes, etc)  i may pass on trying this alone.

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
Sign in to follow this  

×