Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Noise Functions

    SDK Help
    0
    33
    15.5k
    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

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

      On 05/06/2010 at 12:21, xxxxxxxx wrote:

      ha, you are just too fast for my replies. however, i wouldnt care for that.. you have your base form and apply just some values to each point, so the form still stays similar to your original mesh. maybe you dont use a cube as a base, but a sphere with low polycount? maybe you apply some scale vector additionally so the object doesnt look so round anymore

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

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

        On 05/06/2010 at 12:22, xxxxxxxx wrote:

        well smaller numbers definitely help but still don't quite give me what I'm looking for.  I think I might need to compare the current point position with the last point position..     Maybe.,.    LOL

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

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

          On 05/06/2010 at 12:23, xxxxxxxx wrote:

          lol...   sorry I replied before you had a chance to again.  HAHA

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

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

            On 05/06/2010 at 12:30, xxxxxxxx wrote:

            if you use Mix with keeping more to your original point, say values between 0.5 and 1 for t, you should be able to get exactly that (in theory of course, since i'm not actually trying atm)

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

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

              On 05/06/2010 at 12:37, xxxxxxxx wrote:

              LOL..  yep you're right...   it worked/./   just had to do a little tweaking with the numbers..  Thanks a lot for your help ello.    I really appreciate you taking the time to help me.

              ~Shawn

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

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

                On 05/06/2010 at 12:39, xxxxxxxx wrote:

                glad i am able sometimes 🙂

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

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

                  On 05/06/2010 at 12:45, xxxxxxxx wrote:

                  Hey while you're here do you know if it is safe to subdivide an object from within the GetVirtualObjects() method?

                  ~Shawn

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

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

                    On 05/06/2010 at 12:53, xxxxxxxx wrote:

                    i place my object inside  a hypernurbs (Osds) to do so, but i think you mean something other. it should be able by using CommandData

                    here is a snippet of how i used the optimize command on a polygon object.

                      
                          if (op->GetType()==Opolygon)  
                          {  
                              ModelingCommandData cd;  
                              cd.doc = doc;  
                              cd.op = op;  
                              BaseContainer bc;  
                              bc.SetReal(MDATA_OPTIMIZE_TOLERANCE, tolerance);  
                              bc.SetReal(MDATA_OPTIMIZE_POINTS, TRUE);  
                              bc.SetReal(MDATA_OPTIMIZE_POLYGONS, TRUE);  
                              bc.SetReal(MDATA_OPTIMIZE_UNUSEDPOINTS, TRUE);  
                              cd.bc = &bc;  
                              if(SendModelingCommand(MCOMMAND_OPTIMIZE, cd))  
                              {  
                                  cd.op->Message(MSG_UPDATE, NULL);  
                                  BaseTag *phongTag = op->MakeTag(Tphong);  
                                  BaseContainer *bc = phongTag->GetDataInstance();  
                                  bc->SetBool(PHONGTAG_PHONG_ANGLELIMIT,TRUE);  
                                  bc->SetReal(PHONGTAG_PHONG_ANGLE,ToRad(winkel));  
                              } else {  
                                   GePrint("failed");  
                              }  
                          }  
                    

                    hope this makes sense 🙂

                    edit: in your case it'd be the MCOMMAND_SUBDIVIDE .. check the sdk for its parameters...

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

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

                      On 05/06/2010 at 12:59, xxxxxxxx wrote:

                      I was doing something simliar with

                      MCOMMAND_SUBDIVIDE_<_h4_>_

                      but for some reason it keeps crashiung on me when I try to do it.

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

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

                        On 05/06/2010 at 13:01, xxxxxxxx wrote:

                        hm.. did you set the parameters? i guess its some trial and error now, since i dont know why it crashes.

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

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

                          On 05/06/2010 at 13:03, xxxxxxxx wrote:

                          this is how I am attempting to subdivide

                          but it keeps crashing

                            
                          		if (mdat.bc->GetBool(HYPERNURBS_SUBDIVISION, TRUE))  //If HyperNURBS is checked
                          		{
                          		mdat.bc->SetBool(MDATA_SUBDIVIDE_HYPER, TRUE);
                          		}
                          		else
                          		{
                          		mdat.bc->SetBool(MDATA_SUBDIVIDE_HYPER, FALSE);
                          		}
                          		mdat.bc->SetLong(MDATA_SUBDIVIDE_SUB, subAmount);
                          	    mdat.bc->SetReal(MDATA_SUBDIVIDE_ANGLE, mdat.bc->GetReal(MAX_ANGLE));
                          		
                          	//Subdivision Command
                          	SendModelingCommand(MCOMMAND_SUBDIVIDE, mdat);
                            
                          
                          
                          1 Reply Last reply Reply Quote 0
                          • H
                            Helper
                            last edited by

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

                            On 05/06/2010 at 13:04, xxxxxxxx wrote:

                            MAX_ANGLE is equal to pi   and subAMount is a real that the user can adjust.   🙂

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

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

                              On 05/06/2010 at 13:11, xxxxxxxx wrote:

                              try catching the crash with

                              if(SendModelingCommand(MCOMMAND_SUBDIVIDE, mdat))
                              {
                              GePrint("done");
                              }
                              else
                              {
                              GePrint("failed");
                              }

                              just to be on the safe side..

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

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

                                On 05/06/2010 at 13:44, xxxxxxxx wrote:

                                Here's my subdivision code now...

                                Still crashing.

                                //SUBDIVISION
                                  
                                		Real subAmount;
                                		subAmount = mcd2.bc->GetLong(SPACEROCK_SUBDIVISIONS);
                                		mcd2.mode = MODIFY_ALL;
                                		mcd2.doc = hh->GetDocument();
                                  
                                		if(SendModelingCommand(MCOMMAND_SUBDIVIDE, mcd2))
                                		{
                                			GePrint("done");
                                			mcd2.bc->SetBool(MDATA_SUBDIVIDE_HYPER, TRUE);
                                			mcd2.bc->SetLong(MDATA_SUBDIVIDE_SUB, subAmount);
                                			mcd2.bc->SetReal(MDATA_SUBDIVIDE_ANGLE, pi);
                                			//Subdivision Command
                                			SendModelingCommand(MCOMMAND_SUBDIVIDE, mcd2);
                                		} 
                                		else
                                		{
                                			GePrint("failed");
                                		}
                                

                                Any thoughts?

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

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

                                  On 05/06/2010 at 13:55, xxxxxxxx wrote:

                                  hey, dont call SendModelingCommand twice.. its already called in the if condition!

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

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

                                    On 05/06/2010 at 14:06, xxxxxxxx wrote:

                                    well.. that was a good thought and a good catch but unfortunately it's still crashing .. this one is a bit of a thorn today.  LOL

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

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

                                      On 05/06/2010 at 14:14, xxxxxxxx wrote:

                                      another thing could be worth a try, to set the Parameters for an extra BaseContainer like i did it in my example:

                                      BaseContainer bc;
                                                bc.SetReal(MDATA_OPTIMIZE_TOLERANCE, tolerance);
                                                bc.SetReal(MDATA_OPTIMIZE_POINTS, TRUE);
                                                bc.SetReal(MDATA_OPTIMIZE_POLYGONS, TRUE);
                                                bc.SetReal(MDATA_OPTIMIZE_UNUSEDPOINTS, TRUE);
                                                cd.bc = &bc;

                                      and in the if (SendModelingCommand... call "cd.op->Message(MSG_UPDATE, NULL);"

                                      Oh, wait, i didnt see you setting mcd2.op to your object, maybe thats the main problem

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

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

                                        On 05/06/2010 at 14:21, xxxxxxxx wrote:

                                        yeah I added that in after I sent the message..  that didn't work.. I'
                                        ll try your other suggestion though.   Thanks,

                                        ~Shawn

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

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

                                          On 05/06/2010 at 14:31, xxxxxxxx wrote:

                                          alternatively, did you try CallCommand(14047); ?? maybe that works... but i dont know how you set the parameters in this case..

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

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

                                            On 05/06/2010 at 15:15, xxxxxxxx wrote:

                                            Awesome..  It works.   Used your different basecontainer suggestion.

                                            //SUBDIVISION
                                            		Real subAmount = bc->GetReal(SPACEROCK_SUBDIVISIONS);
                                              
                                            		BaseContainer bc2;
                                            		
                                            		bc2.SetBool(MDATA_SUBDIVIDE_HYPER, TRUE);
                                            		bc2.SetLong(MDATA_SUBDIVIDE_SUB, subAmount);
                                            		bc2.SetReal(MDATA_SUBDIVIDE_ANGLE, pi);
                                              
                                            		mcd2.bc = &bc2;
                                            		mcd2.op = polyCube;
                                            		mcd2.mode = MODIFY_ALL;
                                            		mcd2.doc = hh->GetDocument();
                                            		
                                              
                                            		if(SendModelingCommand(MCOMMAND_SUBDIVIDE, mcd2))
                                            		{
                                            			GePrint("done");	 
                                            		} 
                                            		else
                                            		{
                                            			GePrint("failed");
                                            		}
                                              
                                            
                                            

                                            Thanks again.  I'm calling it a night.   Thanks for your help.

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