Could you share what you are using this for?
I tried to come op with some good uses but nothing really comes to mind.
Could you share what you are using this for?
I tried to come op with some good uses but nothing really comes to mind.
I made a quick example model for you, only requires a test file on your C disk. C://test.txt
And then write in any 3 numbers, like so: 13, 17, 165 (only an example, they can be anything)
Those will convert into a color value as RGB(only ranges from 0 to 255), and velocity vector, and a torque vector, and a teleport position(added them all so you have the full range of uses)
Code it fairly crude but it works.
onstart{ @timer = UI.start_timer(2, true){ @color=Object::IO.read("C://test.txt").chomp.split(',') output=[@color[0].to_i, @color[1].to_i, @color[2].to_i] group.material=output #sets color as RGB setVelocity(output) #sets body velocity setTorque(output) #sets body torque teleport(output) #sets teleport point } } onend{ UI.stop_timer(@timer) }
Actually had some time and made a small script for the cable, turns out it's pretty straight forward when extending in one direction.
Not perfect tho, needs fine tuning to make all the geometry fit, but it's not all too noticeable.
http://sketchup.google.com/3dwarehouse/details?mid=244cba49b308513cbef58cf8fe40e06f
@color=IO.read("C;\\Temp\\mycolor.txt")[0].chomp
This will actually give an error, because [0] part will return the first character as an ascii number and chompcan't work with numbers.
So if you just remove that it will work perfectly well.
@color=IO.read("C;\\Temp\\mycolor.txt").chomp
Sometimes it is best to start over, delete/replace a joint or explode/remake the group that is causing problems.
Moving and rotating shouldn't be an issue at all, unless you moved joint off center in wheels or anything.
Scaling can go nuts tho, my advice is to scale only internal groups/geometry and not the external groups, or if you already scaled try exloping/remaking the group to reset it (this is also very important with static-mesh as it doesn't like scale).
Also it's always best to upload the problematic model so we can see what is going on.
It's hard to say without seeing your model, could you upload it?
But here are some known issues:
Well here is a slightly updated version of your crane:
http://sketchup.google.com/3dwarehouse/details?mid=244cba49b308513cbef58cf8fe40e06f&result=4
As for the cable, that would need some scripting to extend the geometry by the right amount, quite a fuss.
It would probably be better if you make an example model and post it, otherwise it's hard to grasp or even explain.
But here are some pointers:
I made a small model to demonstrate, try that if it helps you out:
http://sketchup.google.com/3dwarehouse/details?mid=f19ddb8bb6180c86b3f2d40ad6ba6a7c
That is a tough one, it's probably not the ideal setup for people animation.
SP is great for solid part animation but with bodies it will always look wooden, so I guess it's up to you to decide if that is acceptable.
The good part about SP is you can record your animation and then do playback while recording in any desirable camera angle, you can also export the recording and render it with other plugins.
SP + rendering:
http://forums.sketchucation.com/viewtopic.php?f=61&t=21826
Results:
http://www.youtube.com/watch?v=LHRXDq8fuPk
At this point it's not possible to do it directly, the entity name is just for show.
SP has it's internal names in entity attributes so the ID's stay the same and it wont come to overlapping or missing connections.
But if you really want to rename them then get Attribute Manager plugin for SU, and then edit the joint names with it.
Ya SU is a little rusty on curves so the setup is a little different.
SU itself only creates curves with the circle and arc tools, and the add_curve function in Ruby, which is all very limiting.
So the best thing to do is getting the Weld plugin for SU, or any of the various spline plugins that let you make curves with alot more precision and ease.
When you have a curve, right-click it and go to SketchyPhysics -> Make physics curve, this will give you a prompt for a new name, write it and hit OK, and you got your curve set up.
Now a couple of extra tips:
@unknownuser said:
I've seen mention of a recent addition - that of being able to follow a path. Could someone point me to where to look for some examples, documentation, etc, for this?
Jay
I downloaded all the important models for SP 3.1 and added them to the 3D warehouse some time ago.
http://sketchup.google.com/3dwarehouse/cldetails?mid=74935b1dd67b7cd7192c214610ae5bb8
Curves Test and Curves Controllers are very good examples of path following.
Actually to correct myself, that code will put out whatever units you have set in your model(meters, inches, centimeters,...), this being due to SU converting units with their built in classes (points, vectors,...)
Now the frame length depends entirely on your models framerate, best way to look that up is opening the Ruby console then running SP for about 500 frames and resetting, the readout should get you a fairly accurate FPS average.
Then just multiply the average fps with speed and you got a unit per second value.
The framerate setting in Physics Settings is a bit misleading because it has no direct connection to frames per second, what it defines is how many physics calculation cycles will be made before the model refreshes.
So the default 3 means all the collisions, velocities, torques, positions,... will be calculated 3x and then the models will move.
Setting it higher can serve as a fast forward feature, because all the objects will move by more iterations between frames.
Well you can display the velocity of an object by putting this code into it's Script field:
ontick{ vector = Geom::Vector3d.new( getVelocity ) logLine(vector.length.to_s) }
This takes the velocity vector and displays it's length.
Because SU is based on an inch system the output will be inches/frame, you could convert this into any other unit, but I would consider this as an abstract speed only to be compared with others in the model, I doubt the speeds in real world physics are comparable.
Actually made something like this once, so I know it's pretty simple.
Just can't be done with SP shapes directly, those don't have holes.
Best way to go at it is with boxes in this case.
I used it as a ball lift, the swirling cone would start to rotate the ball and with it pushing on the walls it would slowly climb towards the top.
So yes, there is centripetal and centrifugal force.
@barack said:
Well I am using a FPS game based on Wacov's FPS rig. I want to add a large lookAt plane, but without warning, all of a sudden, there is this worrying large clipping plane! I want someone to help me to be able to get rid of it.
PS: It only happens when the lookAt in the plane sets off.
Well this is an inherit SU problem, that I actually tried to work out many times before.
It's all to do with the size of your model size/bounding box, once the plane starts to move from the center the model bounding box expands, the same effect as if you have a really big model and try to zoom in on something small the clipping plane is further from the camera.
3 solutions:
Now on the issue, SU uses OpenGL as it's 3D rendering platform, and that brings in a couple of important features:
I was reading several complaints on this matter to the SU guys, but they put it all off on the OpenGL faults, but since I haven't seen any games with OpenGL support and these sort of issues I'd say it can be fixed.
And I was thinking it's just me.
I found the problem in a different way, but it's still the same one.
In my case it seems raytest is broken by any 2D text added to the model, raytest will work normaly for some directions and hit the text in others(I assume that was the passing axis plane issue), and once I tried hidding the text before raytesting (so it would ignore it) I instantly got a bugsplat.
Anyway, removing all 2D text is a solution for that.
Oh I see now, my bad, I was only looking at the last post date.
@hpnisse said:
You can change density of objects if you have SketchyPhysics3 [Download-link; http://sketchyphysics2.googlecode.com/files/SetupSketchyPhysics3x-Jun27.exe].
In the UI panel there is a box named "Density" (standard value, 0.2). Cause "Density" is the same thing as "Mass", or am I wrong?/hpnisse
Um, did no one notice CPhillips just recently published the newest SpetchyPhysics 3.1
http://forums.sketchucation.com/viewtopic.php?f=61&t=31262
It's about the same as SP3x-Jun27 but that was an experimental version, SP3.1 is fixed up with alot of new features.
And mass is density multiplied by volume