peliosis Posted March 3, 2007 Share Posted March 3, 2007 Hello, This is a bit off topic but I know if there are answers to my tears they hide in the depths of THIS very forum:) I learn python intensively lately, began using cgkit to proccess 3d data and have some questions. How would it be possible to display data in some openGL viewer dynamically? For example, I have a file containing a simple geometry, and this file changes because new vertices are continuosly added (in 3d scanning process). But cgkit viewer is executed only once with predefined, constant file (python viewer.py myfile.py). Because I'm not a very experienced programmer I don't know how could I make a viewer update, to display new data. Probably cgkit viewer can do this at all. Do you see a solution to this attempt? Maybe I should use another viewer? I had a look at ogre, at PyOpenGL, but handling these is beyond my possibilities for at least a month:) Thanks for any insight. Quote Link to comment Share on other sites More sharing options...
diula Posted March 3, 2007 Share Posted March 3, 2007 Not that I know anything in python beyond basic addition and printing but maybe you can try VTK (with MayaVi)? I think it can display some changing data, but maybe I am thoroughly confused. Or simply re-open the file in cgkit after a specific interval (lame, I know)? Quote Link to comment Share on other sites More sharing options...
symek Posted March 3, 2007 Share Posted March 3, 2007 (edited) hey peliosis! sorry for delay, I've just lost my laptop and I couldn't find any workstation around Do you still have your problem with starting cgkit script? As to your question about piping in data to viewer, you have to put showing statement in to a loop: while _show == 1: date = update_my_data( ) world = make_some_sims(date) etc() etc() show_me_the_world( world ) if condition != something: _show = 0 look here for video introduction to VPathon: http://showmedo.com/videos/series?name=pyt...onVPythonSeries it's applicable to cgkit also (to some extend of cource) sie masz! sy. Edited March 3, 2007 by SYmek Quote Link to comment Share on other sites More sharing options...
peliosis Posted March 6, 2007 Author Share Posted March 6, 2007 HiSy! Thanks for your reply, I sort of know how this procedure should work, but there is one catch... "show_me_the_world(world)" If it were a real function to refresh the viewer, I would not bother you at all I haven't found such function yet and that's why I ask. addSomePoints() updateViewer() Quote Link to comment Share on other sites More sharing options...
symek Posted March 6, 2007 Share Posted March 6, 2007 I'm sorry, I didn't understand you is that what you need? sy Quote Link to comment Share on other sites More sharing options...
TheUsualAlex Posted March 7, 2007 Share Posted March 7, 2007 oh that's cool. I'll have to take a look at this too. Looks fun. : ) Quote Link to comment Share on other sites More sharing options...
peliosis Posted March 7, 2007 Author Share Posted March 7, 2007 I'm sorry, I didn't understand you is that what you need? sy Great link SYmek! I made a quick test and it does look like a solution I look for. Thanks a lot By the way, do you have the same experience with viewer.py? It eats my processor out even when doing nothing, looks like it calculates all the time. Quote Link to comment Share on other sites More sharing options...
symek Posted March 8, 2007 Share Posted March 8, 2007 (edited) Great link SYmek!I made a quick test and it does look like a solution I look for. Thanks a lot By the way, do you have the same experience with viewer.py? It eats my processor out even when doing nothing, looks like it calculates all the time. Yes it does, because it's based on the "while" loop. You can write your own tools built in the script it self. Viewer doesn't know whether your scene is changing or not so it refreshes all params. Edited March 8, 2007 by SYmek Quote Link to comment Share on other sites More sharing options...
peliosis Posted March 12, 2007 Author Share Posted March 12, 2007 Yes it does, because it's based on the "while" loop. You can write your own tools built in the script it self. Viewer doesn't know whether your scene is changing or not so it refreshes all params. ah SO! that little insidious devil... ;> Thanks SYmek Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.