Jump to content

c4d cam to houdini


hatrick

Recommended Posts

Hi there,

Any ideas on how to get a cinema4d camera into houdini and vice versa?

Thanks a lot

HT

I made a year ago an expresso for export in xml file the c4d camera.

After that, i made a digital asset in python to recreate the c4d camera.

All animated channels are include in the xml.

I have not time this week for help you but a friend will answer you.

Francois

Link to comment
Share on other sites

I made a year ago an expresso for export in xml file the c4d camera.

After that, i made a digital asset in python to recreate the c4d camera.

All animated channels are include in the xml.

I have not time this week for help you but a friend will answer you.

Francois

Yes, the process involves writing out the frames via Xpresso to an XML file and importing that file into Houdini via Francois's Python DA.

I have to find out if the original creator of the Xpresso node is ok with us sharing it online. Let me ask him.

Another possibility comes to mind is Collada, but I'm not sure it allows camera transfer?

Alex

Link to comment
Share on other sites

Yes, the process involves writing out the frames via Xpresso to an XML file and importing that file into Houdini via Francois's Python DA.

I have to find out if the original creator of the Xpresso node is ok with us sharing it online. Let me ask him.

Another possibility comes to mind is Collada, but I'm not sure it allows camera transfer?

Alex

So Base80 (www.base80.com) was kind enough to share his Xpresso. And Francois was kind enough to share his Python.

Here is the way it works

1/Create an empty text file with a .xml extension

2/The Xpresso is in the C4d file. Check the user data and specify the output text file (the one you created) and the frame range

3/MAKE SURE C4d is only playing the timeline ONCE. No ping pong or loop

4/Go to frame 0 and hit play

5/The XML file has all the necessary info. Make sure that there is not an extra line at the end of the file. It has to finish with a single </ch>, and not two lines with </ch>

6/In Houdini, install the OTL

7/In a Geo node, put the DA and point to the XML file

8/Once the script has run, a camera will be created at Obj level, with the same name as the one it has in C4d, with all the same params.

Let us know if it works!

Thanks

Alex

CamToHoudini.zip

Link to comment
Share on other sites

So Base80 (www.base80.com) was kind enough to share his Xpresso. And Francois was kind enough to share his Python.

Here is the way it works

1/Create an empty text file with a .xml extension

2/The Xpresso is in the C4d file. Check the user data and specify the output text file (the one you created) and the frame range

3/MAKE SURE C4d is only playing the timeline ONCE. No ping pong or loop

4/Go to frame 0 and hit play

5/The XML file has all the necessary info. Make sure that there is not an extra line at the end of the file. It has to finish with a single </ch>, and not two lines with </ch>

6/In Houdini, install the OTL

7/In a Geo node, put the DA and point to the XML file

8/Once the script has run, a camera will be created at Obj level, with the same name as the one it has in C4d, with all the same params.

Let us know if it works!

Thanks

Alex

i ve some problems:

the whole process works with the c4d file you ve attached ! NICE! but since i ve no idea of python and expresso i can`t translate the expresso to another scene. i saved the tag as a preset and when reloded in a new scene the xml is not readable by houdini. is there something else to set up in the cinema scene in adition to the expresso tree?

thx !

HT

Link to comment
Share on other sites

i ve some problems:

the whole process works with the c4d file you ve attached ! NICE! but since i ve no idea of python and expresso i can`t translate the expresso to another scene. i saved the tag as a preset and when reloded in a new scene the xml is not readable by houdini. is there something else to set up in the cinema scene in adition to the expresso tree?

thx !

HT

here is the xml houdini has problems with .... it seems the expressotree gets problems when changing the framerange ... everything up to 60 (as set in the original example file) with fps set to 30 works.

the file attached has a framerate of 25 and a range from o to 100 set in cinematag and houdini only creates a camera with error keyframes up to 60

frames...

jjkkll.xml

Link to comment
Share on other sites

i ve some problems:

the whole process works with the c4d file you ve attached ! NICE! but since i ve no idea of python and expresso i can`t translate the expresso to another scene. i saved the tag as a preset and when reloded in a new scene the xml is not readable by houdini. is there something else to set up in the cinema scene in adition to the expresso tree?

thx !

HT

Copy and Paste the camera in the cinema 4d file to your file. Then drag Xpresso tag on your camera.

Double click on xpresso tag and check if there is not 'undefined port'. C4D makes some troubles when copy an xpresso from a file to another.

Perhaps, you need to retry more times.

You said, Houdini can't read the xml file ? Check permissions on the XML file or path. see my next reply...

Edited by fsim
Link to comment
Share on other sites

I checked you xml file and is not good.

You must define the range in C4D preview and play the timeline only ONCE but play to the end of preview.

Your xml file isn't finished. I think you played only a few frames but you NEED play to the end.

Base80 xpresso write the end of XML when the frame is the end of preview.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...