sketchucation logo sketchucation
    • Login
    1. Home
    2. CPhillips
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.6a introduces important bugfixes for Fredo's Extensions Update
    C
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 68
    • Posts 1,089
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: SketchyPhysics 3x June 27 version.

      @phy said:

      Um, CPillips how do you use the breakit command or is it a command. I don't mean the split command by the way. Wacov that's fantastic. πŸ‘

      "breakit" is an internal command called by "split". If you want to break an object into more than 2 pieces use this:

      
      split(self,2)
      
      

      The "2" means split twice, so you'll get 4 pieces. If you use 3 you will get 16 pieces. 4=256. So dont go nuts. Also remember Sketchup will sometimes crash when you split. The more splits the more likely this is to happen.

      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      @wacov said:

      Took quite a while to code this right, and I can't get the faces to smooth, but here it is! Seamless cloth!!

      Very impressive Wacov!

      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      @wacov said:

      I'm on a roll...

      Turns out you CAN reset the simulation from within the script. Use this little chunk of code:

      @@bPause=true
      > SketchyPhysicsClient;;physicsReset()
      > MSketchyPhysics3;;closeControlPanel()
      > freeDirectInput()
      

      In the scripted field.

      I found this near the bottom of SketchyPhysicsTool.rb, it seems to work totally normally for me, but if there's a problem, there's not much I can do about it πŸ˜„

      I am not sure that will work correctly in all cases. Ill try to add something official.

      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      @javixp said:

      Well done I like it! πŸ‘

      So, Chris, any new features we missed? πŸ˜„

      Well, there is a lot that is still possible. I haven't seen anyone using teleport yet. Nor getVelocity/setVelocity, getTorque/setTourque or setLinearDamping/setAngularDamping. Any script connected joint can also be disconnected but I dont know a good example for that. Also the scripted code area will take tabs now. That makes it easier to write readable script.

      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      Here is a script that makes a simple to use auto connecting joint. In the first frame. The "pin" object automatically connects to any "door"'s it is touching with a hinge and anything else with a fixed joint. What makes it really useful is it copyable. πŸ˜„

      Note I made the "pin" object very dense and no collide. It didn't work very well otherwise.


      doorandpin5.skp

      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      Here is an example of a very simple camera system.

      The first example puts the camera eye at the position of the sphere and looking at [0,0,0].

      The second example finds the cone in the scene and looks at that. Note you can drag the cone and the camera will follow.

      The @simulation.camera.set commands parameters are location of the eye, the target and the "up" direction.

      The camera is the same as the camera in the Sketchup API:
      http://code.google.com/apis/sketchup/docs/ourdoc/camera.html


      camerasimple.skp


      cameraFollow.skp

      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      Me too! Self connecting joints are a feature I have been trying to achieve since version 1. I HATE the JCT. Its hard to explain, tedious to use and is the reason you cant copy jointed objects. Its THE major reason I started SPIV. So, I am really glad it turns out to be possible in SP3.

      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      I dont know about the sound. I havent touched that code in a while, but I will see if it still works and let you know.

      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      JaViXP it will work better if you change the onend to this:

      onend{
         group.erase!
      }
      
      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      @phy said:

      I love the new Script field and script but I was wondering is there any way you can control a scripted joint with a slider or key.

      Not yet. 😞 But I will do that next.

      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      @wacov said:

      Thanks guys! One thing I'm finding with the cloth is it tends to collide with itself. That seriously slows stuff down, and it's not really neccessary for a semi-realistic simulation. Can we have object-specific collision detection? So, give the choice to either collide with everything, collide with everything except '...', or collide with nothing but '...'. Keep it pretty intuitive, so using a string finds objects of that name, a var for specific objects, and let us put them into an array if needed.

      So, on the cloth, I'd name all the bars the same, and tell them to collide with everything except each other. You might also be able to make a crude fluid flow effect by creating spheres that only collide with the static mesh.

      In the physics engine you would need materials to do that. So don't expect it until SPIV.

      One thing you could do that might speed things up is to change the connect script to something like this.

      
      ontouch{|t,s,p|
         connect(t,"ball") if frame==1
      
          #empty the ontouch event after the first frame.
          #this will ensure that ontouch isnt called again.
         ontouch{} if frame>1 
      }
      
      
      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 4?

      Thanks. I fixed it.

      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      Nice! πŸ˜„

      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      @unknownuser said:

      Since this version is unstable, it would be best if you created a method that stops the simulation, after an amount of time, if something strange happens, or the ismulation gets laggy(breaking feature).

      There isn't a "magic bullet" for that. I need to find all the different ways it can break and then tackle them one at a time.

      Post any code you find that breaks the sim and I'll put the right error checking in.

      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      @wacov said:

      Chris, how DO you freeze objects in script? Has that been added yet? I've tried frozen=true and frozen(1), but no luck.

      Doesn't look like I have hooked that up yet.

      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      @wacov said:

      In the ontouch event, is the speed the speed of the collider at impact... and pos the point of impact?

      Yes.

      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      Simple breaking objects. The breaking interface is really a work in progress. Sometimes objects breaking can cause Sketchup to crash.


      Break1.skp

      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      This example adjusts linearDamp to make bodies act like they are in space. Also shows that objects can be started in motion.


      orbit4.skp

      posted in SketchyPhysics
      C
      CPhillips
    • RE: SketchyPhysics 3x June 27 version.

      Here is an example using the new scripting system. It uses the "ontouch" event to create joints between objects. The wheels on the car will connect with a hinge the first thing they touch, in this case the box. The spheres will connect with a ball joint everything they are touching the first frame. That allows them to connect to anything they are touching in the chain.

      The nice thing about joints made this way is that you can copy them and they still work as expected.


      SelfConnectingJoints.skp

      posted in SketchyPhysics
      C
      CPhillips
    • SketchyPhysics 3x June 27 version.

      Here is a new Experimental version. Its major feature is the new scripting system so it is primarily for users who are comfortable with script. It is work in progress code and possibly very buggy. You guys let me know.

      Because this is not even an alpha I am putting a notice not to upload to 3dwarehouse. But PLEASE post models to these forums. I need to know how you are using the scripts so I can figure out how they will ultimately turn out.

      Documentation for this release is going to take a while. I will start with examples in the next post.

      Chris

      http://sketchyphysics2.googlecode.com/files/SetupSketchyPhysics3x-Jun27.exe
      No Mac version yet but there will be soon.

      posted in SketchyPhysics
      C
      CPhillips
    • 1
    • 2
    • 7
    • 8
    • 9
    • 10
    • 11
    • 54
    • 55
    • 9 / 55