Baking Groups

Rhino 3D (Export script developed by SamPage; Integrated Plugin developed by Paul Kinnane)

Moderator: face_off

newske
Licensed Customer
Posts: 126
Joined: Sat Nov 03, 2012 11:51 pm

Hi Paul,
I'm trying to bake a very simple scene with multiple objects - each is to have their own baking group and texture.
The first group/object bakes correctly - with baking group 1.
However the other objects appear black when attempting to render out their baking groups.
sc2.JPG
Likely I am just inexperienced and have missed something - have you any ideas?

Also - is there a way to automate rendering of all the baking groups? (This could be done by storing a list of rendertargets and switching to them, but it's pretty inconvenient)

Cam
Octane for Rhino | Windows 8.1 x64 | i7-3820 OC | GTX970 4GB OC & GTX 560 Ti 1GB OC | 32GB DDR3
User avatar
face_off
Octane Plugin Developer
Posts: 15696
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

I'm trying to bake a very simple scene with multiple objects - each is to have their own baking group and texture.
The first group/object bakes correctly - with baking group 1.
However the other objects appear black when attempting to render out their baking groups.
Have you select Baking Group 2 in the Baking Camera?
Also - is there a way to automate rendering of all the baking groups? (This could be done by storing a list of rendertargets and switching to them, but it's pretty inconvenient)
There is not currently an automated way to do this, however it could probably be done via a python script using the Octane plugin python API.

Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
newske
Licensed Customer
Posts: 126
Joined: Sat Nov 03, 2012 11:51 pm

face_off wrote:Have you select Baking Group 2 in the Baking Camera?
Yes - baking group 2 was selected both in the rendertarget (Baking Camera) and the object (live update and baking group). The same applies for baking group 3.

I've attached the Rhino file if it's of any use. Perhaps it's something specific to my setup (I also get an error, 'failed to save scene', however it doesn't crash, I just have to click OK. This is unrelated to the baking issues and occurs on most renderings)

Cheers
Cam
Attachments
sc.7z
(28.16 KiB) Downloaded 302 times
Octane for Rhino | Windows 8.1 x64 | i7-3820 OC | GTX970 4GB OC & GTX 560 Ti 1GB OC | 32GB DDR3
User avatar
face_off
Octane Plugin Developer
Posts: 15696
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

Yes - baking group 2 was selected both in the rendertarget (Baking Camera) and the object (live update and baking group). The same applies for baking group 3.
All objects in the scene are assigned to baking group 3, and when I select baking group 3 in the camera, they render correctly.
(I also get an error, 'failed to save scene', however it doesn't crash, I just have to click OK. This is unrelated to the baking issues and occurs on most renderings
Do you have write-access to the folder you are saving to? Try running Rhino as Administrator to test.

Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
newske
Licensed Customer
Posts: 126
Joined: Sat Nov 03, 2012 11:51 pm

face_off wrote:All objects in the scene are assigned to baking group 3, and when I select baking group 3 in the camera, they render correctly.
Ah.. I found the solution. Whilst I had changed them to be individual baking groups, I had 'No Meshes Live' selected in the options....
face_off wrote: (I also get an error, 'failed to save scene', however it doesn't crash, I just have to click OK. This is unrelated to the baking issues and occurs on most renderings
Do you have write-access to the folder you are saving to? Try running Rhino as Administrator to test.
This was occurring during rendering, not just when actually saving the image. However turning off the progressive save also seems to have fixed this one.
And it was trying to save to a folder that did not exist, which is presumably what was causing it.

Many thanks as always for this prompt responses Paul!

Cam
Octane for Rhino | Windows 8.1 x64 | i7-3820 OC | GTX970 4GB OC & GTX 560 Ti 1GB OC | 32GB DDR3
newske
Licensed Customer
Posts: 126
Joined: Sat Nov 03, 2012 11:51 pm

Here's a quick script using the python API to automate the baking groups... (The forum won't let me post any python script...)
It works well, but any tips regarding API usage would be welcome. The main thing was that it needs a wait time to ensure that the scene is properly updated and the sample count is properly reset, otherwise it double-saves each image before reloading (and hence skips every second one) - line 37.
batchbake.JPG
Octane for Rhino | Windows 8.1 x64 | i7-3820 OC | GTX970 4GB OC & GTX 560 Ti 1GB OC | 32GB DDR3
User avatar
face_off
Octane Plugin Developer
Posts: 15696
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

Looks great!

You can paste code using the 'Code' button when typing your message.

Your code looks fine. You may not need the RestartRendering (since the UpdateChangeManager will do that). And do you need the 10 sec sleep?

Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
newske
Licensed Customer
Posts: 126
Joined: Sat Nov 03, 2012 11:51 pm

face_off wrote:And do you need the 10 sec sleep?
Some sleep is necessary - the 10 sec is overkill just to be safe. Probably one or two seconds is fine, but when leaving something overnight to render I'd rather be safe!
That wait is there to ensure that it doesn't check the sample count before Octane has actually loaded (rendered and update the first sample) of the next bake. If it's not long enough (and the load time is slow for a complex scene and 4K texture) then it will occasionally save the same frame twice (checks sample count, sample count hasnt updated, so it reads that it's completed the sample amount and saves twice, essentially skipping a render).
face_off wrote:You can paste code using the 'Code' button when typing your message.
I get this error trying to post python code, either in a

Code: Select all

 block or as an attached file:

[quote]This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.[/quote]
Octane for Rhino | Windows 8.1 x64 | i7-3820 OC | GTX970 4GB OC & GTX 560 Ti 1GB OC | 32GB DDR3
User avatar
face_off
Octane Plugin Developer
Posts: 15696
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

Testing.....

Code: Select all

Here is some code
Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
User avatar
face_off
Octane Plugin Developer
Posts: 15696
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

With your permission....if you can post a ZIP file containing the python code (add yourself as the auther), I will add it to the OctaneRender for Rhino manual for other users reference.

Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
Post Reply

Return to “Rhinoceros 3D”