From: Ari H. <ahe...@an...> - 2000-10-19 04:45:19
|
I figured I better clear this up before it gets any more absurd. 1) Raytracing. If the only reason you want to raytrace is to have a picture of what's on the screen, for goodness sake *TAKE A SCREENSHOT*. Ctrl-Alt-whatever in windows, use the xwd(1x) utility in Unix[1]. I *still* haven't heard why anyone wants to make raytracings in the first place -- it seems like a lot of work if all you want is textures. And without textures, it's not going to look any different than the GL renderings. 2) Non-interactive mode (i.e. what you'd use to make VPython a cgi script). This presents a real problem. Typically a cgi script is run as user nobody. VPython wouldn't be happy under those circumstances -- it needs control of the console and X running -- in short, it needs the DISPLAY environment variable validly set. The Visual library was *not* designed to be run in any non-interactive mode. Like I said, it would be easy enough to hack Visual not to render anything except when the controlling thread requests it to. But it would still want to render to a GL context -- not good for a cgi script. If you were willing to forgo any pretense of security (read: Ari says this is a *bad* idea) you could have the cgi run as a user with some level of priviledge, leave that user in control of the console with xhost set appropriately, and have the script set DISPLAY correctly before launching Python. Then the script could use xwd(1x) from the command line to capture the contents of the Visual window to a file, and do whatever you want with it. This is a hack. I take no responsibility for anyone who actually *tries* this. Cheers, -- Ari Heitner DC: 703/5733512 PGH: 412/4229837 Non c'è più forza nella normalità: c'è solo monotonia. [1]: (I note that while *I* have only compiled VPython for Linux, I personally guarantee you it will work fine on Solaris or anything else reasonably sane with the full environment) |