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
    • Recent
    • Tags
    • Users
    • Login

    DrawPolygonObject() w/Transparency

    Scheduled Pinned Locked Moved SDK Help
    17 Posts 0 Posters 1.3k Views
    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 Offline
      Helper
      last edited by

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

      On 11/11/2008 at 12:08, xxxxxxxx wrote:

      Ahh (odd).  Anyway, I just double-checked and the release version of Riptide Pro does indeed create Normal records ('vn') with just a Phong Tag - just send me your latest digits and I'll get you a license.
      Riptide (Classic) would also create Normal records, IF the mesh has a Normal Tag, which can be created using my Add Normals plugin (there never was a way to create a Normal Tag using the C4D interface - that's why I wrote Add Normals).

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

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

        On 11/11/2008 at 12:21, xxxxxxxx wrote:

        BTW, instead of the above, maybe try setting xray mode:

            
            
              
              ObjectColorProperties objColor;  
              objColor.usecolor = ID_BASEOBJECT_USECOLOR_ALWAYS;  
              objColor.xray = TRUE;  
              m_MagZone->SetColorProperties(&objColor);  
            
        

        ...I was using that on a separate object, but maybe your plugin can set it on itself?

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

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

          On 11/11/2008 at 12:37, xxxxxxxx wrote:

          Got the export working (as you already know). 🙂

          Plugin objects don't support X-Ray mode - it is not included in the Basic Properties. So, I'd be right back where I started - how to set transparency with BaseDraw. 😉

          Unfortunately, how even X-Ray is done isn't explained anywhere.

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

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

            On 12/11/2008 at 08:36, xxxxxxxx wrote:

            Quote: Originally posted by kuroyume0161 on 11  November 2008
            >
            > * * *
            >
            > Got the export working (as you already know). 🙂
            >
            > Plugin objects don't support X-Ray mode - it is not included in the Basic Properties. So, I'd be right back where I started - how to set transparency with BaseDraw. 😉
            >
            > Unfortunately, how even X-Ray is done isn't explained anywhere.
            >
            > * * *
            Hmm... add a "C++ SDK - Rounded Tube" to your scene... it has an X-Ray option in it's Basic properties.

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

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

              On 12/11/2008 at 08:44, xxxxxxxx wrote:

              Actually, I just tried this in the Rounded Tube  example...

                  
                  
                    
                  Bool RoundedTube::Message(GeListNode *node, LONG type, void *t_data)  
                  {
                  
                  
                  
                  
                      if (type==MSG_DESCRIPTION_VALIDATE)  
                      {  
                          BaseContainer *data = ((BaseObject* )node)->GetDataInstance();  
                          CutReal(*data,TUBEOBJECT_IRADX,0.0,data->GetReal(TUBEOBJECT_RAD));  
                          CutReal(*data,TUBEOBJECT_ROUNDRAD,0.0,data->GetReal(TUBEOBJECT_IRADX));  
                      }  
                      else if (type==MSG_MENUPREPARE)  
                      {  
                          ((BaseObject* )node)->SetPhong(TRUE,FALSE,0.0);
                  
                  
                  
                  
                          //****  insert this code, below *****  
                          ObjectColorProperties objColor;  
                          objColor.usecolor = ID_BASEOBJECT_USECOLOR_ALWAYS;  
                          objColor.xray = TRUE;  
                          ((BaseObject* )node)->SetColorProperties(&objColor);  
                      }  
                      return TRUE;  
                  }  
                  
              

              ..worked like a champ.

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

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

                On 12/11/2008 at 08:48, xxxxxxxx wrote:

                Hmm.. that was a generator object though... deformer objects don't have the X-Ray option - as you mentioned.

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

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

                  On 13/11/2008 at 05:39, xxxxxxxx wrote:

                  You could also calculate the vertex normals from the mesh yourself.

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

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

                    On 13/11/2008 at 17:09, xxxxxxxx wrote:

                    Or, I could use PolygonObject::CreatePhongNormals(). 🙂

                    Except that changing the values on the added/required Phong tag doesn't seem to change the display results of BaseDraw::DrawPoly() - always as if Angle Limit is off or Phong Angle is 180d even though I'm setting the values. It would sort of suck if I have to load the real object from file, get this Vector array, and write it out to file to use those values instead.

                    Luckily, DrawPoly() is responding to BaseDraw::SetTransparency().

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

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

                      On 14/11/2008 at 00:10, xxxxxxxx wrote:

                      What I'm doing is just using the polygon normal for the vertex normals - about all I need as this is a display representation and not a 'real' object. The results are facetted but at least not overly smoothed on the other end of the spectrum. Now onto more important parts of the code. 🙂

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

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

                        On 14/11/2008 at 06:23, xxxxxxxx wrote:

                        Just for future reference - and something I only recently discovered - calling ie.
                        op->SetPhong(true, true, Rad(80.0));
                        ... will create/add a Phong Tag on your mesh.   I used to always manually MakeTag() (or Alloc and Add) and then call SetPhong(), but that was apparently redundant.
                        Also, op->CreatePhongNormals() should give you Normals once a Phong Tag is on your mesh.
                        That may or may not help you out in this case - I want to see the more important parts working, myself :).

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