Open VinAr22 opened 4 years ago
Yes it is! We just recently added support for this. Just set your scene.background
to a THREE.Color
, and your background should use that color. I've updated the docs with this new information.
Fantastic! Can i use texture as background in the same way?
Sorry for the late response. I hadn't seen your reply until now :(
A 2D texture overlaid on the background doesn't work at the moment, but if you give scene.background
a EnvironmentLight, the renderer will use that as the background (independent of lighting for the scene). Since Three.js officially supports textures as backgrounds, it's on my list to get it working for the ray tracing renderer too.
All is ok, dont worry about that. Thanks for the information!
@jaxry hi! Can you explain to me is it possible to rotate the environment around the 'y' axis?
Hi @VinAr22 . Rotating an environment light directly is not supported right now, similar to how you can't rotate cubemaps in Three.js either. But you can effectively rotate the light by rotating the entire scene instead.
e.g. scene.rotateY(0.5)
Would that work for you?
Thanks for the quick reply @jaxry! Im tried this solution. This does not correctly work if i pan my camera using orbit controls
I think I ran into this issue too. Are you adding the camera to the scene object? If so, does removing the camera from the scene work?
Yes, it does
@jaxry I also tried to add object3d to the scene and attach an orbit pivot to it, but that didn't work either
Hello! Is it possible to replace the HDR scene with a black background, but keep hdr`s reflectivity on the object?