after endless futzing about and tweaking i think i have something that may just be workable for this faux bevel effect i want
-
I dunno I'm just not feeling the actual lighting model. Its not like minecraft exactly has realistic lighting anyway: blocks are lit from two opposite sides!
But the problem with baked lighting is if you have non symmetrical blocks you have to make 4 versions of each face to get all the lighting. Not that that's super onerous
Also if I made something like a lectern that would be a lot of work to do manually for each orientation
On the other hand when I made isometric games I'd have to make two of everything to get the lighting right and I didn't mind that so much so maybe I'm overthinking it
-
On the other hand when I made isometric games I'd have to make two of everything to get the lighting right and I didn't mind that so much so maybe I'm overthinking it
ok i figured out a reasonable way to fudge the normals so i won't have to manually bake lighting. basically what i do is set the normals of the edges so that they point towards where the adjacent faces are pointing (90 degree bend) and then i lerp from the face's lighting factor to the neighbor's lighting factor
that gives me the result on the left. i tried just having regular, actual normals, but it creates artifacts like on the right (its accurate that it shades it like that but it looks bad)
-
ok i figured out a reasonable way to fudge the normals so i won't have to manually bake lighting. basically what i do is set the normals of the edges so that they point towards where the adjacent faces are pointing (90 degree bend) and then i lerp from the face's lighting factor to the neighbor's lighting factor
that gives me the result on the left. i tried just having regular, actual normals, but it creates artifacts like on the right (its accurate that it shades it like that but it looks bad)
i was worried the corners would look too sharp without modification but honestly the smooth gradient does a great job without blunting the corners
-
undefined Oblomov ha condiviso questa discussione
-
i was worried the corners would look too sharp without modification but honestly the smooth gradient does a great job without blunting the corners
took all day but i've optimized the vertex format for blocks *and* implemented auto-bevelled terrain. shown without textures to make the bevelling clearer
-
took all day but i've optimized the vertex format for blocks *and* implemented auto-bevelled terrain. shown without textures to make the bevelling clearer
-
doing a side by side with my style guide i think i'm getting there. i'll probably wanna do some fancier color grading on the lighting though, and i want outlines, but the soft rounded feel of the terrain is definitely there now even though its still all cubes
-
doing a side by side with my style guide i think i'm getting there. i'll probably wanna do some fancier color grading on the lighting though, and i want outlines, but the soft rounded feel of the terrain is definitely there now even though its still all cubes
i've brought back the grass, which is actually an obj model
see i made an engine before and appropriated it for this project. it could load obj models (with normal maps) so at first the blocks in my world were actually loaded from obj models
that's why i had to redo a buncha stuff to add the bevelling, since i had to generate the faces myself
-
i've brought back the grass, which is actually an obj model
see i made an engine before and appropriated it for this project. it could load obj models (with normal maps) so at first the blocks in my world were actually loaded from obj models
that's why i had to redo a buncha stuff to add the bevelling, since i had to generate the faces myself
I should probably start linking up chunks before I do much else so I don't wind up having to deal with a ton of "this block's neighbor is in another chunk" situations later
-
I should probably start linking up chunks before I do much else so I don't wind up having to deal with a ton of "this block's neighbor is in another chunk" situations later
had a silly idea for block outlines using the bevel system. i take the dot product of the vector from the camera to the world position with the normal to determine if the bevel normal is pointing away from the camera, then add an outline based on that. there's some outlines where they don't belong but i can get easily rid of those
... i don't hate it?
-
had a silly idea for block outlines using the bevel system. i take the dot product of the vector from the camera to the world position with the normal to determine if the bevel normal is pointing away from the camera, then add an outline based on that. there's some outlines where they don't belong but i can get easily rid of those
... i don't hate it?
@eniko Personal opinion/matter of taste: I would add a (thinnier) black line to all the visible edges
-
had a silly idea for block outlines using the bevel system. i take the dot product of the vector from the camera to the world position with the normal to determine if the bevel normal is pointing away from the camera, then add an outline based on that. there's some outlines where they don't belong but i can get easily rid of those
... i don't hate it?
-
-
lol the outlining has more than doubled the code in my fragment shader
texturing, lighting, and bevelling: 12 lines of code
just doing outlines: 19 lines of code
-
lol the outlining has more than doubled the code in my fragment shader
texturing, lighting, and bevelling: 12 lines of code
just doing outlines: 19 lines of code
Not to pat myself on the back too hard but it's really nice how good this is turning out, like, aesthetically. It's not exactly trivial to make graphics look good when you only have a single 16x16 texture >_>
-
Not to pat myself on the back too hard but it's really nice how good this is turning out, like, aesthetically. It's not exactly trivial to make graphics look good when you only have a single 16x16 texture >_>
On the other hand I guess it would be fair to say these graphics are looking a little...... muddy
Eh? Eh? Eh?
-
On the other hand I guess it would be fair to say these graphics are looking a little...... muddy
Eh? Eh? Eh?
i'm commander shepherd and this is my favorite spot on the citadel
(seriously i cannot get enough of looking at this particular subsection of a screenshot i took of the outlines in my voxel engine)
-
@eniko Now I want a fighting game where your moves destroy the terrain around you, so if you are not careful you literally dig yourself into a hole
-
i'm commander shepherd and this is my favorite spot on the citadel
(seriously i cannot get enough of looking at this particular subsection of a screenshot i took of the outlines in my voxel engine)
-
@eniko Now I want a fighting game where your moves destroy the terrain around you, so if you are not careful you literally dig yourself into a hole
Worms?
-
debating what i wanna do with grass in my engine. atm i have a block shader, and a model shader. i feel like i could efficiently implement shell textured grass by making a shell texturing shader, but i also don't want to balloon the number of different shaders i need to render all my terrain
i could just use the model shader, but it becomes a pain in the ass to implement shell textured terrain then
i could try and combine it with the block shader but they both do really different things