Screenshot Saturday

Community Forums/Showcase/Screenshot Saturday

AdamStrange(Posted 2015) [#1]
Just a little something:


bump:


bump + fast SSAO:


diffuse:


no gameplay. I'm just working on the graphical output and general AI systems.
Just thought of a way to do infinite lights using the particle system - but I need to do a test first :)


markcw(Posted 2015) [#2]
Reminds me of block pushing games by coffeedotbean, I like games like that, where I can be as slow as I want. The ambient occlusion looks good. You need more color in the scene though.

Couple of questions:

Do your surfaces have vertices welded, or does each face have it's own vertices? Does this improve shading?

Can you tell me where you get the bumpmap shader code from? Does it calculate the tangent in realtime?


Grisu(Posted 2015) [#3]
Reminds me of Sokoban.


AdamStrange(Posted 2015) [#4]
@munch
heres the model internals:
* each model has a single vertex list. if models have been merged - then any same vertexes are collapsed into a single vertex
* each model then has a triangle face list. with references to color and vertex. At the render stage, these vertexes can be offset if needed
* if a model needs to be transformed, you just apply it to the vertex list:
		For k = Models[Model].FaceStart To Models[Model].FaceEnd
			v1 = FaceVerts[k].v1
			v2 = FaceVerts[k].v2
			v3 = FaceVerts[k].v3
			
'			glNormal3f(xpos, ypos, zpos)
					
			glColor4f(red, green, blue, alpha)

			glVertex3f(RVertexes[v1].x, RVertexes[v1].y, -RVertexes[v1].z)
			glVertex3f(RVertexes[v2].x, RVertexes[v2].y, -RVertexes[v2].z)
			glVertex3f(RVertexes[v3].x, RVertexes[v3].y, -RVertexes[v3].z)
	
		Next

you can see that originally I had normals, but these are now dealt with in the shader itself!

Does it improve shading? To be honest it is irrelevant, as in the end all you are rendering is a triangle. if you have errors it is more likely that the model code itself is possibly dicky, or the model?

i didn't get the bump map code from anywhere, I made it up :) I'm not actually using any bump maps, they are generated from the single bitmap i feed it at the beginning. Here's the code:
	vec3 X = dFdx(vertexDepth.xyz);
	vec3 Y = dFdy(vertexDepth.xyz);

	vec3 N = normalize(cross(X, Y));

//use= bump_normal(X,Y, N, 0..1)
vec3 bump_normal(vec3 dPdx, vec3 dPdy, vec3 fragNormal, float value)
{
	vec2 dV = vec2(dFdx(value), dFdy(value));
	
//	vec3 dPdx = dFdx(fragVertex);
//	vec3 dPdy = dFdy(fragVertex);  
	
	vec3 dPdz = normalize(fragNormal);
	dPdy = normalize(cross(dPdz, dPdx));
	dPdx = normalize(cross(dPdy, dPdz));
	
	vec3 N = normalize(-dV.x * dPdx - dV.y * dPdy + dPdz);
	return N;
}


the 3 lines at the top show how to get the surface normal and then the bump. I think the bump code is pretty standard, but i might have tweeted it?


markcw(Posted 2015) [#5]
@Adam, thanks!

I have this idea that I haven't tested yet that unwelded vertexs look better in the case of flat-shading. I thought you might know since you've done a lot of nice flat-shaded stuff. Sorry to be off-topic and confuse this with your current project.

With the bumpmap I was just curious what you're doing there since I made a bumpmap demo of 3 different shaders. The first was from klepto2's old demo, the second was by Ferret and the last one was by DarkGiver. The last one calculates the tangent in real-time which means if you look really close the lighting always looks right... but few people would probably notice this.

I couldn't find which AdamStrange you are on Twitter as there are 6, and none seem to do 3d graphics.


AdamStrange(Posted 2015) [#6]
aha - i'm not on twitter or Facebook...


AdamStrange(Posted 2015) [#7]
OK. Gameplay is currently sort of bomberman:


yada yada locals turned into psychotic animals. rogue meets the power of pork?


markcw(Posted 2015) [#8]
Oh dear, no...

What I meant by more color was perhaps some colored gems inset into the walls here and there, or special carved floor stones in random places. I would consider changing to a brown-grey as grey is a little "dry". I would also change the walls to a standard "interlocking block" style. Here's a picture that demonstrates these ideas (other than the spheres being too bright). Note the two slightly different tones of brown stone color, actually there's 3.




AdamStrange(Posted 2015) [#9]
I present the Wizard Mushu:

in all his low quality glory


Grisu(Posted 2015) [#10]
Can his staff get a glowing globe on the top?


markcw(Posted 2015) [#11]
I bow down before your low quality-ness-ism!

Very nice model. Now how did you do that blur effect? :)


AdamStrange(Posted 2015) [#12]
Yep - I can see about that :)
lol
there isn't actually any blur - its the low quality of the capture - But... I can implement one very simply <grins>


RemiD(Posted 2015) [#13]
I was also going to ask about how you made the "regional" blur, but if it is due to the capture... :P


markcw(Posted 2015) [#14]
It's like a a heat blur trail coming out behind the wizard and then everywhere except around an area equal to about three times the size of the wizard.

I would think that would be quite difficult to code.


AdamStrange(Posted 2015) [#15]
@Grisu..
Yep Great one:

sparkles, fully depth aware particles

@Munch
I had a look and it's very simple to add to add the heat blur effect (and others), but it currently doesn't add anything - so I'll get back to it later :)