How do I make lighting/lamps in 3D?

0 favourites
  • 9 posts
From the Asset Store
Immerse your quiz games with our 6 unique music loops, ranging from acoustic chill guitar to cute and upbeat style.
  • I'd like my 3D environments (rooms/hallways etc) to have somewhat realistic lighting. But I don't know how to create them. I've seen people make 'flashlight' type of lighting even, and that was in C2 so it should definitely be possibly and easier in C3 I think? I could only find the standard lighting object (shadow caster).

    Thanks!

    Tagged:

  • The 3D Castle Maze has code for distance-based lighting/dimming of the level in its Setup section.

    Open 3D Castle Maze in Construct editor:

    editor.construct.net

    I adapted that for my 3D FPS, adjusting the numbers for my game's scale. In my game it affects the walls, but not the ground or ceiling (the 3D Castle Maze has no ceiling or floor, interestingly enough), nor the enemies or misc items, though I think it makes them stand out better from a distance against the dark environment. You could certainly add similar code to whatever items you wanted affected by distance (don't ask me about the floor or ceiling though).

    construct.net/en/free-online-games/vault-peril-32857/play

  • Thanks for your reply!

    Looking at the example it affects only the walls as you mentioned. What I had in my mind was more of a 'realistic' approach rather than lighting up an exact square wall piece. If you know what I mean.. say the ceiling holds a small rectangle as a light source. It would then cast light diagonally from the ceiling to the walls and floor.

    I'm sure it should be possible right?

  • I wouldn't be so sure, C3 is a 2D engine in the end.

  • I wouldn't be so sure, C3 is a 2D engine in the end.

    Yeah, it needs to be approached as more of a trompe l'oeil effect than actual ray cast or ray traced lighting effect.

  • Hi,

    Well I dug up some 'examples' I came across.

    Here's a video of a game that's made in C2 (2016);

    youtu.be/k8O91sTZZLI

    Or do you think the Flaslight effect is just a sprite on a parallax layer?

    Here's an interesting one;

    construct.net/en/free-online-games/fps-3d-campo-prueba-31805/play

    All kinds of lighting there. So surely it can be done right?

    Though I can't find the used plugins (are they called addons now?) anywhere.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The first one says he made his own engine and the second one uses a plugin called Quazi3D (not on the Asset Store). Nothing in stock C3D does it. I don't program so using any of the JavaScript programming features (which is probably where you'd have to go) is beyond me.

  • Yeah unfortunately I don't know anything about javascript either. Guess I need to go for the more 'simplistic' approach.

    Thanks anyways.

    And well.. if anyone reading this has anything close to a bit more 'realistic' 3D lighting please tell us!

  • That sprite overlayed over the screen to simulate a flashlight is probably the simplest way.

    With the C3 engine we are pretty limited with what we can do with 3d lighting.

    Hard shadows can be possible as shown by this test. But it may not scale well with more objects.

    construct.net/en/forum/construct-3/general-discussion-7/possible-add-3d-light-172761

    Even with JavaScript there isn’t much you can do to make 3d lighting with c3’s renderer. What was done with most of the 3d stuff in C2 is another engine and renderer separate from construct was stacked on top or underneath your game. That’s what q3d did. Another option was to use constructs renderer in a way it wasn’t intended to be more integrated with the game. Rojo3d did that in c2. In c3 that is much harder, and even if a way is found to do it c3 is constantly getting updates which would require constant updates to keep the solution working.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)