strange issue with polygonobject [SOLVED]



  • On 03/10/2014 at 14:30, xxxxxxxx wrote:

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

    ---------
    Hi, i just came along an issue with my created polygons. its happening when i try to render with the octane renderer. dunno if it applies to other external renderers. thing work fine inside cinema (standard renderer or physical)

    when i convert my pluginobject it still doesnt render. but, as soon as i somehow touch the polygon (be it, that i move it or do anything else to it) it renders.

    here is how i create the polygon object:

    PolygonObject* plane = PolygonObject::Alloc(4,1);
    if (!plane) return false;
    Vector *next = plane->GetPointW();
    CPolygon *rvadr = plane->GetPolygonW();
      
    next[0] = p0 + Vector(0,0,iplFitB)*dir(p0,p1) + Vector(0,0,iplFitS)*dir(p0,p3) + Vector(iplWidth*0.5,0,0) * dir(p0,p2) - centerPoint;
    next[1] = p1 + Vector(0,0,iplFitT)*dir(p1,p0) + Vector(0,0,iplFitS)*dir(p1,p2) + Vector(iplWidth*0.5,0,0) * dir(p0,p2) - centerPoint;
    next[2] = p2 + Vector(0,0,iplFitT)*dir(p2,p3) + Vector(0,0,iplFitE)*dir(p2,p1) + Vector(iplWidth*0.5,0,0) * dir(p0,p2) - centerPoint;
    next[3] = p3 + Vector(0,0,iplFitB)*dir(p3,p2) + Vector(0,0,iplFitE)*dir(p3,p0) + Vector(iplWidth*0.5,0,0) * dir(p0,p2) - centerPoint;
    rvadr[0] = CPolygon(0,1,2,3);
    

    any ideas?

    edit: seems to only happen within the octane renderer inside cinema. exporting and rendering works. so maybe wrong place to ask...

    thanks in advance,
    ello



  • On 03/10/2014 at 16:46, xxxxxxxx wrote:

    Try this after the code you posted:

    plane->Message(MSG_CHANGE);
    EventAdd();
    


  • On 03/10/2014 at 22:41, xxxxxxxx wrote:

    thank you. this didn't work. i posted at the otoy forum, too. i believe it is related to their render plugin..



  • On 05/10/2014 at 02:55, xxxxxxxx wrote:

    Hmm, Eclectrik is actually right. A plane->Message(MSG_UPDATE) should be the only culprit here (MSG_CHANGE is NOT enough as you definetly need a Bounding box update).



  • On 05/10/2014 at 03:28, xxxxxxxx wrote:

    thank you very much! that did it :)

    do you know why such thing only affects the cinema octane plugin and not the internal or external renderers??



  • On 05/10/2014 at 08:59, xxxxxxxx wrote:

    I guess that C4D gets another automatic update call when it copies the scene document for rendering (which it definetly does) and I assume Octane simply grabs the data and therefore lacks such an update call (which is fine I would say).



  • On 06/10/2014 at 08:09, xxxxxxxx wrote:

    thanks for the explanation


Log in to reply