sideeffects / HoudiniEngineForUnreal-v2

Houdini Engine Plugin for Unreal Engine 4 - Version 2
http://www.sidefx.com/unreal
Other
295 stars 76 forks source link

Shading artifact with instance static meshes? #65

Open peternicolai opened 3 years ago

peternicolai commented 3 years ago

I've been trying to track down the visual artifacts seen on the instance static meshes via an HDA. This is using the latest beta and UE4.25.4. Essentially, the mesh from the content browser looks fin, but once applied to the instanced mesh HDA, it picks up these strange artifacts. It appears partially camera based, possibly also derived from broken normals(?).

As one of my tests, I tried pulling the same HDA and same mesh into a clean project and run it with the latest "regular" plugin. The artifact appears to be gone.

I tried the same experiment with the latest beta and another new project. The artifact reappears.

Do you have a suggestion of what else I could test to help either confirm or exclude the v2 plugin from being part of this issue? Has anyone else experienced this?

Any info appreciated.

HDA_Artifact.zip

peternicolai commented 3 years ago

So I have been able to also tie it to raytracing within UE4. If Raytracing disabled, meshes look fine. If RT is enabled, instance meshes look different and display the artifacts shown. On a chrome material, setting the PPV to 3 bounces "fills in" the black gaps. But the issue is still visible on a less metallic/reflective material even with these settings on the instance static meshes.

peternicolai commented 3 years ago

Further testing. If I embed the mesh in question in a BP and instance that (using the HoudiniInstancedActorComponent rather than the HoudiniInstancedStaticMeshComponent) the visual artifact is gone and the mesh looks correct. Again, not sure if this is an error or simply a workflow issue on my end. Any info appreciated.

dpernuit commented 3 years ago

This almost looks like a normal/tangent issue...

When you get the artifacts, are you using attribute instancers (unreal_instance) or packed prims?

this is likely why using BP works, as this would reuse the original mesh, not a "copy" of it that's been improted/exported by Houdini.

peternicolai commented 3 years ago

Sorry for the very late reply here! I see the artifact when using unreal_instance to point directly the geo in my content browser, as well as when using pack prims ( a box comes in via HDA and I swap it out in details panel with the geo from content browser). The only solution that has (so far) resulted in the right output was to use unreal_instance but point to a simple BP containing the geo. If there is a test or something I can do to help eliminate the plug-in as a contributor, let me know. I'll keep toying with it on my end.