Jump to content
Sign in to follow this  
solviper

custom Rvmat stretching shadows issue

Recommended Posts

I'm pretty new to rvmats and was messing with them for my retextured MATV's. It seems to work minus creating this one part of the vehicle stretching a shadow and you can see it through other units.

 

http://i.imgur.com/eNc9F1x.jpg

 

What do I need to fix this?

Share this post


Link to post
Share on other sites

What do I need to fix this?

Maybe start by posting the rvmat?

Share this post


Link to post
Share on other sites

My bad, here you go.

ambient[] = {1,1,1,1};
diffuse[] = {1,1,1,1};
forcedDiffuse[] = {0,0,0,1};
emmisive[] = {0,0,0,0};
specular[] = {0.1,0.1,0.1,1};
specularPower = 10;
PixelShaderID = "Super";
VertexShaderID = "Super";
class Stage1
{
	texture = "op4_vehicles\skins\matv\op4_matv_nohq.paa";
	uvSource = "tex";
	class uvTransform
	{
		aside[] = {1,0,0};
		up[] = {0,1,0};
		dir[] = {0,0,0};
		pos[] = {0,0,0};
	};
};
class Stage2
{
	texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
	uvSource = "tex";
	class uvTransform
	{
		aside[] = {10,0,0};
		up[] = {0,10,0};
		dir[] = {0,0,0};
		pos[] = {0,0,0};
	};
};
class Stage3
{
	texture = "#(argb,8,8,3)color(0,0,0,0,MC)";
	uvSource = "tex";
	class uvTransform
	{
		aside[] = {1,0,0};
		up[] = {0,1,0};
		dir[] = {0,0,0};
		pos[] = {0,0,0};
	};
};
class Stage4
{
	texture = "op4_vehicles\skins\matv\op4_matv_as.paa";
	uvSource = "tex";
	class uvTransform
	{
		aside[] = {1,0,0};
		up[] = {0,1,0};
		dir[] = {0,0,1};
		pos[] = {0,0,1};
	};
};
class Stage5
{
	texture = "op4_vehicles\skins\matv\op4_matv_smdi.paa";
	uvSource = "tex";
	class uvTransform
	{
		aside[] = {1,0,0};
		up[] = {0,1,0};
		dir[] = {0,0,1};
		pos[] = {0,0,1};
	};
};
class Stage6
{
	texture = "#(ai,64,64,1)fresnel(7.53,5.44)";
	uvSource = "none";
};
class Stage7
{
	texture = "A3\Data_f\env_land_ca.tga";
	useWorldEnvMap = "true";
	uvSource = "tex";
	class uvTransform
	{
		aside[] = {1.0,0.0,0.0};
		up[] = {0.0,1.0,0.0};
		dir[] = {0.0,0.0,0.0};
		pos[] = {0.0,0.0,0.0};
	};
};
//};

Share this post


Link to post
Share on other sites

Hey there,

 

This error happens to me too, when trying any type of rvmats, so you are not alone !

 

If someone knows a fix that that, that would be very good  ;)

 

 

Regards Arkensor

Share this post


Link to post
Share on other sites

Well, it's not a material wise issue. The problem comes from Shadow LOD. It looks to me like there is not closed geometry within the Shadow LOD, apparently the radio antenna hasn't been closed, the one next to the driver door.
Open Object Builder, go to Structure -> Topology -> Find Non-Closed. Then select the part causing troubles, go to Structure -> Triangulate and then Surfaces -> Sharp edge.
It may also be the case that the antenna's edges haven't been sharpened only. In that case, just select the antenna, go to Surfaces -> Sharp edge.

Make sure that the Shadow LOD model hasn't got neither textures nor rvmats applied to it.

Hope it helps.

Share this post


Link to post
Share on other sites

Well, it's not a material wise issue. The problem comes from Shadow LOD. It looks to me like there is not closed geometry within the Shadow LOD, apparently the radio antenna hasn't been closed, the one next to the driver door.

Open Object Builder, go to Structure -> Topology -> Find Non-Closed. Then select the part causing troubles, go to Structure -> Triangulate and then Surfaces -> Sharp edge.

It may also be the case that the antenna's edges haven't been sharpened only. In that case, just select the antenna, go to Surfaces -> Sharp edge.

Make sure that the Shadow LOD model hasn't got neither textures nor rvmats applied to it.

Hope it helps.

Isn't it a default model? It shouldn't have this issue at all unless caused by either the hiddenselections or hiddenselectionsmaterials...

Share this post


Link to post
Share on other sites

Yes, it shouldn't. Games should always be complete and bug-free products but often they aren't. I almost 100% sure the problem comes from Shadow LOD, have seen it in several occasions within my own addons. Materials and textures have very little to do with casting shadows, although I just checked default MAVT and it hasn't got shadowing problems at all (ver. 1.58.135742). Cannot explain it, it's wierd. 

Share this post


Link to post
Share on other sites

Yes, it shouldn't. Games should always be complete and bug-free products but often they aren't. I almost 100% sure the problem comes from Shadow LOD, have seen it in several occasions within my own addons. Materials and textures have very little to do with casting shadows.

 

Using the default build in RVMAT like the one for the VR people you have got the same issue. If you use any kind of any and material the shadows around antenna of a vehicle is gliched. As both the vehicle and the rvmat are build into the game, and there is no addon running - I would suggest that is an arma bug. It might be a model problem, but if it is so, then BI messed it up a bit.

 

 

Regards Arkensor

Share this post


Link to post
Share on other sites

True, but my point is if the Default/stock model works with the Default/Stock RVMAT without issue (not at home right now to be able to test the stock MRAP) and the bug is only visible when using a Custom RVMAT, then it is somehow an issue caused by the use of the rvmat and/or hiddenselectionsmaterials...

 

Given that hiddenselectionsmaterials somehow prevent wounds from properly working on infantry characters due to some sort of vague and unexplained engine limitation, I would not be entirely surprised if it turned out to be the latter.

Share this post


Link to post
Share on other sites

True, but my point is if the Default/stock model works with the Default/Stock RVMAT without issue (not at home right now to be able to test the stock MRAP) and the bug is only visible when using a Custom RVMAT, then it is somehow an issue caused by the use of the rvmat and/or hiddenselectionsmaterials...

 

This is true, my custom RVMAT is somehow causing this and I'm not sure if it's something I did or just a bug within the game as I've never messed with this stuff before. All I wanted to do is reduce the shinyness a bit on the vehicles.

Share this post


Link to post
Share on other sites

I  stand corrected. Apparently, there is more "magic" behind a model and its textures or materials connections, about which - by the way - all tutorials say nothing. No idea what may cause the issue on material side.

  • Like 1

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  

×