Original Post
🔒 Locked
BSP + PVS
Advertisement
I''m not exactly sure what the question is but I hope I can help.. the best way I found to do it was to create the BSP first, then calc the PVS from there..BSP''s are like fractals, you can divide the world into mini-BSP''s of any depth, then use those for the PVS..once you have the BSP you can seperate it into as many small chunks as you want, and determine which chunks are visible from any given chunk..I wouldn''t worry about the PVS until you have a working BSP structure though..
"Like all good things, it starts with a monkey.."
"Like all good things, it starts with a monkey.."
...of course I''m still doubtful!
I dont know the most important thing: what is the test I must do
in order to see which leafs are visible from each others?that is
how can I determine the PVSs (before storing it)? Every code example I found is a "bsp-reader" not "writer"...
Zcode
I dont know the most important thing: what is the test I must do
in order to see which leafs are visible from each others?that is
how can I determine the PVSs (before storing it)? Every code example I found is a "bsp-reader" not "writer"...
Zcode
once you have the BSP created calcing the PVS is fairly easy..before you can get into PVS''s I have to ask - do you have a working BSP model yet? you stated that all the code you could find was to read BSP''s, not create them..if you do have a BSP structure to work with, here would be the next steps:
Subdivide the BSP into a linked list of small mini-BSP''s..
Set all polygons within a mini-BSP to the same color(different color for each mini-BSP)..
Render the entire world from each mini-BSP, check every pixel on the screen to see which mini-BSP''s make it into the final view, use those pixels as an index for the other mini-BSP''s that are in the PVS..do this with each mini-BSP..
At the root of every mini-BSP have a pointer to a table of pointers to other mini-BSP''s..
When rendering determine which mini-BSP you''re in..check with all other mini-BSP''s in the PVS and render from the farthest back..
If you don''t have a working BSP creator you won''t get very far calcing the PVS(unless you''re not going to use BSP''s at all)..if you need some info on creating BSP''s check this out:
http://reality.sgi.com/bspfaq
"Like all good things, it starts with a monkey.."
Subdivide the BSP into a linked list of small mini-BSP''s..
Set all polygons within a mini-BSP to the same color(different color for each mini-BSP)..
Render the entire world from each mini-BSP, check every pixel on the screen to see which mini-BSP''s make it into the final view, use those pixels as an index for the other mini-BSP''s that are in the PVS..do this with each mini-BSP..
At the root of every mini-BSP have a pointer to a table of pointers to other mini-BSP''s..
When rendering determine which mini-BSP you''re in..check with all other mini-BSP''s in the PVS and render from the farthest back..
If you don''t have a working BSP creator you won''t get very far calcing the PVS(unless you''re not going to use BSP''s at all)..if you need some info on creating BSP''s check this out:
http://reality.sgi.com/bspfaq
"Like all good things, it starts with a monkey.."
I myself have a BSP-compiler/viewer up and running, but I don''t get the idea of the PVS-creation completely. You say that I am supposed to render the world from the view of one small BSP-tree, but if you do that for, let''s say a tree of five triangles, how can you say from where to render and how can you be sure that there is NO place inside th space of that BSP tree that enables you to see the other one if you render just ONE position?
Would be cool if you could help me with that one...
And if you know some good links I''d be VERY happy if you''d share them with me.
Thanks,
Alex
Alexander Stockinger
Programmer
Would be cool if you could help me with that one...
And if you know some good links I''d be VERY happy if you''d share them with me.
Thanks,
Alex
Alexander Stockinger
Programmer
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement