Can't see other characters through transparent mesh from client-side view

Hello,

While running a multiplayer session, the client side can’t see other characters through meshes with transparent material. This can be seen below:

As seen above, both characters are surrounded by a barrier mesh (which is a solid transparent mesh). This didn’t give any problem, since I’m able to see through it correctly.

The character can also hold a shield mesh (which is a solid transparent mesh). The problem is that characters can’t be seen through it, as shown.

In my opinion, this looks like a network relevancy issue. Since the character is behind the shield, it shouldn’t be relevant and then it’s not displayed. The problem is that the shield was supposed to be transparent!

This could also be a rendering problem, possibly fixed through messing with the transparent materials settings.

(It’s important to notice that this doesn’t happen on the server side!)

Anyone got any thoughts?

Thanks in advance.

Is the transparent object is using the players relevancy?
(Owned by the player with use owner relevancy set to true)

If not, the relevancy check may simply be failing because it is blocking the trace from viewpoint to player.

Thanks for the reply!

Yes, the transparent object (the attached shield) is set to use owner’s relevancy.

This is it’s replication settings:

properties.png

Is it also owned by the character/controller?

Is the visibility trace from your own camera to the other character is failing because its not ignoring and therefore tracing your own shield?

Yes, It should be owned by the character. At the character class, this is how I’m handling the spawn, attach and owner:

SpawnShield (called in PostInitializeComponents only by the server)


void ASF_CharacterBase::SpawnShield()
{
	if (Role < ROLE_Authority)
	{
		return;
	}
	if (ShieldClass)
	{
		FActorSpawnParameters SpawnInfo;
		SpawnInfo.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
		ShieldReference = GetWorld()->SpawnActor<ASF_ShieldBase>(ShieldClass, SpawnInfo);
		if (ShieldReference->IsValidLowLevel())
		{
			ShieldReference->AttachToComponent(GetMesh1P(), FAttachmentTransformRules::SnapToTargetIncludingScale, ShieldReference->ShieldSocket);
			UpdateShieldOwner(ShieldReference);
		}
	}
}

UpdateShieldOwner:


void ASF_CharacterBase::UpdateShieldOwner(ASF_ShieldBase* Shield)
{
	if (Shield && Role >= ROLE_Authority)
	{
		Shield->SetOwner(this);
		Shield->Instigator = this;

		if (!ShieldReference)
		{
			ShieldReference = Shield;
		}
	}
}

I’m not sure how to check this. You mean that the visibility trace is not being ignored at the shield and therefore blocking everything behind it?

AFAIK, UE4 doesn’t do occlusion culling for networked objects so this looks more like a rendering issue than a network one.

But then if it’s not happening Server-Side it’s a bit wierd… What happens if you check the objects to force them to always be relevant?

Yes, curiously enough this doesn’t happen server-side. This is what happens server-side:

Results at the client-side:

Setting bAlwaysRelevant as true in the character still hides the other character.

Setting both the character and shield as bAlwaysRelevant shows the same behavior.

Setting only the shield as bAlwaysRelevant also shows the same behavior.

I also disabled the outer barrier object (as seen in the first post) so it won’t interfere with the testings.

[UPDATE]

I just found out an interesting behavior. If I look at the bottom and top of the player, it does not hide the character:

This is still an unsolved issue and I’m not sure how to proceed.

Any thoughts?

All I can suggest is to throw a bunch of stubbs in your character’s IsNetRelevantFor() and see WTF is going on :slight_smile: