Hi,
I have very strange rendering of material (blend mode opaque and Masked) placed on instanced static mesh.
Please look at video → link text
When I generated instances in instanced static mesh it looks like Antialiasing is activated after I move the camera.
If I set blend mode to Additive or Translucent it works fine.
Where is the problem ?
Thanks
Looks like you don’t know what I mean. I don’t mean blur effect itself. I am talking about not fully rendered grid until I will start move with camera.
Hi thanks for answer. Here is my material nodes (very simple) and settings.
Basically what I am doing is :
FActorSpawnParameters xSpawnInfo;
xSpawnInfo.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::Undefined;
xSpawnInfo.Owner = pxFloor;
xSpawnInfo.Name = "FullGrid";
xSpawnInfo.Instigator = nullptr;
xSpawnInfo.bDeferConstruction = false;
// Position
FVector xLocation;
xLocation.X = ASC_Grid::s_fASSUMED_CELL_SIZE * 0.5f;
xLocation.Y = ASC_Grid::s_fASSUMED_CELL_SIZE * 0.5f;
xLocation.Z = 0.1f;
if (m_pxFullGrid == nullptr)
{
m_pxFullGrid = pxWorld->SpawnActor<ASC_Grid>(ASC_Grid::StaticClass(), xLocation, FRotator::ZeroRotator, xSpawnInfo);
}
if (m_pxFullGrid && m_pxFullGrid->InstancedStaticMeshComponent)
{
FTransform xCellTransform = m_pxFullGrid->GetTransform();
const int32 iXNumCells = FMath::CeilToInt(pxFloor->GetComponentsBoundingBox().GetSize().X * 0.01f);
const int32 iYNumCells = FMath::CeilToInt(pxFloor->GetComponentsBoundingBox().GetSize().Y * 0.01f);
for (int32 i = 0; i < iYNumCells; ++i)
{
for (int32 j = 0; j < iXNumCells; ++j)
{
xCellTransform.SetLocation(FVector(ASC_Grid::s_fASSUMED_CELL_SIZE * j, ASC_Grid::s_fASSUMED_CELL_SIZE * i, 0.0f));
m_pxFullGrid->InstancedStaticMeshComponent->AddInstance(xCellTransform);
}
}
FString szPathName = "/Game/StarCrooks/Materials/Grid/GridCell";
UMaterial* pxCellMaterial = Cast<UMaterial>(StaticLoadObject(UMaterial::StaticClass(), NULL, *szPathName));
if (pxCellMaterial)
{
pxCellMaterial->bUsedWithInstancedStaticMeshes = true;
m_pxFullGrid->InstancedStaticMeshComponent->SetMaterial(0, pxCellMaterial);
}
return true;
}
Thanks. I will try to swap the materials but I am a little bit scared that I will see some strange flesh during swap material in real time.