From: John K. <joh...@ho...> - 2003-02-14 18:17:59
|
Bruce, Thanks for the reply on opacity. It was helpful, but it opens up new questions for me. <<These problems can be solved for triangles, but the solution involves things like clipping. Solving it for entire Visual primitives seems impractical, so we would have to do something like: 1. Render all opaque objects 2. Break all transparent objects into triangles, and store the triangles 3. Find any pairs of triangles not separated by a plane and split them 4. Sort the triangles (using separating planes) 5. Render the triangles If you want to do some research on the topic, you will usually see it referred to as "Painter's algorithm" or "depth sorting". >> It sounds like the real difficulty with implementing transparency is intersecting objects. But isn't this also a difficulty for completely opaque objects as well? How does VPython get around that difficulty for opaque objects? How is this solution different from that for transparent objects? While we're on a similar subject, I'm guessing it would be simple to implement objects whose display color doesn't depend on the scene lighting. I was trying to produce the Sun in a gravity demo I'm writing, but then I realized that it would look silly for the Sun to have a shaded side. Is there perhaps an option for this already? (I'm guessing that having light actually coming from a point inside the scene instead of off-stage from infinity would be difficult to realize.) Also, it is possible to have a wall-paper background at infinity, or at least to put objects of finite angular size at infinity? I wanted to implement a star-field in my gravity demo, so that there'd actually be some semi-realistic way to "see" a black hole against the star-field (plus also to give a sense of orientation to movement through the vacuum of space). Thanks, John Keck _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus |