Spaceship reactors: how to create visible light?

lights
#1

Hello,

I am working on a game and I load a model that I made on Blender.

I would like to add some lights to simulate reactors for the spaceship. The problem is that lights in three.js are not visible, it just reflects on meshs and make them visible.
Do any of you have a idea of how to do that ? I was thinking of adding spheres inside the reactors and make them glowing but I’m not sure how to do that, and I would prefer just light if possible…

Thank you

#2

I’m not so pro with threejs stuff but i think simplest way is to create the sphere you were thinking with basic material and add point light to the sphere, we do this to represent a source of light. hope this works for you.

#3

You could try to use sprites with transparency, for example:
image
Place them a little behind the engines. Should be simple, quick and work well if the camera is behind the ship. I’ve seen that one awesome retro racing game that used this, although i cant remember the name/link.

#4

Like @DolphinIQ said. Sprites are your best bet. Here’s an example of this technique in my game:

This works well for point lights, for other light types you might want to use other techniques, such as god rays, bloom filters, glow shaders etc.

4 Likes
#5

The sprites are really smart, I think I will go for this solution ! And I guess it should be easily done since the camera and the ship move together in my game.

Thank you for the help.

P.S: Your game looks amazing, congrats :wink:

2 Likes
#6

THREE.PointsMaterial() with a texture for .map works too :slight_smile:
https://codepen.io/prisoner849/pen/yWawmR?editors=0010

4 Likes
#7

I just wanted to update this post in case someone find it while looking for an answer.

Here is the result with the sprite solution:

I found the sprite texture here: https://ui-ex.com/explore/transparent-circle-light/

I was really satisfied with this result so I didn’t try other solutions.
Thanks again :slight_smile:

3 Likes