|
-
Nov 29th, 2002, 02:38 PM
#1
Thread Starter
Fanatic Member
Direct 3D
Hello,
I have a room in 3D, in the middle of the room I have two walls, with some space between.
The walls have a fence texture on them and is transparent on some places.
I can see thru one of the walls and on to the other one, but if I look thru the other wall I don't see the first wall.
What's my problem? How to solve it?
-
Nov 29th, 2002, 03:02 PM
#2
Monday Morning Lunatic
You need to have *two* polygons for the wall, pointing in opposite directions. The system doesn't display any polygons pointing away from you, as it assumes a solid object will cover those up with real forward-facing polygons.
You *can* disable this, but I would recommend the first course.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Nov 29th, 2002, 03:10 PM
#3
Thread Starter
Fanatic Member
I know, but all walls is blocks with 6 faces, each face have 2 triangles, forming a rect.
The walls isn't build with only 2 triangles, else the culling would have removed them, the culling isn't the problem here.
Should I have 4 triangles instead of 2 on each face, pointing the same direction but draw the first 2 triangles in the correct order, when I've drawn them I draw the other ones, but in the opposite order?
Last edited by petrus; Nov 29th, 2002 at 03:13 PM.
ICQ: 128716725
-
Nov 29th, 2002, 03:35 PM
#4
Frenzied Member
Its actually a problem with Alpha blending. Any transparent objects that are drawn in front of, and before another transparent object will cause the second object to not be drawn, because its pixels have already been written over in the zbuffer. You have to depth sort your transparent objects, and draw them all last.
Z.
-
Nov 29th, 2002, 03:37 PM
#5
Thread Starter
Fanatic Member
-
Nov 29th, 2002, 04:29 PM
#6
Frenzied Member
Originally posted by petrus
Should I do that manual?
You have to.
Z.
-
Nov 29th, 2002, 04:29 PM
#7
Thread Starter
Fanatic Member
-
Dec 1st, 2002, 05:45 PM
#8
All sorting algorithms have some kind of loop.
You need to determine the order of your objects as seen by the viewer. Then sort them according to this order using some FAST!!! algorithm and draw them from back to front.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 2nd, 2002, 12:42 PM
#9
Thread Starter
Fanatic Member
Couldn't I just do like this?
I have a loop that draws the front triangles in order 1 to last triangle and when I've finished that I've a loop that goes backwards (triangle count to 1)??
-
Dec 2nd, 2002, 04:34 PM
#10
Uh... WHAT?
Could you explain that again please? I don't understand.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Dec 2nd, 2002, 05:00 PM
#11
Thread Starter
Fanatic Member
I deleted a row.. that's why it didn't make any sense.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|