skin (surgery) simulation

Blitz3D Forums/Blitz3D Programming/skin (surgery) simulation

orion one(Posted 2003) [#1]
hi out there, i am trying to write a simple skin simulator, based on meshes.

i am not quite sure of the best method to do it, until now i figured out how to get vertexcorrdinates from an imported mesh into 'Type' entities. i then managed to represent all the vertices by drawing cubes on screen...

ok, now : how do i make textured triangles appear ? (instead of cubes/spheres/etc) i need to have some vertices disappear (simulating wounds or skin loss)

this is only the beginning of a surgical simulation, thx for your help!


TheMan(Posted 2003) [#2]
Man you are really doing serious project.... I don’t know much but I think you need to go for un-welded vertices … also I think some real physics should be used like pressure, also the vertices in all skin model should be relative (e.g. pushing one vertex forward should cause a shifting effect with different distances to the surrounded vertices) and when you remove triangles (for wounds) you need to show skin depth for realistic simulation.

All the best


Gameworx(Posted 2003) [#3]
Wow, that project sounds really interesting! :)


orion one(Posted 2003) [#4]
thanks for the interest guys !

Hyderman, the physics part is partially already written , and yep you are right all vertices are bound with 'visco-elastic' functions. i have realistic data about this aspect of the simulation.

and yes, the visual aspect will be realistic, the skin being shown in various layers, i even plan to show pulsating blood vessels and spitting (but not too much) blood when it comes to. this is indeed a serious project lol.

the trickiest part for me is to use entities; i have done a simple simulation with arrays, but it is not intellectually satisfying and i want to use all the powers of B3D ...

so, for now i need some help to write the routines that pick all vertices from a predetermined mesh (a human model, or a part of it), and that shows them on screen in textured triangles, with holes were i cut etc. practically, how can i tell B3D that a particular vertex is bound with four other vertices ? (the one left to it, right to it, above and beneath it ?) can this be done dynamically or should i store it at the beginning of the routine with a 'field' command ?

i.e.

type skin
field to-who-this-point-is-related-Left
field to-who-this-point-is-related-Right
field to-who-this-point-is-related-Above
field to-who-this-point-is-related-Under

get vertices from a surface

store the vertices of the points right, left, above, under in the fields

but again this cannot be the solution because do not come in square grids like terrains do ...

thanks for your ideas !!

brainstormed Orion One


skidracer(Posted 2003) [#5]
I would consider painting transparent pixels onto the skin texture to reveal the surface below.


orion one(Posted 2003) [#6]
thx skid, going to think about it and will come up with some code


Skitchy(Posted 2003) [#7]
The skin won't be able to 'split' ie. pull apart if you do it that way. What you're probably looking at is dynamic vert/tri creation/alteration. I've heard this can be a REAL nightmare to implement, but is by no means impossible in Blitz.
You obviously don't want to JUST be able to split the skin at existing vertices as this wouldn't be very realistic.

Check out the custom .b3d loader in the code archives for the code to create verts/tris (as you originally requested).

Are you thinking of selling this? I imagine you could make a fair bit of cash if its good - anything do do with medicine/surgery is a money-spinner.


Anthony Flack(Posted 2003) [#8]
"Microsoft Home Surgeon"
No experience necessary! Impress your friends! Save $$$!

Seriously, it sounds like a very interesting project, and certainly it's something different.


skidracer(Posted 2003) [#9]
I would be more interested in the spinoff zombie game with textbook accurate guts (yes that is mark sibly with green shirt)...


Tom(Posted 2003) [#10]
Heavy duty stuff! I'd stick with needles & oranges :)

Tom


Anthony Flack(Posted 2003) [#11]
Hey, neat! Is that an amiga emu made to look like a GBA or what?


orion one(Posted 2003) [#12]
hi guys, i actually am a plastic surgeon and i plan to make the first (at least to my knowledge) realistic surgical simulation (skin flaps, even tyhings more complicated as breast surgery etc).

i'm trying to figure out the concept of cutting the skin, losing skin flaps, or even add skin, all this dynamically. the visco-elastic model of the skin reaction is almost ready, but the graphical part isn't.

i also plan to use one or two virtual reality gloves to perform the surgery.

and ... yes, this will be a commercial soft.

special thx to skitchy, i'm going to check all this out after work.

Orion One


RKMD(Posted 2003) [#13]
Hello Orion,

Best of luck with this. I myself am an orthopaedic surgeon, and have played around with similar projects to simulate total joint arthroplasty. To this end, I've tried Darkbasic, Blitz, and even Conitec's package, but have found none to be really ideal for the necessary mechanics.

Skeletal anatomy and hardware are not difficult to model (in fact, there are many extant files available), but the real devil of a time has been in accurate modeling of 3D anatomic structures such as vessels, nerves, fascial planes, etc., and then incorporation of a modicum of real-world behavior. I have occasionally tried modeling them as splines, or as .3DS objects, but simulating deformation (or worse, transection!) is quite challenging, especially when you consider that realistic behavior requires extremely complex physics (e.g., a perforator artery is deformed by pressure on the overlying gluteal muscles, which themselves are influenced by numerous vascular and fascial tethers... or the leash of vessels around the femoral neck are displaced and tensioned by what you are doing to the capsule... or basic muscle tissue contracts with manipulation... you begin to see the extreme difficulty in modeling viscoelastic and physiologic behavior of adjoining anatomic structures).

In the end, I have settled for creating 3D instructional programs for resident/student teaching, which lacked the type of interactivity that I desired, but were not nearly as difficult to produce (especially with the limited time we have for these endeavors!). If you are able to realistically model the behavior of STSG's, free flaps, rotational flaps, etc. it would be an enormously impressive feat. A number of orthopaedic implant manufacturers have given this at least passing interest and instead focused on easily producible multimedia slide shows when the difficulty of producing such a piece of software becomes evident.

I wish you the best of luck, and if you find that you are able to make this work, please drop a line here so that I may take a look at your project. Our university and residency program would have an interest in such software.


Skitchy(Posted 2003) [#14]
If you're thinking of using VR gloves, you should definitely check out the P5. Beeps has already wrapped the SDK so that you can use it with Blitz.

Check here :
http://www.blitzbasic.com/bbs/posts.php?topic=20809

I assume you can use 2 at the same time, but I'm not 100% sure. The fingers all send analog 'bend' messages, and the glove can be moved in 3D space and is tracked via infra-red, so it's ideal for what you want to do.

The major bonus is the price : ~£50!


orion one(Posted 2003) [#15]
thanks RKMD,
i have read you with the highest interest, and i would like what you already have achieved and most of all the way you did it. until now i have produced 'realistic' skinpatch one can transect in every way. i do have an interest in biomechanics and have developped a new skin stretching device, so i can get fresh visco-elastic data everytime i want.

for the modelling of vessels and/or nerves, as for other structures, i thought of two ways of achieving this : 3D-ultrasound or 3D-scan reconstructions, or the cheaper way, with a VR Glove (as the P5 from EssentialReality or the 5DT DataGlove-16W from iReality).

if you allow me, we could get into more surgical details via Messenger, or we can keep the chat here.

And thanks to Skitchy,

i have read the topics about the use of the P5 within B3D, and i think i will get one glove at $79.99 (or £50), even if the product from iReality is more what i finally need. but it's more expensive, so i will begin with the P5 i guess.

c ya

Orion One


RKMD(Posted 2003) [#16]
Orion,

I'm afraid I'm not sophisticated (or web-savvy!) enough to use messenger services, but I do maintain an e-mail address for this type of posted communication at rkennon3###@... (delete the #'s - they're to throw off spambots). Besides, I troll the forums too infrequently for anything but email to be practical.

As a further thought, an area where orthopaedic and plastic surgery interests most likely overlap would be with hand & digit work, such as advancement and V-Y flaps, etc. I'm not sure how specific or general your interests are.

Another area for software simulation in which many orthopaedic surgeons would be interested, and which may be significantly easier to simulate, is arthroscopic surgery. Because this primarily involves getting a spatial sense from watching the video screen without much tactile feedback anyway, or the need for something akin to finite element analysis to simulate adjoining tissue deformation, it may be significantly easier to create. Other than endoscopic CTR, however, I am uncertain of what arthroscopic procedures in which you would also be interested.

At any rate, please drop me an e-mail at some point - I'd love to chat with you above it further. It's great to find someone else who shares this hobby.

Cheers,
Robert Kennon, M.D.