jnsmalm / pixi3d

The 3D renderer for PixiJS. Seamless integration with 2D applications.
https://pixi3d.org
MIT License
759 stars 44 forks source link

shadow casting #4

Closed weekendkoder closed 4 years ago

weekendkoder commented 4 years ago

First of all: really great addOn !!! I am amazed how well it works. I tried the demo. i recognized, the drone-object doesnt cast shadows on it self and on the floor. Is it possible to implement shadows ?

jnsmalm commented 4 years ago

Thanks! Yes, shadows is something I have looked into. But right now what I have is not really good enough, needs a bit more work.

weekendkoder commented 4 years ago

Glad you got something, you work on it. Do you think maybe this year, to got shadows-feature inside pixi3D ?

jnsmalm commented 4 years ago

I hope so, but can't promise anything.

jnsmalm commented 4 years ago

I added support for shadows in the latest version! Have a look at https://github.com/jnsmalm/pixi3d#casting-shadows how to use them or go to https://pixi3d.org/demo/drone/ to see a demo.

weekendkoder commented 4 years ago

Wow ! Looks so beautiful ! Grat job !!! Thanks for adding this. Now the 3D content looks far more realistic. In the description i can read : app.renderer, dirLight, 512, 15, 1, PIXI3D.ShadowQuality.medium) Is "512" the shadow-map-size ? Or is "ShadowQuality.medium" the shadow-map-size ? Or both ?

jnsmalm commented 4 years ago

Thanks! You can check the documentation for the shadow casting light API at https://pixi3d.org/docs/classes/shadowcastinglight.html

weekendkoder commented 4 years ago

Ah okay. Thats the info i was searching for. By your provided link you got all the relevant commands. Perfect.