Page 1 of 2
Baking Groups
Posted: Tue Aug 30, 2016 2:59 am
by newske
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.
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
Re: Baking Groups
Posted: Tue Aug 30, 2016 4:28 am
by face_off
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
Re: Baking Groups
Posted: Tue Aug 30, 2016 5:06 am
by newske
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
Re: Baking Groups
Posted: Tue Aug 30, 2016 11:32 am
by face_off
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
Re: Baking Groups
Posted: Tue Aug 30, 2016 11:40 pm
by newske
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
Re: Baking Groups
Posted: Wed Aug 31, 2016 1:46 am
by newske
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.
Re: Baking Groups
Posted: Wed Aug 31, 2016 4:00 am
by face_off
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
Re: Baking Groups
Posted: Wed Aug 31, 2016 6:19 am
by newske
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]
Re: Baking Groups
Posted: Wed Aug 31, 2016 6:37 am
by face_off
Re: Baking Groups
Posted: Wed Aug 31, 2016 6:39 am
by face_off
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