If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
New! You can now log in to the forums with your chaos.com account as well as your forum account.
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.
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 ?
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.
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.
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.
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).
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.
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...
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?
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).
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.
Comment