KeyShot Forum

Technical discussions => Extending KeyShot => Scripting => Topic started by: honeysharma_jpr on September 09, 2018, 06:20:26 AM

Title: Script for Multiple ColorWays help - Render Layers
Post by: honeysharma_jpr on September 09, 2018, 06:20:26 AM
Hey,

I use Keyshot for stunning renderings, but I got stuck in a situation with ColorWays script editing as I am trying to get 250 objects rendered with 10 different material templates with 2 different cameras.

Like the following:-
1. Open the .bip file with Render Layers assigned to the Model Set.
2. Apply Material Template to the Model Set.
3. Get the camera and lighting preset from the scene.
4. Render the .png file with the Specified render options to the specified location with Render Layers, As Render Layers is needed for compositing.

Please help, Thanks in Advance.
Title: Re: Script for Multiple ColorWays help - Render Layers
Post by: INNEO_MWo on September 09, 2018, 10:42:51 AM
And doesn't it work like the script from Will Gibbons (and Luxion team) that can be found in the blog?
It contains a documentation as well.



https://blog.keyshot.com/keyshot-scripting-tutorial-automate-your-rendering (https://blog.keyshot.com/keyshot-scripting-tutorial-automate-your-rendering)

Maybe that helps. Sorry, I am not a program guy.


Cheers
Marco
Title: Re: Script for Multiple ColorWays help - Render Layers
Post by: Morten Kristensen on September 10, 2018, 08:10:04 AM
Hi honeysharma_jpr,

You will have to write an actual question about what is not working for you.
I just tried your script and it seems to render things fine, assuming that material templates have already been setup, of course.

Regarding color ways, you cannot script this yet, I'm afraid. It would make more sense to create a Configurator with all your various scenes, cameras, and materials, and render all variations via the UI.

I hope this helps.
Title: Re: Script for Multiple ColorWays help - Render Layers
Post by: honeysharma_jpr on September 10, 2018, 09:00:25 AM
Hey MWo, Thanks for the reply. I already got the script from the link and modified it according to my use. Me too also a newbie.

Hey Morten,

Thanks for correcting, I am not that good in English.

I later experimented with the script and got the result, PFA for the modified version.

I needed that:-
1. Manually open keyshot file with objects, lights and camera setup with Render Layers Assign
2. Render it through the script for multiple material templates along with the assigned Render Layers

I came to get the results,

But now in the attached script as u can see that I don't want the import option as I am directly opening the file manually.

I require the rest options. Lot of Thanks again.
Title: Re: Script for Multiple ColorWays help - Render Layers
Post by: Morten Kristensen on September 11, 2018, 05:28:25 AM
You are welcome, Amit, and don't worry about the English. I understand it just fine.

What version of KeyShot are you using? You can first assign/manipulate render layers in v8. But otherwise you can do what you want to do.
Take a look at lux.openFile() at https://www.keyshot.com/scripting/doc/7.3/lux.html (https://www.keyshot.com/scripting/doc/7.3/lux.html). I saw it was not fully specified in your script file.

Thanks.
Title: Re: Script for Multiple ColorWays help - Render Layers
Post by: honeysharma_jpr on September 12, 2018, 08:57:25 AM
Hey Morten,

I use v7 of keyshot.

I got the render layers as in multiple no of render outputs, But there is a box of import file that is no longer be used, I just need to remove the import option.
Title: Re: Script for Multiple ColorWays help - Render Layers
Post by: Morten Kristensen on September 12, 2018, 12:04:34 PM
Hi again,
I'm not complete sure I understand what you mean, but take a look at https://keyshot.com/scripting/doc/7.3/lux.html (https://keyshot.com/scripting/doc/7.3/lux.html) for the doc about importFile(). You can tweak how it works.
Hope that helps.
Title: Re: Script for Multiple ColorWays help - Render Layers
Post by: honeysharma_jpr on September 18, 2018, 09:30:39 AM
Thanks for the Replies,

This is a little issue, rest my script is giving me output as I want.

Great then.
:D