Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lights and Shadows #19

Closed
Nesh108 opened this issue Mar 17, 2017 · 4 comments
Closed

Lights and Shadows #19

Nesh108 opened this issue Mar 17, 2017 · 4 comments

Comments

@Nesh108
Copy link
Contributor

Nesh108 commented Mar 17, 2017

Hello!

Is there a way to change the intensity of the lights in the world? I found params for the colors but nothing concerning their intensity.

Also, I found the component/shadow.js which a disc for the player's shadow, how about having some global shadows for all the blocks as well?

I tried adding some of my own lights but I didn't notice any appreciable difference (I was checking the brightness of each block).

@fenomas
Copy link
Owner

fenomas commented Mar 17, 2017

Hi,

There is basically nothing in the engine yet about lighting or shadows. The shadow component just adds and manages a disc below entities, it doesn't have any real interaction with the scene or lights. And the scene gets initialized with a standard Babylon hemispheric light, which the client could remove, or add more, etc.

Basically, I don't know much about it and haven't done any serious thinking about it. Certainly happy to hear from anyone who does :)

@Nesh108
Copy link
Contributor Author

Nesh108 commented Mar 17, 2017

So, to access the light component and change/remove it, do I just go straight to noa.rendering._light or is there a proper getter for it?

Anyway, I will look into it and try some stuff with shadows. From my experience with Three.js, shadows seemed to slow down drastically the whole scene quite a lot.

@fenomas
Copy link
Owner

fenomas commented Mar 17, 2017

You could get it that way, or just through Babylon APIs - I think there's a scene.lights or scene._lights array, or some other accessor.

For performance, yes, I assume that just turning on shadows for everything would be very hard on performance, but I don't know any details, or if there are smart ways to do it.

@Nesh108
Copy link
Contributor Author

Nesh108 commented Mar 17, 2017

Thanks, I will look into shadows later on. Being able to access the lights is already great :)

@fenomas fenomas closed this as completed Mar 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants