aws / lumberyard

Amazon Lumberyard is a free AAA game engine deeply integrated with AWS and Twitch – with full source.
Other
2.02k stars 539 forks source link

Some object is rendered improperly (flickering) from terrain to the sky #550

Open Alexlau1994 opened 3 years ago

Alexlau1994 commented 3 years ago

Describe the bug When I try to put some object (maybe more than 10 of the same object, like trees or rocks, with vegetation brush or just with entity) to the scene, some of object is rendered improperly (flickering) from terrain to the sky.

This problem happens for some of 3d models, example: Tree06.zip

Steps to reproduce put the objects to the scene with brush or entity.

Expected behavior Please provide a concise description of what you expected to happen.

Screenshots/Logs

error

Lumberyard version v1.27.0.0

AMZN-alexpete commented 3 years ago

Hi @Alexlau1994 , I think there is something wrong with this model and geometry instancing. If you set r_geominstancing 0 the problem seems to go away, alternately, you can set r_geominstancingthreshold to a higher value like 100, but really what you want to do is use instanced geometry to maximize rendering efficiency.

I'm seeing this warning in the material editor that I think is related. You may need to update your mesh to not have 2 uv sets [Warning] (Material Editor) - Material 'objects/tree06/tree6' sub-material 2 with 1 uv set(s) was assigned to mesh 'objects/tree06/tree6.cgf' with 2 uv set(s). If you do not intend to use 2 uv sets, remove the extra uv set(s) from the source mesh during the import process. Otherwise, consider checking the desired 'Use uv set 2 for...' shader gen params in the material editor.