3

I have a screen full of tiled/stacked triangular pieces of 2D "paper" using three.js. The objects are added at random positions/intervals and are positioned very close to each other on the z-axis so they don't stack too high.

I have the lighting exactly how I want it for the bump-map and shape shadows... but the shapes themselves have no cast shadow. This is because the objects are too close together to get the desired effect, and I don't want to mess up the current light source. Cast shadows would also be only in one direction (opposite the light source)... whereas I am attempting to get a shadow (actually an outer-glow) around the entire piece of paper.

I am therefore trying to create an outer-glow or at least find a reasonable solution to fake soft drop shadows around the entire shape. I have attached an image illustrating what I'm trying to accomplish... in essence it's like a CSS box-shadow effect.

box-shadow:  0px 0px 18px rgba(50, 50, 50, 0.75);

Outer Glow

Any guidance would be greatly appreciated, thanks!

tl;dr: Trying to create a outer-glow around 2D shapes in three.js

Community
  • 1
  • 1
RANGER
  • 1,643
  • 2
  • 17
  • 31

0 Answers0