Jump to content

Export camera from 3Dmax to Houdini.


Recommended Posts

Confronted with the problem that *.fbx is not imported animated focus camera. Transform imported fine, but the focus is not imported. I wanted to save the animated curve in Graf Editor from 3Dmax and drag it in Houdini, but either it is not possible, or I do not know how. Because animation saves in the format *. xaf, but not in *. chan, etc. Perhaps someone is using both the package and know how to solve this problem?

I do not want to draw the curve each frame by hand in Houdini ...

Help me please ! :o

PS: Sorry, I have bad English.

Link to comment
Share on other sites

I don't use max, but maybe you can copy the focus curve to e.g. a null's y-motion.

Then in Houdini link or copy the motion to camera focus..

Not a pretty solution - but if you're in a pinch.. :)

eetu.

Link to comment
Share on other sites

Hi,

I have a working pipeline but it is complicated. In a few months I might write some code to simplify things but for now it works. Prepare for pain:

The current fbx in houdini does not support animated fov, openly acknowledged in their docs.

You will need these scripts, download from this link:

http://www.sidefx.com/index.php?option=com_wrapper&Itemid=149

The python script seems to crash but the maxscript works. It generates a .clip file for your camera. The bad news: it doesn't work propely for max's target camera, only free cameras. If you have a free camera, run that script. It will generate a CAMERANAME.clip file. For target cameras I wrote a custom maxscript that lets you copy the position/rotation/fov from one camera and makes them keyframes on another camera. I create a new FREE camera and run the script, copying the data from the target camera to the free camera. Then I can export the free camera with the script from the link above.

With your newly created CAMERANAME.clip, open houdini, open chops, place a file node and read the CAMERANAME.clip, append a math chop:

multiply-- 0.01

scope-- CAMERANAME:t? (where CAMERANAME is your camera's name in max)

then append an export chop to the math chop with these settings:

node-- /obj/MYHOUDINICAMERA (path to houdini camera)

path-- focal t? r? (this tells houdini the channel format of the .clip file we are importing)

then click the chop export button to activate the export

You now have a working pipeline.

The right thing to do is to modify that guy's maxscript to multiply the translates by 0.01 before creating the file. I should also integrate that nonsense for getting the target cameras to work inside the script, so it is all automagic.

Make sure your aperature settings are the same from max to houdini.

Cheers

Link to comment
Share on other sites

Thank you for such a detailed explanation !

When encountering this problem, I thought in the same direction as you. I found this script on the sidefx.com and tried to use it the same way as you advised. After your reply I tried again to test it on a primitive in accordance with your instructions. But I have not received a positive result. Yes, the script really gives a curve of FOV, but the values differ from those shown in "Lens" Camera 3Dmax. Look at value "Lens" in 3Dmax and value "Focal Lenght" in Houdini, after exporting in channel "Focal Lenght" chan7 (focal curve from 3Dmax) from CHOP - they are different. Please look the scene, it is possible that I am wrong in something.

Software: Houdini 10, 3Dmax 2008 x64.

Camera to max.rar

Link to comment
Share on other sites

There are many issues with the files you have provided. First of all your geometry is 100 times too big so a correct camera wouldn't line up. The reason The values are screwed up is because that is a .chan file so the export would look something like: frame tx ty tz rx ry rz focal, but you would have to delete focal and just do: t? r? focal. But even after that the script you have just writes out rx ry rz, but those don't map properly to houdini. From max to houdini it would be more like rx rz -ry, which you would either have to write out differently from that maxscript or modify in houdini. Even after all of that max still starts with its camera pointing straight down. It is "loaded" with a 90 degree rotation in x! You must subtract this...and remap the translates as well!

No wonder you were having a tough time!

Link to comment
Share on other sites

Thank you very much for the help and participation! Your script helped me a lot, I had a little older version.

Admit the truth, not quite understand what you mean by multiply, Free Camera .. But I have everything working without it:

1. Create animated Standart Target Camera in the 3Dmax, run script, choose Animted and saves proposed *. clip files.

2. Import Houdini geometry, create a new camera. Go to the CHOP, loading and export to the camera the appropriate channels "fov" and "t?".

3. Create a Null. At CHOP, again, load and export "t?" for the camera target.

4. Look at: Null.

5. In Houdini exposes the start frame: 0. By default 1, but in Max starting 0. Than there was no bias in the 1 frame, and hence inconsistency, change the starting frame.

I have everything working. I am enclosing archive.

PS: Special thanks loopyllama.

Camera Max to Hodini.rar

Link to comment
Share on other sites

The reason you are having to use a lookat null in your camera is because you should because exporting your rotations. When I tried, the target camera didn't quite export the rotations properly so I had to copy its fov, position, and rotation each frame to a free camera.

The reason you don't have to scale your camera's translation times 100 is because your geometry is also incorrectly 100 times to big :) It may be fine for you, but to be a true export your camera and geometry should be the same scale in houdini as it is in 3dsmax.

If you have any more trouble, let me know. Your lookat null trick might work for your scene but I think it will quickly stop working as soon as your camera translates around in max.

Link to comment
Share on other sites

  • 2 weeks later...

I finally wrote up a little script that packages up the conversion between a target camera to a free camera.

To sum up, if you want a max camera in houdini you can use this method:

download the script from the above post: Maxcam_2_Houdini9_.1.0.ms (I would post it, but it is not my script so I link to it instead)

download the attached targetCameraToFreeCamera.ms

if you have a free camera: run the Maxcam script and follow the above instructions to import the native .clip to houdini

if you have a target camera: select it, run my targetCamera script, then run the Maxcam script

-make sure you match your houdini aperature with your aperature in the max render settings dialogue

-if your max objects in houdini are too big then scale them down by 0.01

-if you fbx your objects from max choose "meters" which will do the scale of 0.01 for you on export

enjoy!

targetCameraToFreeCamera.rar

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...