0

My scene is pretty simple. I have a (Ground) Plane and a sphere on top of it. I am setting an emissive material to the sphere. Now, I want reflection of the emitted light by the sphere on the plane.

Looks like that is not possible in a straight-forward way. (I totally wish THREE.js was like Maya or Blender). And from what I have looked around, point lights were suggested. But I am having a gradient emission map. So a point light will not satisfy my needs here.

Some other answers have suggested something on the lines of capturing the scene by a reflection surface and other have pointed me to cube camera rendering....I do not totally understand what they mean - am quite new to THREE.js and this low a level of graphics. Especially this answer to a beginner like me looks daunting (I am just starting to mess with shaders). Emissive ligth and reflection in Three.js

If anyone can explain the method or provide resources where I can learn about them, I would be grateful.

Rohan Asokan
  • 634
  • 4
  • 22
  • I don’t know of an easier way to add reflections than by copying the mirror example mentioned in the answer you provided: https://threejs.org/examples/?q=mirror#webgl_mirror – M - Jan 04 '21 at 19:06
  • I am having a custom shader on the ground plane. Would adding a mirror affect that? And I want a pretty glossy effect instead of perfect reflection. – Rohan Asokan Jan 05 '21 at 06:07
  • In that case, it sounds like you have very specific requirements so you’ll have to write a custom solution yourself. – M - Jan 05 '21 at 06:09
  • Any pointers on how to proceed though? – Rohan Asokan Jan 05 '21 at 06:11
  • Ok I did some sorcery and I got it to work somehow. – Rohan Asokan Jan 05 '21 at 06:13
  • I think I will post my method as an answer, so other people might find it useful - though chrome throws me a lot of errors (found that this is a bug with chrome itself) – Rohan Asokan Jan 05 '21 at 06:14

0 Answers0