November 17, 2019, 11:06:23 AM

Author Topic: 3d maze project...  (Read 761 times)

Offline 3DzForMe

  • Hero Member
  • *****
  • Posts: 819
Re: 3d maze project...
« Reply #15 on: October 16, 2019, 05:16:14 AM »
Quote
yes 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

Offline Naughty Alien

  • Hero Member
  • *****
  • Posts: 664
Re: 3d maze project...
« Reply #16 on: October 16, 2019, 02:47:47 PM »
..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.. :)

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1011
Re: 3d maze project...
« Reply #17 on: October 16, 2019, 05:34:18 PM »
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
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1011
Re: 3d maze project...
« Reply #18 on: October 19, 2019, 11:31:16 PM »
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)
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline 3DzForMe

  • Hero Member
  • *****
  • Posts: 819
Re: 3d maze project...
« Reply #19 on: October 19, 2019, 11:34:02 PM »
So Sweet ;) :D Great work as always RemiD

Offline Qube

  • Administrator
  • Hero Member
  • *****
  • Posts: 2198
Re: 3d maze project...
« Reply #20 on: October 20, 2019, 06:34:38 AM »
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? :(
Until the next time...

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1011
Re: 3d maze project...
« Reply #21 on: October 20, 2019, 07:45:21 AM »
Quote
Is 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 !
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline iWasAdam

  • Hero Member
  • *****
  • Posts: 1392
Re: 3d maze project...
« Reply #22 on: October 20, 2019, 08:38:37 AM »
Looking mighty fine :)

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1011
Re: 3d maze project...
« Reply #23 on: October 21, 2019, 10:58:10 PM »
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...
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline Naughty Alien

  • Hero Member
  • *****
  • Posts: 664
Re: 3d maze project...
« Reply #24 on: October 22, 2019, 05:01:07 AM »
..this is very very nice so far..just dont  overcomplicate it..it started nice and simple (im assuming its procedural)..

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1011
Re: 3d maze project...
« Reply #25 on: October 24, 2019, 08:56:04 PM »
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 )
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1011
Re: 3d maze project...
« Reply #26 on: October 26, 2019, 11:17:41 PM »
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.
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1011
Re: 3d maze project...
« Reply #27 on: October 28, 2019, 10:07:57 PM »
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 !
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0

Offline blinkok

  • Full Member
  • ***
  • Posts: 129
Re: 3d maze project...
« Reply #28 on: October 28, 2019, 10:43:34 PM »
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

Offline RemiD

  • Hero Member
  • *****
  • Posts: 1011
Re: 3d maze project...
« Reply #29 on: October 28, 2019, 11:01:30 PM »
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"
DualCore AMD E-450, 1646 MHz - 6 Go DDR3 1333 SDRAM - AMD Radeon HD 6320 Graphics (384 Mo) - Windows 7 Home Premium - DirectX 11.0