Anti Penumbra Questions
Hi,
Im on the last leg of implementing a PVS set for my BSP engine.
I have the Portal generator workig fine and now its time for me to cast my ant penumbra out from each portal etc etc etc.
It works by taking each VERTEX in the source portal and creating planes with each EDGE of the destination portal and and seeing what other portals fall within these planes and then recursing onto that leafs portals etc.
ANYWAY,
I have a slight problem.The planes are generated by taking two edges :-
SrcPortalPoint-DestPortalPoint1
SrcPortalPOint-DestPortalPoint2
And then performing the cross product on them to get the Plane normal.
This works fine but in the following case.
Lets say that i have two portals that are at right angles to each other with two of their edges touching to make a kind of L shape.
Where one of the Portal1 points is on Portal2 plane it is impossible for me to make a plane because i do not have two valid edge vector to perform the cross product with.So there fore i can not get the Plane normal.
any ideas what i can do about this
I think I´m the only one that answers your question.
OK, here we go:
Before you create the plane, check if it´s possible then do the normal antipenumbra calculation and carve something off, else, if it´s not possible, try it with the other points(even in your L case you can carve sth. off), then go to the next portal and do the same thing again.
I hope I could help.
--Matt--
OK, here we go:
Before you create the plane, check if it´s possible then do the normal antipenumbra calculation and carve something off, else, if it´s not possible, try it with the other points(even in your L case you can carve sth. off), then go to the next portal and do the same thing again.
I hope I could help.
--Matt--
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement