From: Bruce S. <Bru...@nc...> - 2005-10-02 21:32:50
|
Sorry, currently there's no way to cast shadows. And you can only put lights at infinity. Jonathan Brandmeyer is working on a version that will let you put lights anywhere, but even with that advance there won't be shadows, which typically require ray-tracing, which is slow. A minor footnote is that at vpython.org there is a routine for exporting a VPython scene to Pov-Ray, a freeware ray tracer, which does produce shadows. Bruce Sherwood Nick Lunt wrote: >Hello, > >I've have just installed vpython and have to say I am loving messing around >with it. > >Anyhoo, I've had a look through the archives but unfortunately I could not >find a search function for past posts, hence my question, which I'm sure >must of been asked before ;) > >Is there anyway to have objects cast a shadow ? I can see that when I rotate >a box object that there is a shadow but when I move a sphere object around >inside a box (or between two boxes as in the tutorial) there is no shadow of >the sphere. > >I can get the current vectors for the default 2 lights (print scene.lights) >but I'm unsure of how to manipulate my own lights (or the default ones) to >get a moving object inside a box to generate a shadow. > >So basically can anyone please give me a quick rundown on how to generate my >own lighting to enable shadows on moving objects ? > >I have attached my code in the hope that it my help to explain what I'm >trying to do. > >Many thanks, >Nick . > > > |