Archive 17/01/2023.

Problem with lights

Liichi

Hi, i exported some trees from blender to my scene, but i have some problems with lights.
I don’t know if i did something worng during exporting or it’s an Urho3D bug.
Video: https://vid.me/asiI
Anyone know how fix it?
Thanks.

Eugene

I had similar problem when my Zone component was too small.

Liichi

I changed the zone bounds to 1000 but it still happens :confused:

hdunderscore

Does the bounding box look correct? Does changing light range change the distance of the popping effect? Are the normals exported?

Looks like there is some z-fighting when you rotated the camera, that seems strange too.

Liichi

Does the bounding box look correct? Yes
Does changing light range change the distance of the popping effect? Yes
Are the normals exported? Yes i think, i follow the same steps to export all models of scene.
I noticed that if I use Diff.xml instead of VegetationDiff.xml the light works correctly.
It seems a VegetationDiff.xml bug. :confused:

Liichi

I found the problem, I was using a material only with the technique VegetationDiff.xml, when i add a new technique Diff.xml to the material the problem disappeared. :slight_smile:
It’s an issue or an noob error?

1vanK

Pls show your material (xml file)

szamq

What are your setup of near and far in camera? It looks like you set some large amount like 1000000 to far parameter.

Edit: Ah ok you already solved the issue:)

Liichi

http://pastebin.com/t8KmqBgV

Working material:
http://pastebin.com/JahVsMYm

1vanK

material should contain only one technique with same lod

EDIT: https://urho3d.github.io/documentation/HEAD/_materials.html

Liichi

Apparently, the second material only worked because Diff.xml was overwriting VegetationDiff.xml
Is there something wrong with the first material? (which only contains VegetationDiff.xml)

1vanK

Vegetation should animate vertices of model, but I do not see it on video. So need more info about exporting settings

Liichi

I realized that VegetationUnlit.xml works :confused:
I tried to export using .blend, .dae, .fbx formats but none worked.
I also tried using the urho plugin but i get the same problem.

hdunderscore

Well I think I have spotted a typo or error in vegetation shader. Simple test, turn off dynamic instancing-- does the issue still occur?

Liichi

No, everything works well (:

hdunderscore

Offending line is:

if anyone wants to confirm. Replacing cModel with modelMatrix seems to work.

Liichi

Works for me, ty :smiley:
I think you should commit.