"caves 3d" (explore caves, avoid harmful things, find the exit)

Started by RemiD, February 18, 2018, 00:13:08

Previous topic - Next topic

RemiD

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...

RemiD

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...)

RemiD

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)

Rick Nasher

_______________________________________
B3D + physics + shaders + X-platform = AGK!
:D ..ALIENBREED *LIVES* (thanks to Qube).. :D
_______________________________________

RemiD

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...

Rick Nasher

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 *LIVES* (thanks to Qube).. :D
_______________________________________

RemiD

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 ?

Rick Nasher

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 *LIVES* (thanks to Qube).. :D
_______________________________________

RemiD

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...

RemiD

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.