Negative axis scale culling problem



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

    On 26/07/2007 at 03:06, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   10.1 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hello, I am working on an exporter for C4D.

    If I put a "figure", put a -1 for let's say S.Y in Attributes/Coord (negative scale on Y), C4D changes the matrix, but not the GetScale() result.

    The problem is that in our export scheme, we track down axis scales/flips through GetScale().

    If the "figure" is firstly made "editable" (c) and then the S.Y is set to -1, GetScale() returns -1 for the Y part, so we can flip the culling on our engine side.

    Since the viewport behaviour is correct (with backface culling activated) in both cases, C4D must have a way to resolve axis flips.

    The question is: where to get the axis flip information when it has been set before being "editable" ?

    The dump I have, for exemple:

    a) S.Y = -1 before "Make Editable"

    Matrix: 1 0 0   0 -1 0   0 0 1   0 0 0
    Scale: 1 1 1

    b) S.Y = -1 after "Make Editable"

    Matrix: 1 0 0   -0 -1 -0    0 0 1    0 0 0
    Scale: 1 -1 1

    c) S.Y = -1 then "Make Editable"

    Matrix: 1 0 0   0 -1 0    0 0 1    0 0 0
    Scale: 1 1 1

    Notice the subtile "-0" on b) :D
    The c) is same has a)

    Since the culling flip is based on the sign of GetScale(), I have to correct the signs based on the analysis of the matrix.

    Edit: I correct the post due to a wrong analysis of my own.



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

    On 27/07/2007 at 01:40, xxxxxxxx wrote:

    This looks actually like a bug. The negative scaling shouldn't get lost after making objects editable. As workaround you could maybe check if the matrix is left handed or roght handed (Cinema uses left handed as default).

    cheers,
    Matthias



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

    On 27/07/2007 at 02:13, xxxxxxxx wrote:

    Yes i thought to do something like this.

    But the problem is that our engine base its culling on axis's scale signs, and i am quite sure that it's possible to get into problems, by for example:

    - flip S.Y before ME (matrix Y flips, not Y scale)
    - flip S.X after ME (matrix X flips, X scale too)

    resulting in a situation where Y & X matrix flips (normal culling), but only Y scale was flipped, resulting on a false culling flip in our engine.

    but i think we will live with, until we found a solution to this ambiguity (or if this is comfirmed to be a bug and corrected)

    thanks however, if you could confim to be a bug on C4D's side.


Log in to reply