Announcement

Collapse
No announcement yet.

Build python interface for command line denoiser

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

  • Build python interface for command line denoiser

    I am making a Python-tkinter interface for the Standalone Denoise Tool. I don`t have much experience with Python, but I have figured out the basics. (I was set to this task at work because I can use maxScript :P)
    The reason we need an interface is to lower the bar, and as a starting platform for later expansion.

    Denoiser seems to start fine, but I cannot figure out how to pass arguments, like -inputFile for example. I think it needs to be a new element in the list like "vdenoise", but I cannot get it to work.
    The following example doesn`t return an error, it just won`t do anything:
    subprocess.call(["C:\\Program Files\\Chaos Group\\V-Ray\\3dsmax 2016 for x64\\tools\\vdenoise.exe", "vdenoise", '-inputFile="E:\\testbilde.exr"'], shell=True)

    Can anyone help me in the right direction?
    Last edited by hardrock_ram; 08-11-2016, 06:51 AM.

  • #2
    I got it to work with this instead:

    command = "C:\\Program Files\\Chaos Group\\V-Ray\\3dsmax 2016 for x64\\tools\\vdenoise.exe -vdenoise -inputFile=E:\\testbilde.exr"
    subprocess.Popen(command)

    I would also like to get the Denoiser messages back to my script so I can make a custom log. Is there a simple way to achieve that?

    Comment


    • #3
      You could redirect the standard output from the command-line to some other stream but I don't really know how this is handled in Python.

      Best regards,
      Vlado
      I only act like I know everything, Rogers.

      Comment


      • #4
        I see ... You don`t have a very good grasp on either programming or Vray, do you Vlado?

        Comment


        • #5
          Not in Python, no...

          Best regards,
          Vlado
          I only act like I know everything, Rogers.

          Comment


          • #6
            I hope you took the obvious joke
            Anyway, I got the basic functionality working now. I haven`t gotten as far as getting the denoiser log back into my script, but in worst case people will just have to read what the cmd prints out
            Last edited by hardrock_ram; 09-11-2016, 07:10 AM.

            Comment


            • #7
              Completely off topic here. But I started learning python 2 days ago, because I want to learn a programming language. Did I make a good choice or do you and/or Vlado recommend it?
              A.

              ---------------------
              www.digitaltwins.be

              Comment


              • #8
                Originally posted by hardrock_ram View Post
                I hope you took the obvious joke
                I am not known for my sense of humor I'm afraid In any case, glad that you have something working; let us know if you need additional help.

                Completely off topic here. But I started learning python 2 days ago, because I want to learn a programming language. Did I make a good choice or do you and/or Vlado recommend it?
                It's not a bad choice I think you will find it useful.

                Best regards,
                Vlado
                I only act like I know everything, Rogers.

                Comment


                • #9
                  Originally posted by vlado View Post
                  I am not known for my sense of humor I'm afraid In any case, glad that you have something working; let us know if you need additional help.

                  It's not a bad choice I think you will find it useful.

                  Best regards,
                  Vlado
                  Thanks Got to start somewhere
                  A.

                  ---------------------
                  www.digitaltwins.be

                  Comment


                  • #10
                    As I said I only have previous experience in maxScript.
                    What I found is that learning the syntax itself was a no-brainer. It`s strict, but pretty easy to grasp. And there is a ton of help on the web.

                    The problems I am having is mostly due to all the stuff "around". I tried to jump straight into Qt to make an interface, but that was a bit too much. Making .exe-files is a hassle and so on. So for now I settled with Python 3.5, the built-in Tkinter interface module and py2exe. This fills all my needs for a long time, and it enables me to actually learn stuff instead of struggling to get everything to work.

                    Comment


                    • #11
                      Originally posted by vlado View Post
                      I am not known for my sense of humor I'm afraid In any case, glad that you have something working; let us know if you need additional help.
                      Well, you obviously have other talents
                      I will let you know if I need help

                      Comment

                      Working...
                      X