Author Topic: Bitmap shader conversion scripts  (Read 9428 times)

2024-06-25, 10:45:48
Reply #15

John_Do

  • Active Users
  • **
  • Posts: 195
    • View Profile
Hey, thanks for the reminder and the interest. I didn't have much time to spend on it lately, I have to get back to it !

2024-07-06, 09:35:06
Reply #16

billycoopdraws

  • Active Users
  • **
  • Posts: 13
    • View Profile
Thank You John !!!
You are APPRECIATED !!!

2024-07-10, 10:38:53
Reply #17

m4drid

  • Active Users
  • **
  • Posts: 19
    • View Profile
Hey, when are you going to release this plugin, it's really, really, really good!

2024-08-07, 08:22:49
Reply #18

iamjens

  • Active Users
  • **
  • Posts: 6
    • View Profile
    • iamjens.net
Very useful. Please keep working on it. Thanks!

2024-10-23, 14:15:32
Reply #19

John_Do

  • Active Users
  • **
  • Posts: 195
    • View Profile
I'm back on the project, I'd like to finish it before the end of the year.

I got motivated again by writing a new command. I don't know why I didn't come up with the idea sooner since I know the ins and outs of Corona Materials for a while now.



Not perfect yet - it breaks with some textures sets - but in the end it will allow you to load pretty much any texture set from any vendor, as long as it follows loosely the PBR convention.


2024-10-28, 11:14:36
Reply #20

mlon

  • Active Users
  • **
  • Posts: 49
    • View Profile
Yai for motivation! :)

2024-10-31, 14:30:22
Reply #21

frv

  • Active Users
  • **
  • Posts: 419
    • View Profile
Tx, You have a good sense of automating the tedious work involved setting up materials. This is AI on a small but important scale. Especially for those among us who render for a living. So much of the work is unnecessarily repetitive.

I am sure years from now we shoot a few photos and the render app just sort the materials out itself. D5 already does that with the sky and sunlight. Magnific AI has some of that too. It may not even take years.

2024-11-01, 11:14:53
Reply #22

John_Do

  • Active Users
  • **
  • Posts: 195
    • View Profile
Tx, You have a good sense of automating the tedious work involved setting up materials. This is AI on a small but important scale. Especially for those among us who render for a living. So much of the work is unnecessarily repetitive.

That's exactly why I'm working on this toolset, because using Blender next to C4D every day made me feel that the node editor could greatly benefit from some love. Unfortunately there's only so much I can do, I had a bit of help from the devs to get started  but apart from that Corona doesn't offer any documentation for Python scripting and even so, I don't have access to everything through the Python API.

I've made a bit of progress on the tools but I'm struggling with the Shared Shader, which is designed to work around the fact that a node in Cinema 4D can't have multiple parents (so a shader output can't be connected to several nodes by design). I'm talking about the classic Cinema 4D materials here, C4D Nodes Materials are something else entirely.

So it kind of works : the shaders are linked and work, but the node links aren't displayed properly. It could be ok if it was a one-time thing but unfortunately, the links disappear each time the node graph is refreshed ( like when copy-pasting a material to a new scene, or dropping the material in a new node editor view).






2024-11-30, 18:57:06
Reply #23

Karen1231

  • Users
  • *
  • Posts: 2
    • View Profile
Hi!Jhon!thank you very much for those excellent scripts! I have also been experimenting with scripting for Corona recently, but I couldn’t find a way to get the selected shader nodes in the C4D SDK. (At the moment, I can only obtain the node by using special same name for all the needed nodes, but this method is very cumbersome.) Not to mention that Corona does not seem to provide any SDK.However, I noticed that your script has an operation to obtain the selected nodes. I would like to ask how this is achieved, and I hope to get some tips.
Again, thanks so much!

2024-12-04, 15:12:25
Reply #24

John_Do

  • Active Users
  • **
  • Posts: 195
    • View Profile
Hi!Jhon!thank you very much for those excellent scripts! I have also been experimenting with scripting for Corona recently, but I couldn’t find a way to get the selected shader nodes in the C4D SDK. (At the moment, I can only obtain the node by using special same name for all the needed nodes, but this method is very cumbersome.) Not to mention that Corona does not seem to provide any SDK.However, I noticed that your script has an operation to obtain the selected nodes. I would like to ask how this is achieved, and I hope to get some tips.
Again, thanks so much!

Hi,

Ales ( Corona C4D dev ) showed me how to access the nodal editor, nodes are stored under each node editor view, in a dedicated scene hook.

Code: [Select]
# Access the Corona Node Material Scene Hook
nh = c4d.documents.GetActiveDocument().FindSceneHook(1040750)

# Get the branches containing the nodes
branches = nh.GetBranchInfo(0)

# Get the CNodeSystemViews node that contains the node editor views
for i in branches :
            if i.get('id') == 1040910:
                view = i.get('head')
                views = view.GetChildren()
                return views
        return None

# Then you can navigate in views and node widgets like with any object based on c4d.GeListNode.

# Rename the first view
views[0].SetName("First View")

# Get the first node
views[0].GetDown()

All node widgets are stored under a view. Shaders are either parented to a material if inserted into one, or under the scene hook if free from any parent in the node editor.

Some general instructions like the ones above would be nice to find in the documentation, but IMO a SDK is not necessary since the Corona devs followed as much as possible the "native implementation" described by the C4D SDK. If you know your way around the C4D API, you know how to deal with most things.

Hope it helps

2024-12-05, 17:59:22
Reply #25

Karen1231

  • Users
  • *
  • Posts: 2
    • View Profile
Thank you so much for the code!It's very helpful!