13 Replies Latest reply on Jun 2, 2009 7:30 AM by Deepak Gupta

    Resolved: request Realview AO turntable macro

    Neil Larsen
      Hey folks I have a request for someone who knows the SW API.
      I have a need to do the following and I want to know if it is possible and if someone might try this and kindly donate a macro to the SW community.

      I need to save a sequence of screen captures to disk to make a simple movie to loop (the later stage most likely done in Blender's sequencer).
      With Realview AO turned on I want to do a screen capture then rotate the model view about vertical axis say 3 deg (like by arrow keys) wait for the AO to recalculate and save a new image with the sequence no. appended in the name.. rotate again save etc until 360 is done.
      the end result is 120 ( in this case) images saved in a folder.
      I am not sure how SW does AO it might make a bad animation but I would like to try.
      The model also needs to show perspective on and set lighting etc- just as you view the 3d window ordinarily and capture it.
      I am anticipating it would take about 5-6min pc+graphics card running time to do this sequence.
      If the SW camera function was set up to capture image aspects at useful sizes it would help here but unfortunately thats not done yet so I would just be taking the 3d window as it comes.
      In my case thats ex 1920x1200 minus toolbars FM etc although I suppose you could make it full screen and run the macro by hotkey assignment.

      There is a possibility in the future SW might incorporate faux 'real time' global illumination so this might be extended to cover that as well at some stage.

      thanks to any takers
        • Realview AO turntable macro
          Deepak Gupta
          Neil,

          I have tried recording a macro to do what you need and testing the same. I can try to work on the codes to make the macro work for you.
            • request Realview AO turntable macro
              Neil Larsen
              wow great thanks Deepak!

              I am not sure if it is possible to poll as to when the AO recalc is finished..I guess performance varies depending on hardware..3-5 secs I guess..
              It occured to me after posting that rotation of the view as per arrow keys might not produce such a good cinematic sequence and it might be better to rotate the model about an Axis instead...or something..

              sorry I guess that part needs some more thought
            • request Realview AO turntable macro
              Deepak Gupta
              The codes what I have record will rotate the the view around in a specified axis in a positive direction with the current increment and then rebuild the part and save a jpeg file. Now I have to look around for other macro to make a loop so that it works till rotation is 360°
                • request Realview AO turntable macro
                  Neil Larsen
                  ok - is it necessary to rebuild the part/assy though can we just not wait until the AO is done even just guessing as suitable time to wait before saving?
                  I say this because a rebuild might take some time..or may be not

                  attach is an example of what I am doodling with ATM but unrelated to the actual mission
                  in this case its actually a multi body part just to play around with a very prelim concept - size , form, shape
                  the Realview AO is to help envisage what it might actually look like without going into much detail or bothering with a full render or animation
                  SW AO actually makes a fairly cool job of the shadows IMO even though it is a bit rough/approximate.
                • request Realview AO turntable macro
                  Deepak Gupta
                  We can add or remove the rebuild and add a delay. But I feel adding a rebuild will be good. I'm not sure how to add delay and I need to see how to make the things working.
                    • request Realview AO turntable macro
                      Ron Bates
                      Hi Neil,

                      Why not just use Animator (err..SW Motion)?
                      The Animation Wizard will give you almost a turntable...essentially rotating the camera view around the object. Or you could set up a real camera and set different viewpiont keyframes to your liking. It all works with AO turned on...automatically finishing AO calculation before "capturing" the next frame. And when you save the animation you can choose "series of Windows Bitmaps" or "series of Truevision Targa" to then take into Blender or whatever app you like for post processing and stitching together.

                      Apologies if I've misunderstood your original intent.
                        • Resolved: request Realview AO turntable macro
                          Neil Larsen
                          ok thanks Ron I'll give it a shot,
                          I didnt even think AO - and especially cos of the recalc time - would work with Motion so I didnt even try it

                          ..well strange AO doesnt seem to take any time to recalc this way ..why is that?
                          I set up a simple rotation using the wizard - I guess it must use the same lighting calc all the time like this...AO is baked?
                          so why does the 3d window need 3+ seconds or so each move to update if nothing changed?
                          perhaps you could disable the recalc for the screen then if you just want to tumble/look over a model in a static lighting environment?? or do I misunderstand this badly?-
                          from a 27" panel the window makes a big .avi file (600mb uncompressed @ 30fps in this test ) but it looks very nice.. I thought it might flicker but no...( althought I guess it wouldnt if it is baked..) - cool stuff.. and there is only a tiny blip when relooping
                          havent tried a camera and individual frames yet

                          you know I'm waiting on fake global now dont you

                          BTW this is another case where the captured size doesnt respect the window re FM and it would be nice to know the camera capture size..

                          OK so Deepak I can cancel that request sorry for the trouble

                          Answer is SW Motion will capture AO
                      • Resolved: request Realview AO turntable macro
                        Deepak Gupta
                        No problems Neil but I will still work on that stuff for myself.

                        And thanks Ron for bringing up and easy solution.
                          • Resolved: request Realview AO turntable macro
                            Neil Larsen
                            maybe I m getting overly conditioned to disappointment and frustration
                            I really didnt think there was a possibility of that working
                            again my apologies
                              • Resolved: request Realview AO turntable macro
                                Neil Larsen
                                maybe I should still be disappointed and frustrated -

                                I found if you dont have PW then setting up a camera view is useless..it doesnt work for anything but the 3d screen view - you will just have to cram the viewport with the motion manager and taskpanes to be about the right size -groan-
                                also beware a strip with the heads up toolbar is cropped from the saved view
                                I also found some small bugs as well - sigh- unless someone has already turned them in - fairly unlikely - they wont be fixed in this release..

                                also dont use any compression esp with a gradient background or you get nasty banding -kind of strange codecs if you ask me but..

                                stick with 25 frames a sec for a smooth looking rotation
                                about 10 or 12 secs for a full rotation is fast enough without being spinny or making too big a file - expect 500mb- 1gb though which is getting pretty heavy and pushing disk playback.
                                this does take some time even on a fast pc but its less than proper rendering of course
                                I ran a batch of .tga images into Blender and saved as Quicktime and it made a decent enough movie of 250mb or so but I thought there was a visible compromise - oh well..

                                  • Resolved: request Realview AO turntable macro
                                    Deepak Gupta
                                    Neil,

                                    Here is the macro which I have working on. Its working fine for me. Just one thing need to fixed. The jpeg file name. This doesn't change. I mean that it saves the jpeg with the part name and always ask if you want to replace the old one. If you hit yes, it will overwrite else it will not create another but keep on rotating the view.

                                    In the macro you need to give the angle of rotation and it will rotate the view in a particular direction with that amount of angle. Currently macro is to written to work in plus Z axis. I will modify it to work in any of selected axis (i.e. in either x, y or z). Give it a try and comment.
                                      • Resolved: request Realview AO turntable macro
                                        Neil Larsen
                                        hi Deepak,
                                        thanks for posting your macro I gave it a try..

                                        it is rotating and saving but as you note over-writing rather than appending to the file name and creating another.
                                        unfortunately it doesnt seem to be saving with the AO showing either here.
                                        also note if you choose an angle that doesnt fit in 360 like 50 deg it just keeps going and it is a bit hard to stop
                                        perhaps it would be better to have a menu to choose either a 1 or 1.5 deg rotation step = 240 or 360 images which can make a movie 8/10/12/15 secs long depending on the post processing frame rate of 24/30fps.
                                        is the jpeg saved at a high quality compression setting do you think?
                                        perhaps it is not so good to save the images in a compressed format..
                                        maybe overall it would be easiest to stick with the 'sub optimal' SW window capture as it is...

                                        if you want to persist being able to choose the up axis would be a good idea I seem to have Y up here..
                                        also while the image is the correct visible window size -incl the heads up area- (yay!) it doesnt seem to correspond with the actual 3d view - its panned slightly to the right - about 108 px? which would seem to be about the width of the Display Pane + a bit - the TP tabs?? In the test I didnt have the DP showing but the TP was pinned.
                                        I think though this issue is probably some SW window drawing weirdness and not due to your macro I think I pointed to this drawing weirdness in another thread already..

                                        thanks for your attempt/efforts