Author Topic: Script for Multiple ColorWays help - Render Layers  (Read 3125 times)

0 Members and 1 Guest are viewing this topic.

Offline honeysharma_jpr

  • Newbie
  • *
  • Posts: 4
Script for Multiple ColorWays help - Render Layers
« 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.

Offline MWo

  • Hero Member
  • *****
  • Posts: 753
  • Senior Technical Consultant @ INNEO (Germany)
    • german KeyShot page from INNEO Solutions
Re: Script for Multiple ColorWays help - Render Layers
« Reply #1 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

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


Cheers
Marco

Offline Morten Kristensen

  • root
  • Administrator
  • Full Member
  • *****
  • Posts: 128
  • Software Engineer, Luxion
Re: Script for Multiple ColorWays help - Render Layers
« Reply #2 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.

Offline honeysharma_jpr

  • Newbie
  • *
  • Posts: 4
Re: Script for Multiple ColorWays help - Render Layers
« Reply #3 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.

Offline Morten Kristensen

  • root
  • Administrator
  • Full Member
  • *****
  • Posts: 128
  • Software Engineer, Luxion
Re: Script for Multiple ColorWays help - Render Layers
« Reply #4 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. I saw it was not fully specified in your script file.

Thanks.

Offline honeysharma_jpr

  • Newbie
  • *
  • Posts: 4
Re: Script for Multiple ColorWays help - Render Layers
« Reply #5 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.

Offline Morten Kristensen

  • root
  • Administrator
  • Full Member
  • *****
  • Posts: 128
  • Software Engineer, Luxion
Re: Script for Multiple ColorWays help - Render Layers
« Reply #6 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 for the doc about importFile(). You can tweak how it works.
Hope that helps.

Offline honeysharma_jpr

  • Newbie
  • *
  • Posts: 4
Re: Script for Multiple ColorWays help - Render Layers
« Reply #7 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