So I was making this rotated cube in wireframe.
Then I filled it.
Then I culled the back faces.
Now I added shading.
Though I think I've done something wrong with the shading algoritm. Well it's more like I KNOW I've made something wrong with it. And maybe I should have used quads instead of triangles so the shading wouldn't look so weird.
Just thought I'd share. (oh yeah, thanks osgeld for the help a few days ago )
Edit: Fixd shading problem. If anyone wants to edit, use or whatever you're welcome to!
Shaded cube
Shaded cube
- Attachments
-
- ShadedcubeCorrectQuad.love
- Shading like a quad instead of a ... well. Triangle?
- (2.4 KiB) Downloaded 267 times
-
- shadedcube.love
- (2.3 KiB) Downloaded 247 times
srejv
Re: Shaded cube
Woo cubes!
I don't know how you guys can do this 3D stuff. I could never wrap my head around it. ; Good job!
One thing, though: the faces seem to appear and disappear when they're not quite completely covered by the front faces. Perhaps you need to take the angle of the cube into consideration...
I don't know how you guys can do this 3D stuff. I could never wrap my head around it. ; Good job!
One thing, though: the faces seem to appear and disappear when they're not quite completely covered by the front faces. Perhaps you need to take the angle of the cube into consideration...
Re: Shaded cube
Yes, I'm aware of that, but it should be fixed in the "correctquad" version. Should does not mean that it is fixed. : I think it's more correct now than before anyway
srejv
Re: Shaded cube
Naw it is in the corrected one.
Re: Shaded cube
ROFL
Shame that LOVE refuses to give you access to OpenGL's third dimension!
Clever work around!
Shame that LOVE refuses to give you access to OpenGL's third dimension!
Clever work around!
Re: Shaded cube
It was the work around that was the "project". There is an opengl lib in here somewhere but it's slow.
LÖVE!
LÖVE!
srejv
Who is online
Users browsing this forum: Bing [Bot] and 9 guests