DirectionalLight cast incorrectly when setParallelProjection is enabled

Hi oxplay2,

I’m sorry you created the test case yourself. My intention was not for you to do it. I was going to create a test case myself tomorrow since it is quite late for me right now to do it. I posted my code in the hopes of seeing if I missed something stupid or silly that some experts can identify quickly. Thank you so much for taking the time on investigating the issue.

I’m not familiar with this specular property, but I will definitely research it and give a try tomorrow to your suggestion.

As for the expectation, my assumption was that since I am using a Directional Light, all models (at least the ones with the same mesh) should look the same. I guess it is not a deal breaker right now, but if it gives a big change in image quality in the future when more models are loaded then I was thinking I would get rid of the directional light and just use ambient light or something else.

Again, thanks!

1 Like

no problem, thanks for understanding in first part.

You are correct, all models “are lit”. But specular is something different.

Look at this image:

The “Quad” below model is just a quad, same everywhere. But specular is drawn in exactly one place, since it depend on camera direction and position on screen.

If you want maintain Specular for all your Ninja models, you would need create offscreen renderer for each of them in new viewport, where specular would be drawn same way for each of them.

I am still not sure how it should work in parallel projection, since it “flat” view, but i guess it might work fine there, but not as user expect. You can use my above idea to get same specular for each character.

1 Like

Hi oxplay2, I did what you suggested and set the Specular to black and the shinning is gone and they look the same. Thanks for that. I would still like to know if anyone else knows if this is the expected behavior for parallel projections

Thanks again!