Is it possible to rotate a rect area light to achieve a slanted strip light effect?

Hey everyone! The title pretty much says it all. Trying to rotate a rect area light by 45 degrees to achieve a slanted strip light effect. Seems like quite a simple one but setting rotation doesn’t have any effect. Does anyone have any pointers?

Figured it out. Just need to set rotation directly as you would with any other parameter.

one thing to keep in mind is that rect area lights are super expensive, i think the most expensive light of them all. did you know that you can get the same effect for free by using environments. Live envmaps and getting realistic studio lighting almost for free

some demos:

in vanilla it’s something like this:

const g = new PMREMGenerator()
g.fromScene(...)

the scene now just has simple planes in them, if you increase colors so that they fall out of 0-1 range they start to act as lights. for instance a color.setRGB(100, 0, 0) would be an intense red.

Hey Paul, thanks for the response! I am aware of the fact they are quite expensive, though I read just using one or two isn’t so bad, though I would much rather utliize the drei Environment component I am using already, I have just been having trouble finding a good env map / making one in blender that works well with the scene I’m building, so fell back to rect area. Just wanted to make sure, the live env maps feature is part of r3f version 8.x correct? does version 8 have a peer dependency of react 18? I am using 17 and cannot migrate yet… also, amazing how light those demos are. can’t wait to til we upgrade to react 18 so I can implement this.

im not sure, try

<Environment>
  <mesh position={[10, 10, 10]} scale={[15, 4, 1]} onUpdate={self => self.lookAt(0, 0, 0)}>
    <planeGeometry />
    <meshBasicMaterial color={[100, 0, 0]} toneMapped={false} />
  </mesh>
</Environment>

and see if you have a red stripe on your model, if yes it works. you only need live maps if you want to animate the environment, but again, on some browsers that can be expensive, too. the static one above is for free, you can add add many “lights” as you want.

1 Like

oh that’s so cool, I’ll give it a try and get back to you. Thanks again!

it works really well. better than rect area even! and setting the rotation in the onUpdate works like a charm. thank you so much.