Back face culling
Back face culling
Tips? Help? I've got the concepts down. But the code doesn't. I don't want actual code; I want different methods, on a mathematical and conceptual level.
For any grievances posted above, I blame whoever is in charge . . .
Displaying only the front part of a 3d object, instead of the whole thing. I've just been testing on tetrahedrons. It doesn't help that half of it is out of the screen. But once in a while I get a beautiful one, fully culled. Right now I'm just working with wireframes, and not filling the sides in.Lee wrote:What is that?
For any grievances posted above, I blame whoever is in charge . . .
I dont personally know anything about bfc but I found this link. It might be usefull http://www.cs.berkeley.edu/~ug/slide/pi ... cull.shtml
I took a quick look in petes tutorial section and found this tutorial which may be of help
http://www.petesqbsite.com/sections/tut ... phics.html
http://www.petesqbsite.com/sections/tut ... phics.html
- Kiyotewolf
- Veteran
- Posts: 96
- Joined: Tue Apr 01, 2008 11:38 pm
back face culling
there is a math routine that calculates the points to see if they come out to a positive or a negative number and it follows somehow on the fact that polygons are drawn using clock-wise drawn points,.. and if the points run in the other direction, counter clockwise, the formula returns the opposite sign..
You have to do vector math, and you add the vectors between the points somehow and compare it .. but that's about all I can remember.
Look up um.. what was it also called..
front facing polygons, back facing polygons?
i know this stuff and even understood the formula and code when i poured over it for hours but now i hath forgotten my info..
grr..
this thucks..
well.. i'll go looking and see if i can find something to be more helpful to you..
Kiyote!
You have to do vector math, and you add the vectors between the points somehow and compare it .. but that's about all I can remember.
Look up um.. what was it also called..
front facing polygons, back facing polygons?
i know this stuff and even understood the formula and code when i poured over it for hours but now i hath forgotten my info..
grr..
this thucks..
well.. i'll go looking and see if i can find something to be more helpful to you..
Kiyote!
Banana phone! We need more lemon pledge. * exploding fist of iced tea! * I see your psycho cat and counter with a duck that has a broken leg, in a cast.
- Kiyotewolf
- Veteran
- Posts: 96
- Joined: Tue Apr 01, 2008 11:38 pm
cross product?
Telling the difference between cross and dot products did confuse me thoroughly..
I could only tell the code apart from each other if I saw a listing of both side by side...
@.@'
I have been able to use 3D rotation formulas though, and scalar multiplication to make a vector clown do what looked like take two steps and make a back flip..
It rotated in all 3 axis, and was only a 2D wireframe, but as you watched it you kinda got hypnotised.
It was coded in Turbo Pascal v3 for DOS, (.. i should look up a compilier for that again.. <.<').. and was pretty fun as a diversion.
Actually....
I tried to code a texture mapping thingy in that same code which has been since coded in QBasic and submitted for the next issue of QBX.. so.. heh..
^.^
Whatcha making in 3D anyway? Izzit secret? Is it not? Me curious now..
I have a few odd projects to code in 3D eventually.. but the math still escapes me,.. I have to go code googling and find all it and print all it and rewrite all it and all kinds of stuff like that there.....
Kudos..
Clue me in if possible.. if not I'm sure I'll find out when you submit demo screens..!
Kiyote!
I could only tell the code apart from each other if I saw a listing of both side by side...
@.@'
I have been able to use 3D rotation formulas though, and scalar multiplication to make a vector clown do what looked like take two steps and make a back flip..
It rotated in all 3 axis, and was only a 2D wireframe, but as you watched it you kinda got hypnotised.
It was coded in Turbo Pascal v3 for DOS, (.. i should look up a compilier for that again.. <.<').. and was pretty fun as a diversion.
Actually....
I tried to code a texture mapping thingy in that same code which has been since coded in QBasic and submitted for the next issue of QBX.. so.. heh..
^.^
Whatcha making in 3D anyway? Izzit secret? Is it not? Me curious now..
I have a few odd projects to code in 3D eventually.. but the math still escapes me,.. I have to go code googling and find all it and print all it and rewrite all it and all kinds of stuff like that there.....
Kudos..
Clue me in if possible.. if not I'm sure I'll find out when you submit demo screens..!
Kiyote!
Banana phone! We need more lemon pledge. * exploding fist of iced tea! * I see your psycho cat and counter with a duck that has a broken leg, in a cast.
do your normal 3d math, and projection, once you have the 2d screen coordinates, use the cross product on them, if (-) then its facing away from the screen, if (+) its facing the viewer. you dont need to do it on the 3d points because you'll be wasting clocks on the z coor when you can just do it on the 2d screen ones.