Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    strange issue with polygonobject [SOLVED]

    SDK Help
    0
    7
    485
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

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

        Try this after the code you posted:

        plane->Message(MSG_CHANGE);
        EventAdd();
        
        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

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

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

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

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

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

              1 Reply Last reply Reply Quote 0
              • H
                Helper
                last edited by

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

                1 Reply Last reply Reply Quote 0
                • H
                  Helper
                  last edited by

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

                  thanks for the explanation

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post