Jump to content
Guest xionmark

Custom camera projections

Recommended Posts

Guest xionmark

Hi there,

I need to create a few custom camera projections to be used for a mapping project that is currently written in IDL but I want to port the whole thing to Houdini because of the superior image capability of Houdini.

The only thing I need to figure out is how to do a custom camera projection, specifically a "Robinson" projection. The other projection types I deal with, "Cylindrical", "Satellite". and "Mercator" I'm pretty sure I can handle with the current camera projection types.

I've looked around the web for info regarding "Robinson" projections and found that the projection is done through a table of values instead a formula; curious. I haven't found said table of values but am on the hunt for them.

My question is would I have to write a custom camera with the HDK to accomplish this? I've looked through the HDK samples and didn't find anything like what I need. The OBJ_Camera class doesn't seem to have a way to use your own projection.

Any suggestions of where to start?



Share this post

Link to post
Share on other sites

Is there any progress in doing custom camera?

I need to create raytrace fisheye projection, not from cube map or with fog shader. So trying to figure out where can i do that.

Edited by Sheff

Share this post

Link to post
Share on other sites

I would also like to know where to start dealing with cameras. Has anyone gotten anywhere with this? Any functions or documentation to look at?

Share this post

Link to post
Share on other sites

Afaik HDK doesn't expose any headers for Mantra's camera, but you might take a look into lens shaders, like ASAD lens shader (v_asadlens shop) to control camera projection.


Share this post

Link to post
Share on other sites

Yes. Houdini, to be more precise, Mantra allows you to do any kind of projection you can imagine using custom lens shader.  I wouldn't call that projection because it is much more. You can create your own rays (their origins and directions) for each rendered pixel and do manual ray trace not only in lens shader but in any kind of shader.

Off course, you have to figure out first what "Robinson" table data represents and then we can help.   

Share this post

Link to post
Share on other sites


The projection is defined by the table:

Latitude PLEN PDFE
00 1.0000 0.0000
05 0.9986 0.0620
10 0.9954 0.1240
15 0.9900 0.1860
20 0.9822 0.2480
25 0.9730 0.3100
30 0.9600 0.3720
35 0.9427 0.4340
40 0.9216 0.4958
45 0.8962 0.5571
50 0.8679 0.6176
55 0.8350 0.6769
60 0.7986 0.7346
65 0.7597 0.7903
70 0.7186 0.8435
75 0.6732 0.8936
80 0.6213 0.9394
85 0.5722 0.9761
90 0.5322 1.0000

The table is indexed by latitude at 5 degree intervals; intermediate values are calculated using interpolation. Robinson did not specify any particular interpolation method, but it is reported that he used Aitken interpolation himself. The PLEN column is the length of the parallel of latitude, and the PDFE column is multiplied by 0.5072 to obtain the distance of that parallel from the equator. Meridians of longitude are equally spaced on each parallel of latitude.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now