Announcement

Collapse
No announcement yet.

simplified UI - python

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • simplified UI - python

    I teach VRay and have been having issues with helping new users deal with the many variables in the options editor. using visopts is not helpful as they overwrite things like environment settings. so now that rhino 5 is out I've been working on a simplified UI using python - looks like this so far:
    Click image for larger version

Name:	UI-1.png
Views:	1
Size:	61.2 KB
ID:	877081

    so far it's mostly functional, i think it will be useful. but i've been having difficulty with a few things though - the biggest problem is that i can't get any of the exposure settings to work at all, the scripted functions for the camera in the VRay plugin (for example, SetPhysicalCameraOn) don't seem to have any effect, though they don't return errors either.

    does anyone know if they are functional (and so maybe i'm just not calling the subroutines properly?)

    the other issues are more minor - there's no sub for getting the status of the adaptive DMC sampler for instance, but i can live without it.

    on a non-coding-related note, if anyone has suggestions as to making this better for a new user, please let me know! I'll post the code when it's more stable.

    thanks!
    Attached Files
    Last edited by fooprobe; 04-01-2013, 11:57 PM.
    emil mertzel
    vray4rhinoWiki

    Lookinglass Architecture and Design

  • #2
    Hi Emil,

    great project, new user or from-time-to-time render user could like it. I have no idea about coding, but if the plugin can be parallel installed to the current render plugins and I can easy switch, than I would like to look on it.

    It looks like a lot of work - you need to rewrite the material editor too? Can your Vray setups loaded with Vray 1.5?

    Ciao,
    Micha
    www.simulacrum.de - visualization for designer and architects

    Comment


    • #3
      It's just rhino and python scripts embedded in a toolbar button, the script calls subroutines that are part of the vray plugin. It's not a separate "plugin" really. So it's just interface work, not as hard as I thought, most of my time was spent learning python and WPF. But I can only include options that call subroutines that are part of the plugin, so I have no way of simplifying the materials editor yet.

      I'll post the script soon, I have a little cleanup to do. And would love to hear from chaos group about the camera options.
      emil mertzel
      vray4rhinoWiki

      Lookinglass Architecture and Design

      Comment


      • #4
        Ok, toolbar attached below.

        Here are some known issues:

        - written in python, so only works on rhino 5
        - it takes about 5 seconds the first time you launch it to load
        - I no longer have 1.05.29 installed, but I bet it works. I was testing early versions on 1.05.29 in december and it was ok.
        - I removed the exposure panel until i can get it working
        - Image sampler panel can't detect current settings, so it just shows "--" until you move the slider. this is a little irritating as you don't know if you're making things better or worse without checking the options first

        Also, please note that launching this will automatically change the following settings that i find are helpful for new users:
        - Hidden lights off
        - Default lights off
        - Max Depth on and = 5
        - Antialiasing on and = 1.5
        - Color Mapping set to Reinhard Dark mult = 1.0 and Burn = 0.8
        - GI on
        - Secondary engine set to Light Cache, multiplier = 0.7 (another known issue - if your secondary engine is set to something other than LC, it will still show the old option (e.g. Brute Force) in the Vray options, but it will render with LC. you have to set it back to Brute force in GI and then back to LC to get the LC panel to appear)

        enjoy, please give feedback!
        Attached Files
        Last edited by fooprobe; 05-01-2013, 10:50 PM.
        emil mertzel
        vray4rhinoWiki

        Lookinglass Architecture and Design

        Comment


        • #5
          Now I understand the concept - your tool write the options to the standard UI. Nice idea!! Simple control the render quality.

          A problem is, that if brute force is set as primary engine, the simple IM settings are not used, the engine isn't changed to IM.

          IM settings - I would stick at max rate -1 for low/medium.

          General the IM options could be more detailed, but I hope simple enough:

          * "interior/exterior" - in interior mode the subdivs could be set to doubled count of exterior mode counts (so the render time would be optimized by an easy decision)
          * "detail enhancement" flag option - if this is choosed, the max rate could be halfed (the subdiv mult need internal set to a value that approx. 30 subdivs are active for DE)

          The LC could get for "use for glossy rays" turbo flag. I use it at 99% of my renders. The Light cache subdivs could be at low = 500 and at high=3000. The sample size could set to 0.005 at "extreme", in the over cases to 0.01.
          Also there should be an option like "cores of the CPU" = 4, since the passes need to be set. Or you internal set it per script to 4 or 8 always.

          Max depth 5 is speed killer, I think, also beginners should know to use it and get a control, default value 2.

          My Adaptive DMC advice:
          clr threshold - draft=0.3, low=0.2 medium=0.15 high=0.1 extreme=0.05
          The value should be set at the DMC sampler option, since the image sampler is linked to this value.
          min/max subdivs - draft=1/1, low=1/2 medium=1/4 high=1/8 extreme=1/16
          This medium settings are my daily production settings, I would refine it only, if I see to much noise.

          Exposure control - you want believe it, but I never touched it in the last years. There is no need for it, I let disabled the exposure option. The shutter speed would be needed for motion blur, the F-number is be used for DOF, but it's nice that the exposure can be disabled and the F-number control the DOF power only.
          www.simulacrum.de - visualization for designer and architects

          Comment


          • #6
            Thanks for the great advice, Micha! Some of what you suggest may not be possible right now, because only certain options can be changed through the plugin scripts. But I'll work on it and post an update.

            My next big project will be to write a module that can read and modify visopt files and vismat files. That should give control over everything, but it's too much for me to do in the immediate future.
            emil mertzel
            vray4rhinoWiki

            Lookinglass Architecture and Design

            Comment


            • #7
              Great idea to modify the visopt file. I like this kind of tricks.
              www.simulacrum.de - visualization for designer and architects

              Comment


              • #8
                Ok Micha, update is attached.

                VfR Simple.zip

                I incorporated almost all your comments, thanks for the help!

                The one thing i didn't do was the detail enhancement. I have to admit to having not experimented enough with this yet to fully understand it. Guess i have some homework to do, I know there's a few posts on it.
                emil mertzel
                vray4rhinoWiki

                Lookinglass Architecture and Design

                Comment


                • #9
                  New build tested, some comments:

                  * noise threshold - sorry,my fault, I forget a digit, the threshold should be 0.03, 0.02, 0.015 and 0.005

                  * IM - a higher interpolation value should based on a higher sample count, so "medium" could get 75 subdivs and "extreme" could stay at 60 interpolation samples. To much interpolation cost render time and details.

                  EDIT: if I open a current scene, start simple VfR and switch to "interior", than rhino 5 64 crashs
                  Last edited by Micha_cg; 07-01-2013, 02:16 AM.
                  www.simulacrum.de - visualization for designer and architects

                  Comment


                  • #10
                    Yes, I was wondering about the noise threshold

                    I've been coding on a 32-bit machine, I'll try it out on a 64 bit.
                    emil mertzel
                    vray4rhinoWiki

                    Lookinglass Architecture and Design

                    Comment


                    • #11
                      ok, v1.02:

                      VfR Simple 1.02.zip

                      fixed the noise threshold, fixed the crash bug (it wasn't 64 bit related)
                      emil mertzel
                      vray4rhinoWiki

                      Lookinglass Architecture and Design

                      Comment


                      • #12
                        Works fine now.

                        Maybe we should set more different values between IM low and medium. Only the interpolation is changed now, but maybe at medium you could set 80 subdivs. So, there is a bigger difference between low-medium and the quality jump between medium-high isn't so high. Could you set the IM draft subdivs too 30 please? The draft modes could be really fast in low quality.
                        And I tested the quality setups - could you set the noise level of low to 0.03 and draft to 0.1 please?

                        General you you try to get the UI more compact. The "about" field looks quite big, maybe the interior/exterior could be placed at the right empty space, so that the lighting quality area can be more compact.

                        For future versions is could be great:

                        * to switch the cache modes. A default path like "d:/temp" or "d:/" could be set and the user could get a buttons for "save current" "read cache" and "no cache". Often I want to fine tune a material and I want to render a part of the scene per render window based on the last calculated GI.

                        * to get some fields where the user can free define three output sizes like 1600x900 and 800x450 and easy jump between the different set output sizes (like for the interior/exterior option). The VfR output options doesn't match the need of a project often, also all presets are in ratio 4:3 only

                        * a button for calculating and set the shift correction could be great too, if you need it, Gijs wrote a script that calculate the shift value, but doesn't set it

                        * in image sampler draft mode the global subdivs multiplier could be set to 0.3 too, so all "blurry" materials would be rendered much faster too
                        Last edited by Micha_cg; 07-01-2013, 11:50 PM.
                        www.simulacrum.de - visualization for designer and architects

                        Comment


                        • #13
                          I'll work on this - I was considering having an output size area too. Maybe one where the presets can be user defined, since everyone has different preferred aspect ratios etc, but it would be nice to be able to switch between two or three. Does it make sense to have only 5 levels from draft to extreme? I feel like it's enough, but it's easy to have more if that makes more sense.

                          I also need to keep an eye on my immediate goal, which was to provide a simple interface for beginners. We're heading now into some more advanced options, it may make sense to have a different version completely that has more options. I've also been researching the detail enhancement, and I think I understand it, but I don't understand the options you suggested. Shouldn't it cut the hsph subdivs in half instead of max rate? and I'm unclear about what you mean by 30 subdivs.
                          emil mertzel
                          vray4rhinoWiki

                          Lookinglass Architecture and Design

                          Comment


                          • #14
                            I think too 5 quality levels are good, more could be not usefull, since an easy slider isn't the right tool for fine tuning the quality. Most user will use three levels - draft for preview, medium for daily use and extreme to avoid seldom quality problems.

                            First I thought, the VfR Simple isn't something for me, because I don't need it, but than I found that it could help me to faster switch between preview and final render quality. For beginners I see your tool as an assistant to find the right parameter. So, it must not be super simple, but it could ask the right questions per simple options.

                            Some time I teached users per online lessons and my first step was to show, that only a handful of options is needed daily. So, I think your tool don't need to be extreme simplified, but it could show the most needed options only.

                            Detail enhancement - the main parameter for speed is the subdiv multiplier. (General from my view a direct subdiv option would be the better way, but now it is so at Vray, the DE subdivs depends on the IM subdivs.) I think, the user don't need to touch the DE subdivs, if internal the subdiv multi is calculated so that approx. 30 subdivs are used for DE.
                            Example: IM subdiv 90 -> DE subdiv multi 0.3 -> 30 subdiv are used for DE. If I would be you, than I would connect the Image sampler quality with DE too, this means in draft/low mode the multiplier could be set stronger, less DE subdivs would be needed. For DE your tool could show the full power, it could set the optimized value based on the raw user specifications.
                            The DE radius could be untouched (radius 20) or the user can choose between a max detail size "tiny", "medium" and "large" detail size (for example intern set to radius 10, 20, 40).
                            www.simulacrum.de - visualization for designer and architects

                            Comment


                            • #15
                              Ok, I’ve made the changes to the IM slider, the DMC noise threshold and global subdivs on the Image sampler slider:

                              VfR Simple 1.03.zip

                              I can’t implement Detail Enhancement, lens shift, render output, or saving/loading IRMaps right now, it looks like the scripting methods don’t work yet (probably why Gijs didn’t implement the lens shift). Either that or I don't know how to use them properly, there's no documentation so I've been guessing about all this so far. These will have to wait until I can work directly with visopts.
                              emil mertzel
                              vray4rhinoWiki

                              Lookinglass Architecture and Design

                              Comment

                              Working...
                              X