Announcement

Collapse
No announcement yet.

Controlling Vantage by maxscript ?

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

  • Controlling Vantage by maxscript ?

    Dear Chaos,

    Is it possible to controle Vantage in Live link throug Maxscript?

    Kind regards,
    Christian.

  • #2
    Hi Christian,

    This is currently not possible Can you give more information on what do you want to control via Script?

    Best regards,
    Alexander
    Alexander Atanasov

    V-Ray for Unreal & Chaos Vantage QA

    Chaos

    Comment


    • #3
      Originally posted by Alexander.Atanasov View Post
      Hi Christian,

      This is currently not possible Can you give more information on what do you want to control via Script?

      Best regards,
      Alexander
      We have a new product that we call the cloud configurator. This is a front-end online web environment which sends instructions to a back-end PC on our office. The back-end is now a raytraced Unity environment but we would like it to be an Vantage environment because it's much nicer and easier to make. Things we would like to configure in such environment is endless. From moving walls to switching furniture, materials, colors, scenes and so on. If we could do this through max while in Live Link mode where we in max switch layers, add materials etc. and then Vantage give an instruction to render it to a path then we could upload the image to the web again.

      This would be a huge advantage to us.

      Comment


      • #4
        Would a general scripting language like Python work for your use case? We already have such a request from other clients and it's on our TODO list.
        Nikola Goranov
        Chaos Developer

        Comment


        • #5
          Originally posted by npg View Post
          Would a general scripting language like Python work for your use case? We already have such a request from other clients and it's on our TODO list.
          Sure, that is also an option. We work generally in c# but Python is also a possibility.

          Comment


          • #6
            From moving walls to switching furniture, materials, colors, scenes and so on. If we could do this through max while in Live Link mode where we in max switch layers, add materials etc. and then Vantage give an instruction to render it to a path then we could upload the image to the web again.
            From what I understand, the only piece that's missing here is the ability to send Vantage a command (while the live link is running) to render to a specific path.

            All the other stuff you mentioned is something that should be possible with max script already, I guess ?

            Greetings,
            Vladimir Nedev
            Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

            Comment


            • #7
              Originally posted by vladimir.nedev View Post

              From what I understand, the only piece that's missing here is the ability to send Vantage a command (while the live link is running) to render to a specific path.

              All the other stuff you mentioned is something that should be possible with max script already, I guess ?

              Greetings,
              Vladimir Nedev
              Hi Vladimir, if that's already possible how can we adress live link then? Which commands does Live Link use now in 3Ds max? And if we can mimic the animation render button with only one frame it's going in the direction of what we have in mind.

              Comment


              • #8
                I mean all the stuff you mentioned about changing the scene through script is not specific to Vantage or even V-Ray.
                You just execute some (max script) commands to change the scene and (I guess) the live link should update.

                Have you tested this ?

                Greetings.
                Vladimir Nedev
                Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

                Comment


                • #9
                  Originally posted by vladimir.nedev View Post
                  I mean all the stuff you mentioned about changing the scene through script is not specific to Vantage or even V-Ray.
                  You just execute some (max script) commands to change the scene and (I guess) the live link should update.

                  Have you tested this ?

                  Greetings.
                  Vladimir Nedev
                  We didn't tested this but I assumed it was possible. But maxscript is not something we are good at, at the moment. A command line approach would be easier to start. But if it's possible with maxscript and we can render from maxscript it is a solution which we can live with.

                  Comment


                  • #10
                    A command line approach would be easier to start.
                    I assume you mean sending commands to Vantage directly (no 3ds Max/V-Ray/live link running) ?
                    It would take quite a bit of time to implement all the possible commands you might want.

                    On the other hand, they should already be possible through max script (or Python scripting in 3ds Max if you prefer that).

                    Greetings,
                    Vladimir Needev
                    Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

                    Comment


                    • #11
                      Originally posted by vladimir.nedev View Post

                      I assume you mean sending commands to Vantage directly (no 3ds Max/V-Ray/live link running) ?
                      It would take quite a bit of time to implement all the possible commands you might want.

                      On the other hand, they should already be possible through max script (or Python scripting in 3ds Max if you prefer that).

                      Greetings,
                      Vladimir Needev
                      So if I understand it correct, it is possible to give with maxscript a render command to vantage with a custom outputh path, samples and noise threshold? Is it possible to give an example maxscript code we can test?
                      Then the ony thing we need to do is connecting maxscript as a listener to a front end website.

                      Comment


                      • #12
                        To clarify what Vladimir is saying. 3ds Max allows you to modify the scene through maxscript and Python and V-Ray should detect scene changes while IPR is running (Live link uses IPR) and send them to Vantage. You can do a lot of things this way, but there are some things outside the scope of the Max scene. For example you won't be able to toggle the opacity setting in Vantage and stuff like that.

                        Then we have a command that we use for the "render animation" button in the Vantage toolbar in Max, which internally uses maxscript and communicates with vantage.exe over localhost HTTP protocol. You could use this to start a render, though it may be a bit tricky to use (maxscript is not made for asynchronous code). It is was not intended for use directly by end users, but it might work for you...
                        Nikola Goranov
                        Chaos Developer

                        Comment


                        • #13
                          Originally posted by npg View Post
                          To clarify what Vladimir is saying. 3ds Max allows you to modify the scene through maxscript and Python and V-Ray should detect scene changes while IPR is running (Live link uses IPR) and send them to Vantage. You can do a lot of things this way, but there are some things outside the scope of the Max scene. For example you won't be able to toggle the opacity setting in Vantage and stuff like that.

                          Then we have a command that we use for the "render animation" button in the Vantage toolbar in Max, which internally uses maxscript and communicates with vantage.exe over localhost HTTP protocol. You could use this to start a render, though it may be a bit tricky to use (maxscript is not made for asynchronous code). It is was not intended for use directly by end users, but it might work for you...
                          Yeah, this could work. The opacity mode we can enable by hand after the live link is initialised. What is the code snippet you use with the render animation button so we can test it?

                          Comment


                          • #14
                            The relevant script is: C:\Program Files\Chaos Group\Vantage\dcc_scripts\3dsMax\Vantage-UtilityFunctions.ms (again, this is not a public API)

                            Basically the command is a JSON object (text) which is sent as the body of a HTTP POST request.

                            You can use or imitate the code in VRayVantage_startVantageSequence (which in turn calls VRayVantage_sendVantageCommand). It requires that live link is already running, of course. If you want to also make the script wait for this to finish it gets a lot more complicated though.

                            Noise threshold is not currently one of the command parameters, so it has to be set in advance in Vantage. (And opacity was just an example, there are many render settings, post-processing settings, etc. that you can't control through a http command or through live link currently).
                            Nikola Goranov
                            Chaos Developer

                            Comment


                            • #15
                              Originally posted by npg View Post
                              The relevant script is: C:\Program Files\Chaos Group\Vantage\dcc_scripts\3dsMax\Vantage-UtilityFunctions.ms (again, this is not a public API)

                              Basically the command is a JSON object (text) which is sent as the body of a HTTP POST request.

                              You can use or imitate the code in VRayVantage_startVantageSequence (which in turn calls VRayVantage_sendVantageCommand). It requires that live link is already running, of course. If you want to also make the script wait for this to finish it gets a lot more complicated though.

                              Noise threshold is not currently one of the command parameters, so it has to be set in advance in Vantage. (And opacity was just an example, there are many render settings, post-processing settings, etc. that you can't control through a http command or through live link currently).
                              We finally got it working, thanks npg!!!

                              The time the image updates is a bit slow (about 7 seconds in total) but we could make this faster if the export is an JPG file (faster saving, upload an download).Triggering the save screenshot button after say 1 second of rendering could also speed up things. Besides this, if we could send the instructions directly to Vantage this would also save us some seconds.

                              So hopefully all of this will be possible in the future because then the possibilities could be endless.

                              You can try our demo here:
                              https://xr-group.nl/Apps/CloudRender...d_PKVantage_2/

                              Comment

                              Working...
                              X