3d maze project...

Started by RemiD, October 08, 2019, 21:47:45

Previous topic - Next topic

3DzForMe

Quoteyes you can see the texels of the lightmap (size 0.1u) and yes there is a staircase effect, but to keep it simple, i will keep it like that (also i like this old school graphics style)
8)

however, if the lighting shading would be calculated considering a kind of normal map representing the reliefs on the floor, wall, ceiling, this would greatly improve the look, i admit it...

(it is way easier to use lighting shading on vertices + stencil shadows!!!)

Oh my RemiD - awesome work - looks like you may have an entry for the next compo just in time! Beautiful work heralding B3D, hell yeah! ;D ;D ;D
BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

Naughty Alien

..looks very nice..maze concepts somehow never gets old for me..now you 'infected' me with it and i may just start doing one of my own.. :)

RemiD

#17
what happened is that i have played a game that i like in september/october (thief the dark project), and since i have learned to make video games, you know how it is, you look at the game you play with developper eyes, and so i noticed a few things that i could mod/improve, but then i opened a map modeler (3d world studio) and i realized how much time/energy it takes to make maps by hand. (especially concerning the scaling of shapes, and the spliting in different parts, and the combination of the exported meshes with your engine for collisiondetection/pathfinding/culling)

then i gave up for a while, and noticed a few posts here about mazes, and this inspired me to use this kind of environment because it is easy to build with procedures (with premade parts)


8)
i am amazed how a simple (low tris) scene can look good (imo) with fake lighting shading on diffuse textures and lightmapping (not as nice as normal mapping + per pixel lighting, i admit it...)

well these experiments of lighting shading on texels taught me something : now i understand why some games are so heavy (in octets/bytes) to download, the lightmaps can take so much space if the texel size is small (especially if used with normal maps!)

so albedo textures + normal maps + real time per pixel lighting shading is clearly the easiest way to add nice lighting shading (and shadows) to a scene (but i can't do that with blitz3d!)

for now, all seems good to continue with the approach i have taken, so i am going to continue like that...

but i am curious to try to light/shade the same scene with vertices colors + stencil shadows... maybe later

RemiD

#18
first time you most likely see this effect in your life :
a per texel spotlight ! (the lighting/shading is on texels, it is like real time lightmapping, but for a spotlight)

too slow to be used in real time on my computer (around 60-70ms to calculate/color), but hey the programmer within you will appreciate the effort 8)

3DzForMe

So Sweet ;) :D Great work as always RemiD
BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

Qube

Quote from: RemiD on October 19, 2019, 23:31:16
first time you most likely see this effect in your life :
a per texel spotlight ! (the lighting/shading is on texels, it is like real time lightmapping, but for a spotlight)
...
too slow to be used in real time on my computer (around 60-70ms to calculate/color), but hey the programmer within you will appreciate the effort 8)
That looks pretty funky, I like it :) - Is there no optimisations you can do to make it real time? :(
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

RemiD

QuoteIs there no optimisations you can do to make it real time?
i have already optimised a lot to prevent unecessary calculations, but even with a texel size of 0.1unit, in a simple scene like that (corridors), there are around 27000texels to light/shade each loop !!!

for the same simple scene (corridors), with subdivided meshes for a nice progressive lighting/shading on vertices, there would be only around 1180vertices to light/shade each loop, much faster!
and with stencil shadows this would look fabulous !

however i just had an idea on how to create a fake spotlight effect using 2 renders :
one of the scene fullbright with a "circle mask"
one of the scene pre lighted/shaded on texels
then display the circle (with fullbright render) on top of the normal render
this should work, and should be fast !

iWasAdam


RemiD

#23
i was a little frustrated with the time it takes to do real time lighting/shading on texels, so i did some experiments with lighting/shading on vertices (again), for a torch light effect, but this time i experimented with a screen mesh (rectangle mesh of the size of the viewport) and a screen texture on which i added a shading of circles from dark to light, and with proper blending, i managed to have this result :

(this is supposed to be a torchlight effect)
quite nice for a combination of vertices lighting (dx7 light) + fake lighting (textureblend 2 entityblend 2)

so now, i can either continue with lighting/shading on texels, but i will have to optimize a lot and restrict the structure of the environment, or i can adapt what i have done to work with lighting/shading on vertices, and the environments will be easier to create and faster to light/shade. not sure yet...

what is sure is that the game will be around an ancient egypt theme...

Naughty Alien

..this is very very nice so far..just dont  overcomplicate it..it started nice and simple (im assuming its procedural)..

RemiD

#25
Quote
just dont  overcomplicate it..it started nice and simple
yes good advice to always keep in mind, it is better to finish a simple game with essential graphics / gameplay elements and then make improvements/mods/addons, than to never finish anything because of always wanting to add better graphics / others graphics effects / others gameplay elements / optimizations...


so what i have decided, is to rewrite my todo list from scratch and focus on the essentials : a game in a 3d maze, and replace the lighting/shading on texels by lighting/shading on vertices (simpler, faster)
the gameplay will be simple :
explore the maze to collect treasures
avoid/fight enemies (mumies)
play with lights/shadows and with silence/sounds to remain stealthy or make a diversion
with the possibility to destroy lightsources or to create new ones, and to emitt sounds by throwing things around
and for the way to fight enemies, i am still thinking about it, not sure yet
the graphics will be low tris shapes and diffuse textures, simple graphics style with 1 color per material and 2-3 others colors for fake lighting/shading to add (fake) reliefs, and also nice lighting/shading (vertices colors) on subdivited shapes.


i can do all of this by myself, np, i just have to make some little progress each day !


( then, this gave me an idea for another game, if you want a clue, and you like ancient egypt stuff   youtube.com/watch?v=gnaxCjPdIW8   youtube.com/watch?v=rHDt0bWYxns )

RemiD

#26
these past days, i am (trying to) model/UVmap/color shapes aroound the ancient egypt theme, and for simple shapes like tiles, bricks, slabs, columns, boxes, vases, chests, sarcophagus, autels, it is quite easy and fast.
but to model/UVmap/color a humanoid shape is difficult and time consuming... (especially the UVmapping, to have a approximately uniform texel size, not too distorted/sretched)

i use fragmotion for this, what i do is that i select a group of triangles which can be projected on flat 2d space, and then i unwrap (project) them, then i reposition (on the texture 2d space) some vertices of the projected group so that it has a similar outline than the 3d shape, and also i scale it to keep a (approximately) uniform texel size, then i try to 3dpaint on the 3d shape to check that some texels are not too distorted/stretched (in which case i would reposition some vertices on the texture 2d space)



(the texel size is (approximately) 0.01u, humanoid shape is low details : 459vertices and 918triangles)
(i use 3-4 colors for each material : one for main color + others for fake lighting/shading...)
the result is quite primitive and ugly, but with the appropriate lighting/shading and a good ambiance, it may be enough to look convincing. and in any case, i don't want to spend endless hours on that, so i am going to continue like that.

RemiD

#27
today, i have experimented more with 3d drawing : coloring with one color for each material + fake lighting with 1-2 lighter colors + fake shading with 1-2 darker colors

clearly not recent AAA quality, but i am approaching playstation1 / saturn / nintendo64 / manga quality, and this is good enough for me.

now i need to improve how i draw the lighting/shading on the humanoid shape, corresponding to bones/muscles anatomy... still a lot to learn...

the good thing is that with this approach you don't need many colors to make your texture but there is still some fake reliefs due to the fake lighting / shading using lighter/darker colors.

this model is around 900tris but with nice texture with fake lighting/shading it looks quite good compared to the flat shaded version !

blinkok

That looks very good
I would make the shadows slightly smaller
When they cross over, the shading should be like when they cross over on the face. The one in the middle of the chest looks a bit odd
Maybe add shading to show the contours of the face and body: side of nose, under chin, chest area etc

RemiD

#29
thanks

i know that some "crossings" do not look coherent, this is because i made the mistake to uvmap symetrically ;D so there is the same texture mirrored on each side of the bodypart (except for the face), so now i think that i will have to put horizontal "bandages" to cover these weird diagonal "crossings"