Blood Cells!

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Blood Cells! // Tech Forum

1  |  

Post by Matski007 // Jul 26, 2008, 12:32pm

Matski007
Total Posts: 539
pic
Was wonderinf if somebody could help me, im wanting to make an interior of a vein (I have done this before) but this time I want to animate it, and rather than manually animated each cell automatically I was wondering how I might somehow simulate it in workspace? is there particles? and if so how do I use them? also is it possible for the cells to bump into each other and such.

Post by Matski007 // Jul 26, 2008, 12:32pm

Matski007
Total Posts: 539
pic
oh, and I only really need them going in a straight line

Post by Jack Edwards // Jul 26, 2008, 12:49pm

Jack Edwards
Total Posts: 4062
pic
Hmm... Norm would be the one to ask on this. There are vacuum and fluid simulation examples if I recall correctly that you could look at as well.

Post by poulos // Jul 26, 2008, 3:24pm

poulos
Total Posts: 6
If you really wanted to do it right the cells near the vessel wall would travel more slowly than those near the center of the vessel (can this be done?). Also the movement would be pulsatile (heartbeat) and, if you wanted to go all the way, the vessel walls would bulge outward when the cells were traveling at max velocity.... or perhaps it would be just as cool if you could get the cells to just move down (or float up by buoyancy) a rigid pipe.

Post by Jack Edwards // Jul 26, 2008, 4:21pm

Jack Edwards
Total Posts: 4062
pic
Morphs could be used to simulate the contracting and expanding. It would be interesting to see if the fluid physics speeds up the blood cells when the blood vessel contracts and slows down when it expands.

Post by Délé // Jul 26, 2008, 4:29pm

Délé
Total Posts: 1374
pic
Should be possible with physics and a little scripting. The physics should be able to get the cells floating through the veins, and you could write a little script that would make the flow pulsate.

Basically all you would have to do is select your cell and apply physical attributes (The button that looks like rubber tire in the workspace toolbar). Then start and stop physics (bottom toolbar, third from left). Two new physics nodes will pop up in the LE. On one of them you can adjust gravity. You could set the gravity in the X axis instead of the Z to make the cells move sideways.

Then you could write a simple script that would make the gravity input pulsate when physics is running, thus making the cells move like they are pumping through a vein.

Attached below is a very quick rough example scene. Just start physics and the sphere will move with a little pulsation. This would need to be refined much more, but something like this should work.

Once you have one cell with the physical attributes you want and working good, then you can use one of the Cluster scripts that I wrote a while back to make multiple copies of it.

Here's where you can find the cluster script:
http://forums1.caligari.com/truespace/showthread.php?t=3804

Not sure about making the inner cells move faster than the outer ones. You might be able to find a way with a little playing around.

Post by poulos // Jul 26, 2008, 4:56pm

poulos
Total Posts: 6
Not sure about making the inner cells move faster than the outer ones. You might be able to find a way with a little playing around.


In the real world the vessel walls travel at zero velocity relative to the cells and brake their movement (due to various 'sticky' wall-cell interactions). This slows down the cells near the wall (but has less effects on cells far from it). I often wondered if the magnetic tool can be used to mimic this interaction - but isn't the magnet all-or-none or can the strength of the magnetism be varied?

Post by Délé // Jul 26, 2008, 5:10pm

Délé
Total Posts: 1374
pic
Yeah, it's been a while since I've messed with physics, but you should be able to adjust the friction, electrostatic charge, etc. So you can vary the attraction forces between objects. Messing around with some of those settings might produce the result you are looking for.

After you apply physics to an object, you can enter it in the LE. Inside, there will be a PhysObject node where you can change many physical properties for the object.

Post by jamesmc // Jul 26, 2008, 5:11pm

jamesmc
Total Posts: 2566
Funny, I was thinking about this the other day. I had done some bubbles passing through a straw in After Effects and was contemplating how challenging that would be to do in tS procedural animation.

The old science school movies of blood vessel animation tied into my scattered thoughts and lead me back to here. :)

Post by W!ZARD // Jul 26, 2008, 6:42pm

W!ZARD
Total Posts: 2603
pic
You should be able to simulate this quite effectively - tS physics has an "electrostatic charge" option which you could set to slow corpuscles near the vein wall - also the normal collision factors should contribute to this slowing effect as cells in mid flow only collide with other cels moving at the same speed where cells at the edge contact the static vein wall. You could have a LOT of fun with this!

Post by trueBlue // Jul 26, 2008, 9:07pm

trueBlue
Total Posts: 1761
pic
Not sure about making the inner cells move faster than the outer ones. You might be able to find a way with a little playing around.
New to tS7.6 is Physics Events. Check out the 3DSoundBall scene in the Scenes - Base library. Navigate inside the PhysSoundBall object where you can see how the author uses Physics Events to play a sound file when the Ball makes contact. Just a guess but I suspect that this might be useful for when the outer cells come in contact with the walls.

Post by Matski007 // Jul 27, 2008, 1:24am

Matski007
Total Posts: 539
pic
OMG! lol I didnt think into this enough to contemplate all the other factors.


Thank you all for your help, I have a lot to take in lol. Its all very hard because I have very little experience with the LE and none of scripting.

But perhaps with time I should be able to work this out.


The other problem is that I was wanting a continuous stream of the cells, thus there would be rather a lot! lol so is there a way of having them dissapear at a certain point so there is only a few hundred at one point in time

Post by W!ZARD // Jul 27, 2008, 3:02am

W!ZARD
Total Posts: 2603
pic
Sure - :D You'd set a cell so that at the start of the animation cycle it moved until it was off camera save the keyframes as a clip then just cut and paste the clip. The non-linear editor makes animating as easy as it's possible to get I think!

Post by Norm // Jul 27, 2008, 3:10am

Norm
Total Posts: 862
pic
I believe Jack is referring to some work I did for the ts7 & ts7.5 manual. Part of the physics scenario includes ability to set local environments. There is a scene with a short series of elbows/piping, that when physics is run, a ball is moved through the pipes. I made it work by creating objects that filled the volume of the piping. These objects were turned into local environments and were the reason the ball moved. The piping itself served to hold the ball within the volume of the pipe.

Everything else said so far by folks apply as well. Physics events are pretty cool and all the various attributes for physics objects are equally interesting. It does take some scripting knowledge to put it all together. Scripting is a definite bonus with trueSpace7.6. If you never scripted before, there are some courses created that can help you understand how things work.

Tuesday night scriptor meetings can be bonus too :)

Post by TomG // Jul 27, 2008, 7:20am

TomG
Total Posts: 3397
BTW lots of cool ideas here for advanced effects, but my suggested workflow would be to start simple then build. Get the local environments etc that Norm mentions working, so you have a straight regular flow in a static pipe. Then build in new features - perhaps pulsing to the speed next; then perhaps bulging of the pipe with the pulsing next; then perhaps slower cells near the edges next.


This way, you don't bite off more than you can chew, you see steady progress (which keeps your morale up in a longer project!), and if time runs out, you always have something to show for your work rather than ending up with nothing finished.


Many projects fail by trying to do too much at the outset, while "baby steps" or "little bites" will get you through to the end!


HTH!

Tom

Post by Jack Edwards // Jul 27, 2008, 7:46am

Jack Edwards
Total Posts: 4062
pic
If you loop the "pipe" back around to the start, there would be a continuous flow of blood cells with out the need to key them back to the beginning. That could save a lot of work.

Post by Délé // Jul 27, 2008, 8:59am

Délé
Total Posts: 1374
pic
I've never tried this, but I think you might be able to make the cells teleport back to the starting point when they cross a certain line or hit a wall at the end or something.


Many possibilities. Just going to take some playing around, step by step as Tom mentioned. :)

Post by noko // Jul 27, 2008, 11:54am

noko
Total Posts: 684
TomG is very wise! Great suggestion! I've notice too this is actually how the professionals do it as well, get a very basic scene going and refine, refine and refine. The Matrix (original) had video on DVD on making the ship which showed the progression from rough to final. Getting one part down and moving to the next, adding and adding to final blow out animation comes about.
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn