Object Animated Render Baker options not showing up in Render->Bake, with Cycles engine #45879

Closed
opened 2015-08-23 07:59:03 +02:00 by Edward Gabriel Rowlett-Barbu · 17 comments

System Information
Windows 10, NVidia GTX760

Blender Version
Broken: 2.75a
Worked: (optional)

The options for the animated render bake plugin do not show up. Expected to see frame interval selection controls, but nothing changed in the bake interface since enabling the plugin.

Exact steps for others to reproduce the error
Enable the plugin from the Add-ons menu in user preferences.
Options do not show up in Render->Bake

**System Information** Windows 10, NVidia GTX760 **Blender Version** Broken: 2.75a Worked: (optional) The options for the animated render bake plugin do not show up. Expected to see frame interval selection controls, but nothing changed in the bake interface since enabling the plugin. **Exact steps for others to reproduce the error** Enable the plugin from the Add-ons menu in user preferences. Options do not show up in Render->Bake

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @Zadirion

Added subscriber: @Zadirion

I just noticed, this is true for Cycles rendering only. This is very useful to be available in cycles because of the new Open Shading Language integration. I am creating procedural textures and need them baked to animated textures.

I just noticed, this is true for Cycles rendering only. This is very useful to be available in cycles because of the new Open Shading Language integration. I am creating procedural textures and need them baked to animated textures.

Added subscribers: @meta_test, @mont29

Added subscribers: @meta_test, @mont29

The problem here is that this addon is rather old, don’t think we have any maintainer for it currently. @meta_test, maybe the best thing for now would be to disable that addon outside of BI context?

The problem here is that this addon is rather old, don’t think we have any maintainer for it currently. @meta_test, maybe the best thing for now would be to disable that addon outside of BI context?
Bastien Montagne changed title from Object Animated Render Baker options not showing up in Render->Bake to Object Animated Render Baker options not showing up in Render->Bake, with Cycles engine 2015-08-23 12:08:56 +02:00
Janne Karhu was assigned by Bastien Montagne 2015-08-23 12:08:56 +02:00

Added subscriber: @BrendonMurphy

Added subscriber: @BrendonMurphy
Member

Removed subscriber: @meta_test

Removed subscriber: @meta_test
Member

@Janne Karhu (jhk)
Hi, I'm not familiar with this addon, or more specifically if it would work with cycles, or if indeed it works properly now. I did however add some simple code to have the buttons show in cycles bake window.
http://www.pasteall.org/60677/python
If you would be able to test both cycles & blender render modes (using different test files) & report back the status, we can then decide how to proceed.
Thanks.

@Janne Karhu (jhk) Hi, I'm not familiar with this addon, or more specifically if it would work with cycles, or if indeed it works properly now. I did however add some simple code to have the buttons show in cycles bake window. http://www.pasteall.org/60677/python If you would be able to test both cycles & blender render modes (using different test files) & report back the status, we can then decide how to proceed. Thanks.

Hello. I managed to modify the script to work with cycles for my own purpose. So it can, indeed work with cycles. It would be a shame if you removed the addon. It is a good addon, and useful in cycles if you are rendering animated effects.

Hello. I managed to modify the script to work with cycles for my own purpose. So it can, indeed work with cycles. It would be a shame if you removed the addon. It is a good addon, and useful in cycles if you are rendering animated effects.

object_animrenderbake.py

I attached the modified script to handle cycles. I did not test it with blender rederer, only cycles, but I hope this is a step forward for you

[object_animrenderbake.py](https://archive.blender.org/developer/F227130/object_animrenderbake.py) I attached the modified script to handle cycles. I did not test it with blender rederer, only cycles, but I hope this is a step forward for you

@Zadirion do not really understand those differences between BI and Cycles renderers? For now, will go by @BrendonMurphy patch, see no reason for it not to work OK (aside from the fact that Cycles baking is currently broken in master, but that’s another story ;) ).

@Zadirion do not really understand those differences between BI and Cycles renderers? For now, will go by @BrendonMurphy patch, see no reason for it not to work OK (aside from the fact that Cycles baking is currently broken in master, but that’s another story ;) ).

This issue was referenced by 6842550237

This issue was referenced by 6842550237fc07155aff9712d8f3bb3f1925de9f

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

@Bastien Montagne (mont29) that fix is not sufficient. Because of the material nodes Cycles uses, the plugin will not be able to find the target image to render to.
Basically, this code here will fail, and you will be greeted with the error "No valid image found to bake to", when trying to bake.

for uvtex in context.active_object.data.uv_textures:
                if uvtex.active_render == True:
                    for uvdata in uvtex.data:
                        if uvdata.image is not None:
                            img = uvdata.image
                            break

You will instead have to search the material node tree and find an image texture node to take the image from.

Also, if you are using cycles, you will want to call the bpy.ops.object.bake() operator which is cycle's operator and will use the bake type you set for cycles, instead of bpy.ops.object.bake_image() operator, which is blender internal's bake and will disregard the bake type setting you set in the cycles bake interface and use the blender one instead.

@Bastien Montagne (mont29) that fix is not sufficient. Because of the material nodes Cycles uses, the plugin will not be able to find the target image to render to. Basically, this code here will fail, and you will be greeted with the error "No valid image found to bake to", when trying to bake. ``` for uvtex in context.active_object.data.uv_textures: if uvtex.active_render == True: for uvdata in uvtex.data: if uvdata.image is not None: img = uvdata.image break ``` You will instead have to search the material node tree and find an image texture node to take the image from. Also, if you are using cycles, you will want to call the bpy.ops.object.bake() operator which is cycle's operator and will use the bake type you set for cycles, instead of bpy.ops.object.bake_image() operator, which is blender internal's bake and will disregard the bake type setting you set in the cycles bake interface and use the blender one instead.

Because of the material nodes Cycles uses, the plugin will not be able to find the target image to render to.
Basically, this code here will fail, and you will be greeted with the error "No valid image found to bake to", when trying to bake.

Arg! This should be wrong (that code uses the texture assigned to a given UVLayer, which is totally engine-agnostic (and isn’t used either by BI nor Cycles actually). Imho this is and remains by far the best way to automatically select an image to bake into.). Unfortunately, reading C code it is right currently, "new shading" only cares for active tex node to get an image to write into…

Also, if you are using cycles, you will want to call the bpy.ops.object.bake() operator which is cycle's operator and will use the bake type you set for cycles, instead of bpy.ops.object.bake_image() operator, which is blender internal's bake and will disregard the bake type setting you set in the cycles bake interface and use the blender one instead.

That’s correct actually - though bpy.ops.object.bake is not Cycles-only, it’s the new generic bake API, should work with BI as well… but it doesn’t really - that’s really crappy. :(

Anyway, now I understand your patch better, thanks for it, will apply with a few changes (the way you get image from nodes is not ideal, will try mimic nodeGetActiveTexture() as best as possible).

> Because of the material nodes Cycles uses, the plugin will not be able to find the target image to render to. > Basically, this code here will fail, and you will be greeted with the error "No valid image found to bake to", when trying to bake. Arg! This should be wrong (that code uses the texture assigned to a given UVLayer, which is totally engine-agnostic (and isn’t used either by BI nor Cycles actually). Imho this is and remains by far the best way to automatically select an image to bake into.). Unfortunately, reading C code it is right currently, "new shading" only cares for active tex node to get an image to write into… > Also, if you are using cycles, you will want to call the bpy.ops.object.bake() operator which is cycle's operator and will use the bake type you set for cycles, instead of bpy.ops.object.bake_image() operator, which is blender internal's bake and will disregard the bake type setting you set in the cycles bake interface and use the blender one instead. That’s correct actually - though `bpy.ops.object.bake` is not Cycles-only, it’s the new generic bake API, should work with BI as well… but it doesn’t really - that’s really crappy. :( Anyway, now I understand your patch better, thanks for it, will apply with a few changes (the way you get image from nodes is not ideal, will try mimic nodeGetActiveTexture() as best as possible).

This issue was referenced by 7cde1c98a0

This issue was referenced by 7cde1c98a02c78c26154edf3cef2ef9fd8936ad1

I'm happy to help. Blender has offered me so much these last 8 years, it seems only fair I try to give something back from time to time.

I'm happy to help. Blender has offered me so much these last 8 years, it seems only fair I try to give something back from time to time.
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#45879
No description provided.