Hello,


Great product you have here... I study the neuroscience of vision; specifically, scene processing. I wrote a script in Ruby to randomly generate rooms (bathroom, kitchen, etc.), which I want to post-process using nxtRender. Is there a routine that I can add to my code in order to automate the rendering process, i.e. render each picture at Sketchup native space, with HD lighting, and a render cycle lasting 20 loops? At the moment, I'm using AutoIt (a macro) to automate this process, which is, to say the least, underwhelming. 

Thanks,


Drew

Views: 209

Reply to This

Replies to This Discussion

The easiest way to set the rendering settings - Lighting defaults,  passes, etc. - is to set them for an empty SketchUp model,save that model,  and then use that model as a "template" for your new SketchUp drawing - or load that saved model, and then modify it for your rooms, etc.

To start the rendering from Ruby, you can put this command in your ruby:

    $irnxt.start_rendering("all")

If this dialog comes up before the rendering, just make sure the checkbox to load it is unchecked.

You can also include this in your ruby to suppress it:

    $irnxt.set_global_bool("bir_show_rendering_dialog", false)

Finally, you will probably want it to automatically save the rendered image when you are done.

To do this, add:

    $irnxt.set_global_bool("bir_use_auto_image", true)

And add one or more of these depending on what you want to do after the image is saved:

(Set to false to do the opposite)

To load a dialog to ask you what to do with the image:

    $irnxt.set_global_bool("bir_prompt_when_image_done", true)

To load the image into a paint program:

    $irnxt.set_global_bool("bir_launch_when_image_done", true)

To close the rendering window when done:

    $irnxt.set_global_bool(bir_close_window_when_image_done", true)

You can test all of these commands from the ruby console to make sure you have them right.

Let me know if there are other things you would like to do from a ruby script.

Wow, this is fantastic. I'll work with this and get back to you if there's anything else. Thanks.

One more quick question-- is there a source for documentation on the irnxt globals?

Drew Linsley said:

Wow, this is fantastic. I'll work with this and get back to you if there's anything else. Thanks.

no. I can help you as you decide what you need to do.

But we do not have a API or other way to do much programmatically.



Drew Linsley said:

One more quick question-- is there a source for documentation on the irnxt globals?

Drew Linsley said:

Wow, this is fantastic. I'll work with this and get back to you if there's anything else. Thanks.

Fair enough. Can you provide me with the globals to set number of passes for a rendering (or alternatively, number of seconds for a render) and the desired resolution for a final render?

Thanks,

Drew

Al Hart said:

no. I can help you as you decide what you need to do.

But we do not have a API or other way to do much programmatically.



Drew Linsley said:

One more quick question-- is there a source for documentation on the irnxt globals?

Drew Linsley said:

Wow, this is fantastic. I'll work with this and get back to you if there's anything else. Thanks.

Are you planning to use the same values for most renderings?

If so, the set he values, and then save them n a database which you use as your template or as the base for each new database you create. Then the values will be preset. This is th best way to make most settings.

Also, on the "more" setup tab there is. Button to save the current settings as the user default settings. If this works properly you should be able to make settings and they will be used for new models. Try it out.

There is also a way on the more tab to save settings in a file. If that will work for you I can send you the Rubty to load a settings file. With a little Reverse Engineering you can probably future out how to alter most settings.

Reply to Discussion

RSS

About

Render Plus created this Ning Network.

Search


Enter a phrase here to search the entire Render Plus web site:

Loading

Translate

© 2024   Created by Render Plus.   Powered by

Badges  |  Report an Issue  |  Terms of Service