sketchucation logo sketchucation
    • Login
    1. Home
    2. Mr.K.1
    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.6b introduces important bugfixes for Fredo's Extensions Update
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 143
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Truck & trailer application?

      Alright did a quick fix up of SP files to add camera recordings, but make sure you backup your original files in case this doesn't work for you.

      So make sure you backup your /Sketchup/Plugins/SketchyPhysics3 folder, and then extract these two files in there.


      SketchyPhysics3.rar

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Truck & trailer application?

      Ya SP recording doesn't have on option to add camera recording, I guess in this case that is quite crucial... I don't know howmuch work it would be to add this, but I'll have a look at the files.
      You could also record it with Fraps, not really ideal but it's the only thing I know.

      Curves tend to flip directions at random, and not just when created but also when you open/close the file, it can't really be helped because only SU has full control over curves, so scripts need to be adapted.
      If you can't fix the script make a model with just the curve in question and your scripted object and I'll fix it up to work.

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Static Camera Position?

      Well I made you a more suitable example, script is in the yellow box.

      It can be done without an extra box but this way it's very easy to move it around.


      camera.skp

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Sketchy physics and Shadows?

      Well you can run a SP simulation with shadows, but it will be considerably slower.

      If you however record a SP simulation and play back the animation then shadows won't update, they remain static it seems.
      You could use Window -> Shadows -> Use sun for shading, that does seem to work with animations, and it is a whole lot faster.

      But for any sort of real shading I would say look up Twilight rendering.

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Truck & trailer application?

      Most likely there are too many groups to handle or your static-mesh is too complex(too many faces), that is usually the problem of freezing on startup.
      It's best to make statimesh only the portion of road you really need, and set all non essential groups/components to ignore.

      As for the camera, well the example script should work quite well, as long as you give it a good curve to follow.

      Exporting the animation tho I have no clue about, haven't used that myself, but I know there are alot of threads on these forums about those things.

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Truck & trailer application?

      Ya the model is as it should be now, needs just a couple of tweaks.

      • since you don't want the box to pull downwards you should just align everything at wheel height, even the curves, then it will pull at the same height
      • new ball joints come with angle restrictions, best to make them 0 for this system
      • you put motors on the front wheels, and motors don't like to be pulled, hinges are the best choice for this sort of setup
      • you steering rack seems to be a bit off center, that messes with steering a little

      The speed... well that need a bit of script tweaking, you know what I'll just add an updated example.
      And I made this steering example since it requires the least code, and the rest is just plain physics, I can try set up other examples if you need them.

      setVelocity(dir.to_a), dir.to_a is used because dir was a Sketchup class called Vector3d(allows easy vector manipulation), but since SketchyPhysics only needs the raw numbers the .to_a addition changes that vector class into an array like [0,0,10].
      I guess I could have mentioned it before, I just forget others aren't as familiar with these scripts


      AnimationTest5.skp

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Truck & trailer application?

      Hmmm... I'm not quite sure how you want this to work, because I looked at you model and to me it seems it all works as a truck and trailer should, only need a steering column on the front wheels.

      So are the rear wheels suppose to steer aswell?
      Or are they suppose to be attached to the trailer?
      Or is it just the front wheel problem?

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: How to make a telescopic antenna

      Well I had a minute so I made a quick example.
      And if you have trouble starting off with SP take a look at the wiki: http://sketchyphysics.wikia.com/wiki/SketchyPhysicsWiki

      P.S. Don't be alarmed by the flat looking joints, that is just my preference.


      antena.skp

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Truck & trailer application?

      Seems there are some odd errors going around, it may be a SU7 -> SU8 transition issue.

      Oh and don't be alarmed by the flat joints I used in the model they are just the same as others, I simply changed my joints so I get a better center point overview.

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Truck & trailer application?

      Here it is, with the car now being pulled and steered.
      Also made a quick camera script addition.


      Test_Curve.skp

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Truck & trailer application?

      Well really getting down to the basics:

      • evalCurveAbs("curve", distance) - will simply return a 3D point at the desired distance on the curve, if your curve get's flipped(as it often does) you can simply go from max to minimum distance

      • teleport( point ) - will move the SP object to the defined point, so you can move it on the start of your curve

      • position.vector_to( point ) - will get the current object(cube) position and give you a direction vector to the specified point

      • push( direction_vector ) - this will push the object in the vector direction, so now you are pushing the object towards the next point on the curve.
        But push is a very floaty way of moving objects because it only adds the new vector to previous movements, that's why you get all that jumping.

      • setVelocity( direction_vector ) - so for a more sturdy movement you should use setVelocity, it will negate all previous speeds and only set the new direction of movement.

      I'll make some adjustments on your model and upload it later.

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Truck & trailer application?

      Oh I thought you already knew SP, well here is some good data:
      http://sketchyphysics.wikia.com/wiki/SketchyPhysicsWiki
      Look for tutorials, and then anything else you might need.

      I assume you have SketchyPhysics 3.2, if not try to download that too.

      You could also upload your basic model here, it's easier to help out that way.

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Possible piston controller bug

      Well I can't really imagine the model from text, but to put it simply: a movable object will unfreeze others if they are connected.

      A better way to reset values is changing the controller input, you can try 2 things:
      slider('piston', 0.0) - which will set the piston to 0.0 by default, but the html slider will still be in the middle so it may get a bit jerky

      (slider('piston') - 0.5) * 2 - the default slider 0.5 gets reduced to 0.0, and x2 so you can still reach the full swing at 1.0, or -1.0

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Calculating Weight

      @mptak said:

      It would seem to me that "volume" must be stored somewhere for each group...perhaps not. Some sort of density number is stored in SP (in the UI screen) though I think all of those models made stable by adding hidden counterweights indicate that it might not be as friendly as it should be. I have noticed that SP doesn't deal with conservation of rotational momentum as it should (think Greg Louganis).

      Well SU8 calculates solids volume on the fly it seems, not sure it stores the value anywhere.
      As for SP it simply takes the bounding box size as volume, so a cone / box / sphere with the same bounding box will have the same volume.
      Ofcourse since SP3.1 this can be countered with the optional density setting, and before that you had to add some hidden objects to extend the bounding box.
      Momentum is slowly diminished by the default drag/dampening setting, but in SP3.1(and above) you can reset that with setLinearDamping and setAngularDamping

      @mitcorb said:

      What about Coefficient of Friction, and Aerodynamic Drag? I suppose these would put too much overhead on the program.

      For an accurate drag coefficient reading you need quite a complex particle simulator, not to mention a supercomputer to run it, I guess if it's really important you could contact some aeronautical institutes and see if they can help out.

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Sp Wiki=Out of date/abandoned?

      @barack said:

      So, SP 3.2 is just a "stop gap" measure?

      Temporary substitute?
      Ya I guess you can call it that, with SP4 still far from fully functional but all sorts of neat new features already made something had to be released.

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Sp Wiki=Out of date/abandoned?

      No I think you misunderstood, SketchyPhysics wiki has alot of fine tutorials and examples on a basic level, that didn't go anywhere it's all there to read up on.

      The advanced level however involves scripting for the most part and that is lacking in tutorials, mainly due to the complexity it can get into.
      The best bet is to read the basics on the wiki then see how people do things in the 3D warehouse models.

      I did add a few important SP3.2 links to the wiki now, so be sure to look those over if you want to know more.
      And if you run into a problem don't hesitate to ask, someone will know the anwser.

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Sp Wiki=Out of date/abandoned?

      You're right actually it is a bit abandoned, but the extent of all SP features combined with scripts is huge so trying to explain it all can take ages, the basics are covered from what I've seen, it just lacks on the advanced level where it's really more a matter of scripting.
      And anyone who has some knowledge is welcome to add it.

      I guess we do need to put up SP 3.2, so I'll collect some link and examples for people to get a glimpse of the new stuff.
      Most of the new features tho are in scripting and that can branch out widely in possibilities, not to mention SP 3.2 is a temporary thing that will still update and possibly turn a whole new page with SP 4, so extensive documentation may be redundant.

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Truck & trailer application?

      Well if you want a realistic looking representation then SketchyPhysics really is your best bet, because predefined animations tend to be on the wooden side.
      But if you need pin point measured movements and angles then SP probably isn't the best choice.

      You should check out some 3D warehouse models, see how things work, what can or can't be done with it.
      http://sketchup.google.com/3dwarehouse/search?q=sketchyphysics+trailer&styp=m&btnG=Search&reps=3

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: What the? Why is it doing THAT?

      http://sketchup.google.com/3dwarehouse/details?mid=4162677214573a97902101d8ae99a1a9&prevstart=0
      I have seen your warehouse model, and the issue is quite simple, face orientation.
      You probably know Sketchup has front/back sides of faces (one white the other blue-ish), best way to see them is going to View -> Face Style -> Monochrome.
      Well staticmesh uses these orientations aswell, so the front(white) side is solid and the back side will be ignored.

      And your tubes seem to be quite mixed, so sometimes the ball will sink in and sometimes it will roll on top of the tubes(and the bumps come from those transitions), if you orient all the faces in the same direction it will all be fine (select all faulty faces -> right-click ->Reverse faces).

      posted in SketchyPhysics
      M
      Mr.K.1
    • RE: Pause a simulation...open and close a file...continue?

      I see...

      Well for internet data transfer you can do it several ways, easiest being opening up the web-dialog and reading data from that, the interactivity is a bit limited but it has all sorts of uses .
      I used it for automated plug-in updating, so when I upload a new script the plugin on users end can update itself without file transfer.

      Another way is direct UDP/TCP connection, if you add another file to SU then Ruby can connect to other people directly.
      I used this for a small multiplayer game experiment, and it works quite well, tho setting up p2p connections it not without it's faults.
      But a friend is doing an upgraded version with a user database where people log-in, chat, multiplayer game lobbies/lists/scores, that may take a while tho.

      There was also quite some talk of interactive modeling, but the biggest problem is Ruby still hasn't got the full access to SU, so the synchronizing would probably haveto rebuild the full geometry on the other end(not an ideal solution with bigger models).

      posted in SketchyPhysics
      M
      Mr.K.1
    • 1 / 1