camera aspect ratio

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 16/07/2009 at 15:17, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   r11.027 
Platform:      
Language(s) :     C++  ;

---------
Hi, I'm new to C4D but I have to write a plugin to export camera from C4D to a custom file format. Being more familiar with Maya camera, there are several questions I'm hoping someone could help me with.
1. Where can I find the aspect ratio of camera? C4D only gives one aperture so I need it to calculate the vertical aperture too.
2. there seems to be no far clipping plane in C4D, is it correct?
3. I have a camera whose P.Y is 10e7, which seems to be too big to be held in a Real and it is giving me this number 4.99816e7. Where can I find the range or definition of this Real type?

Really appreciate any response !

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 16/07/2009 at 15:34, xxxxxxxx wrote:

1. ?

2. Doesn't look to be one. The only far clipping planes are in Light and Hair objects.

3. Real is simply a typedef of standard C/C++ 'float' type. LReal is the same as 'double'. float is typically a 32-bit IEEE Standard 754 floating point number.

typedef float Real;
#define MAXREAL     ( 9.0e18)
#define MINREAL     (-9.0e18)

No, not too big. And these are low limits. The standard is 1.17...E-38 and 3.40...E+38. Something else is wrong. If you are filling in a Camera parameter, it could be the maximum value the parameter allows.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 16/07/2009 at 16:14, xxxxxxxx wrote:

1. Sorry I didn't make myself clear enough I guess. I am looking for the camera aspect ratio so that from the horizontal aperture ( which is the aperture provided by C4D ) I could get the vertical aperture. I saw in Render Settings, there's film aspect and pixel aspect. I'm not sure if the film aspect is the same as the camera aspect ratio, and if so, how do I get it through API.

2. thanks for the info

3. I exported the camera to FBX so that I can load it back into Maya. The P.Y value when I loaded back to Maya also gives me 4.99816e7, but P.X, P.Z and other cameras' position values are correct, so I'm not very convinced that this is a problem with my code.

4 ( a new question ) : as I said, I imported the fbx back into Maya, but the rotation vector is totally different from C4D ( yet look the same ). So I'm wondering if there's something between the translation of a rotation vector of C4D to Maya that I should pay special attention to. Eg. in C4D I get this rotation vector: R.H=0, R.P = -90, R.B = 5, corresponding in Maya as RotateX = -85, RotateY = 0, RotateZ = -90 ( all units in degree ).
What is the default rotation order in C4D?

Thanks for the prompt reply!!

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 16/07/2009 at 17:24, xxxxxxxx wrote:

1. Pixel aspect is for compensation of different display media - such as TV which is 4:3 or 16:9 (and so on). Film aspect is similar but automatically compensates pixel dimensions for the output media specified.

3. Could be a limitation of the FBX export then. It is surely not a limitation of a 32-bit floating point value, I can assure you.

4. Expected. C4D uses an anti-gimbal lock mechanism in its HPB rotations. You cannot depend upon them being 'standard' Euler angles. C4D has NO rotation order (which is exactly how it avoids gimbal lock).

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 16/07/2009 at 17:46, xxxxxxxx wrote:

3. I realized now it's probably not a problem with the limitation. Let me try to explain ( pardon me if I didn't name the UI correctly) :
on the right attribute editor, the Coord. tab of the camera object says P.Y is 10e7, but in the lower right window named "Coordinates", PositionY = 4.99816e7, and that's why the discrepancy occurs. Really thankful if anyone would explain what's the meaning of these two numbers.

FYI, my camera is at the world level so there's no parent transform above it. Not sure if this is related to my question.

And many thanks to kuroyume0161!!

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 16/07/2009 at 18:51, xxxxxxxx wrote:

I can't reproduce this with either a regular camera object or one with a camera target. Entered 10.0e7 in the P.Y setting and it shows the same value in the Coordinates Manager Position Y (10000000). Very odd.

Any animation or expressions affecting the camera object?

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 16/07/2009 at 19:22, xxxxxxxx wrote:

As far as I know this camera is not animated.

Is there a way I can upload a c4d file that contains only this camera to this forum? otherwise if you don't mind I can just email you, kuroyume0161.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 20/07/2009 at 02:10, xxxxxxxx wrote:

The Film Aspect Ratio found in the rendersettings applies to the camera as well. Rendersettings are like most other settings in CINEMA 4D description based, which means they are saved in the object's container.

You can obtain the render settings like this:

> \> RenderData \*rdata = doc->GetActiveRenderData(); //get the active render settings (doc is a BaseDocument) \> \> BaseContainer \*data = rdata->GetDataInstance(); //get the data container of the render settings \> \> Real ration = data->GetReal(RDATA_FILMASPECT, 0.f); //get the Film Aspect ration \>

Unfortunatly it is not possible to attach files to the forum. You can send files to MAXON SDK support by email [email protected]

cheers,
Matthias

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 20/07/2009 at 13:42, xxxxxxxx wrote:

Thanks Matthias.

Sorry for begging the question but seems this will only give me the active render setting. I have an example in which each custom setting in the Render Settings->Output has a different film aspect, and it is my understanding is that a document can have multiple render data classes, so is there any way I could access the settings of cameras other than the active one.

Thanks!

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 20/07/2009 at 15:15, xxxxxxxx wrote:

Please ignore my last question but I think I got my answer now. Thanks everyone!