October 17, 2018, 05:18:31 AM

Author Topic: "caves 3d" (explore caves, avoid harmful things, find the exit)  (Read 2686 times)

Offline RemiD

  • Hero Member
  • *****
  • Posts: 628
Re: "caves 3d" (explore caves, avoid harmful things, find the exit)
« Reply #45 on: March 09, 2018, 11:29:54 PM »
some updates :
->i have added the angle attenuation, so now there is a distance attenuation and an angle attenuation of the color of the light (depending on how far, and how oriented towards, the vertex is)
->i have added the intense lighting of near vertices, and the weak lighting of far vertices
->i have added a glow effect using circular flares
->i have decided to have only one color per area, in order to make the environments more different and to know where you are and where you have been in the map


I am happy with the result, the ambiance is "dark" (like in "the descent" movies) but with enough light to see the environment and obstacles.
I could make it even more dark, but then i would have to add a torchlight, and i don't want to work on that at the moment...

However i don't know if i will keep the flares, because i have to use up to 30 linepicks per frame to determine if a flare is visible or hidden behind a wall or an obstacle in order to set its zorder appropriately (or maybe i could update only 1 per frame ? or maybe precalculate the visibility of each lightsource from the center of each cell ?)

Or maybe use a volumetric glow effect of a 3d sphere ?

Not sure, i will do some tests...

Offline RemiD

  • Hero Member
  • *****
  • Posts: 628
Re: "caves 3d" (explore caves, avoid harmful things, find the exit)
« Reply #46 on: March 10, 2018, 09:48:43 PM »
Quote
or maybe i could update only 1 per frame ?
yes it is fast enough to linepick a few times per frame, and to update only a few flares per frame, so i keep the circular flare for the glow effect...

Next : hidden surfaces culling system (to only render the area where player is and the areas connected to this area... (hence the usefulness to split the map in areas and passages...)

Offline RemiD

  • Hero Member
  • *****
  • Posts: 628
Re: "caves 3d" (explore caves, avoid harmful things, find the exit)
« Reply #47 on: March 11, 2018, 11:15:23 AM »
I am currently doing some experiments with vertices lighting shading in a cone shape (to have a kind of torchlight effect) and i clearly see the limits of vertices lighting shading... The result is ugly...

An alternative would be to use texels lighting shading, with a big enough texel size, so that it is fast enough to update... I have never seen this done in any game... (because it is too slow to determine which texels are in range (in a sphere shape or in a cone shape) in real time)

In this case this shows the superiority of per pixel lighting shading... (using a custom shader, something i will have to learn)

Offline Rick Nasher

  • Hero Member
  • *****
  • Posts: 550
Re: "caves 3d" (explore caves, avoid harmful things, find the exit)
« Reply #48 on: March 11, 2018, 02:15:41 PM »
Pixel lighting.. You mean like:


_______________________________________
 B3D + physics + shaders + X-platform = AGK!
   :D  ..ALIENBREED *WILL* LIVE AGAIN.. :D
_______________________________________

Offline RemiD

  • Hero Member
  • *****
  • Posts: 628
Re: "caves 3d" (explore caves, avoid harmful things, find the exit)
« Reply #49 on: March 11, 2018, 04:14:20 PM »
I don't know, you tell me...
Depending on how the scene is made, it could be per vertex lighting shading (with subdivided surfaces), or per texel lighting shading (with "lightmap" textures), or per pixel lighting shading (with a custom shader)

Usually omni lights look good even with per vertex lighting shading, but cone lights ("spot lights") do not.

I had an example of a cone light using per pixel lighting shading in Xors3d and the result was really nice...

Offline Rick Nasher

  • Hero Member
  • *****
  • Posts: 550
Re: "caves 3d" (explore caves, avoid harmful things, find the exit)
« Reply #50 on: March 11, 2018, 04:47:48 PM »
I found the vertex lighting in AGK more suitable for explosions and such for it's fast, but pixel lighting has better quality.
_______________________________________
 B3D + physics + shaders + X-platform = AGK!
   :D  ..ALIENBREED *WILL* LIVE AGAIN.. :D
_______________________________________

Offline RemiD

  • Hero Member
  • *****
  • Posts: 628
Re: "caves 3d" (explore caves, avoid harmful things, find the exit)
« Reply #51 on: March 11, 2018, 06:54:19 PM »
Quote
but pixel lighting has better quality.
of course...

In your scene, do the per pixel lights go through walls / floors / ceilings ? or is there a way to illuminate only some surfaces and not others ?

Offline Rick Nasher

  • Hero Member
  • *****
  • Posts: 550
Re: "caves 3d" (explore caves, avoid harmful things, find the exit)
« Reply #52 on: March 11, 2018, 11:23:42 PM »
I've found it depends on the thickness of walls and brightness of the color. AGK offers the option to oversaturate when going above the usual 256 for RGB which also appears to increase it's effective range.
e.g. a value of 1256 gives some really bright effects with a longer range which can bleed through if not handled carefully.
_______________________________________
 B3D + physics + shaders + X-platform = AGK!
   :D  ..ALIENBREED *WILL* LIVE AGAIN.. :D
_______________________________________

Offline RemiD

  • Hero Member
  • *****
  • Posts: 628
Re: "caves 3d" (explore caves, avoid harmful things, find the exit)
« Reply #53 on: March 12, 2018, 08:07:18 AM »
Quote
I've found it depends on the thickness of walls and brightness of the color.
my question was more : can you set a light to light only one / several specific surfaces and not others in a scene... if yes, that's a useful feature, if not, it will be slower to render, and the light will go through walls...

Offline RemiD

  • Hero Member
  • *****
  • Posts: 628
Re: "caves 3d" (explore caves, avoid harmful things, find the exit)
« Reply #54 on: March 14, 2018, 10:28:53 PM »
I have decided to stop to work on this game, because i don't think that the gameplay will be fun and i have no inspiration to go further with that...

On the positive side : i have improved my understanding and skills to create procedural meshes. And i have improved my procedures about lighting shading.


I am going to take a few days without coding, and then i will try to make a game similar to catacombs-3d on DOS (gameplay and graphics style), like what i initially wanted to do.