PDA

View Full Version : FXWars! CarCrash!: Christian Lang (realistic)


Laeng
05-19-2005, 02:13 PM
Thats my first Fx-War, and Iīm realy happy that I found the time.
I have this one accepted as a university project, so there is more than one eye on me.

It starts perfekt. The power adaptor of my laptop burned during shortage, and Iīm waiting for a new one
since 2 days. Iīm more into planning now, so it might be good for something. unfortunately I lose lotīs of time by walking
to the internet caffee in town.

Story:
I do a frontal crash against a solid barrier. Probably a "Liftfasssäule" donīt know the english term. Its those big beton cylinders in some towns
where you can place posters of events or commercial stuff. I probably show someone inside the car drinking alcohol, then some very low shots to get the impression of speed.
He then hitīs the wall, and his bottle flys against some "donīt drink and drive" poster. Hmmm... must be a convertible for this.
sounds a bit simple, but itīs my first idea, and since Iīve lost some good friends on that topic, I would like to do it that way.

Kinds of Scenarios:

I take this project as an exercise for later projects. Beeing still a student, I have little experience of how shots like this
would fit into the pipeline of a commercial or a full movie. I think Iīll get some that experience by forcing me to think about it.
The kind of approach, a TD or animator would take would highly relate to those attrributes, so my first decision is to
make it fit into a certain scenario. I write a list of different scenarios, and choose the one that would possibly fit into a timeframe of
one month and two weeks.


Scenario 1
A movie, one crash shot, very slow and illustratic.

A shot like this would need a high degree of realism. If itīs a new car, I would take existing crash simulations as a reference, or even feed their data into
my animation package.. There are many packages which calculate crashes very precise, and some of them even run on Pcīs.
They wonīt calculate every screw, but theyīll be suficcient. A large company could afford to by the software, or get the reference, so they could use it for further projects.
ONLY WORKS WITH REAL CARS. SLOW TIMECONSUMING SIMULATION


Scenario 2
commercial, or music video. One crash, very slow and illustratic, maybe fantasy

We have a lower need for full realism in commercials, since they are often very stylized. They wonīt have to reuse the software, so
a skilled animator would do a lot of research, look at photographs of crashed cars, and mainly animate it. This will take longer than a simulation,
but give a higher degree of freedom.


Scenario 3
A movie, different car shots, realtime to 50% speed:

There is a need for an indefite number of crashes. There is a need for a fast system to predict the behavior of the cars on a rough niveau, as well as a detailed approach. Since the timeframe is very limited, there will be a rough simution giving the carīs precrash and postcrash-movement, as well as an average degree of deformation. The simulation system can be modified to solve various kindīs of crashes, so the company gains recources for duther projects.


Explanation of Choice
---------------------------------------------
I take scenario 3.

This contest is highly related to simulation, so I want to include simulation. The virtual outer scenario will force me to develope a pipeline that makes sense.
I will do one crash, run it through the simulation, and modify it by hand to get a more complex result. That way I can get a tool that is reusable, and iīll gain more experience of this area.

Timeline:

I decided to let the story mature during the project and to concentrate on the technical aspects.
Since this is a simulation shot, Iīll plan the simulation first.

The first thing i did is research, lots of research. I found a lot of equations, and even more statistics. I have spend the last days in getting a clear impression of how the different forces in a crash are related to each other.
Iīll spend the next days sorting out which of them are needed, which ones are to detailed with small influence, and where I can take statistical or generic data instead.
I wrote the equations on little papers, and test them now and then over the day. The result is that i dreamed about Newton throwing apples on me last night.
Iīm happy that those werenīt macs *ouch*.
My main goal is to reach a realistical pre and post movement of the whole body, and a relation between the "degree of deformation" and the compartment Force, that would appear at an average car.

I start with the deformation box. I call it box, beceause I mainly use it as a black box. I donīt care what it does or how, as long as the result fitīs into the range of statistical data. All it does is giving out forces which are the taken by the (Dynamics1) system.

I will have to model a rough car with the attributes of my final hires car: mass, volume.
I will configure the Dynamics1 at the same time. Dynamics1 is just the maya Rigid-Body taking force values from the Deformation box. As itīs a black box, it will just take values, no matter how they are created. This means that I could just exchange it by a force-graph of a real crash to test the system.

At the final stage of the deformation box, the test box is created. It compares different forces and values, and checks for some basic rules.

1) Does the amount of energy stay the same at both sides of the equation?

2) Do the results fit into the statistical range? (deformation, Force vs. Peak force...)

The test box also plots (or bakes) the results to animation curves, so they can be compared.

After this, and when the animatic is done, I take care of the pre-bahavior which will mostly be hand-animated with a few dynamics.

Meanwhile Iīll prepair the hires car model. Iīm thinking about building blend-shapes and contraining them to the deformation blocks. This would allow to crash the car several times, wich is not needed im my scene, but might be in the other virtual ones. I could run the scenario several times, and pick the best result.

There is no rendering included yet. My main goal is the simulation. I will include very rough rendering, and care about the rendering after the challenge since I donīt think that Iīll find enough time.

Concept of Approach

I have a large mindmap of the concept, but I canīt scan it right now. Iīll post this part in detail as soon as my computer is repaired. itīs a little bit tricky, and Iīll need that map to explain it.

Laeng
05-20-2005, 02:42 PM
I made a simple Mind-map to give a better understanding of what my approach is.

http://www.cgknowledge.com/fxwars/main_mm.gif
http://www.cgknowledge.com/fxwars/deformation_mm.gif

NODES:

-E means equation or expression, or both. Every part that is actually calculating.
-A is an Attribute. A value that can be passed between different nodes.
-P stands for Process. This is more a (if else) expression. Smething that takes decisions based on conditions, or establishes a connection which doesnīt run just with atrributes.

I use the term BOX beceause a box is closed. It doesnīt matter what happens in there, as long as the results are correct.

Since for me the Maya dynamics engine is a black box, I keep it seperated from my own engine. The shortest way to the values I need is the velocity of the car.


ENERGY BOX
I use this VELOCITY and the MASS of the car to calculate the KINETIC ENERGY of the car.

My approach is not physical exact, but it should work on the degree of precision needed here.

What I want to achieve is a realistic relationship between speed, impact angle and the degree of deformation.

My approach bases on the assumption that the car body will push against the barrier until all the energy is eaten up by the deformation process.

The deformation box will consist of a matrix of simple boxes. The will be fed with average values that fit to their position in the car. The main input value is the penetration depht of the boxes by the barrier.
The equation will then give us a value of how much energy has been absorbed by the cube, and write it in the ABSORBED E-Value. This will result in a squash of the cube. The cube will then be displaced backward in the direction of the impact, at a value relative to the ability of the cube to consume energy.

By traveling backward, the cube will give the not consumed energy to the next cube. The Ábility to deform is highly related to the STIFFNES. The more it is deformed, the more energy is needed. Therefore if a high deformation has already taken place, the other cubes will have to take the energy.

At the end of the deformation step (one frame), the new CENTER OF MASS is calculated, after that, A common attac point and direction for all forces is calculated. This can (at least I hope so) be used to calculate the impact momentum of the car, or the angular force if you may call it so. (I only know the proper german terms, so sorry if use a wrong english term).

Those values are fed into the Energy BOX, together with the absorbed energy.
The Energy box then calculates the acceleration of the car, as well as a possible rotation, and the new center of Mass. The past colision Dynamics will calculate the movement during the colision.

I use the test box to compare the results, and to plot statistics.
I could e.G. plot the graph of the acceleration, or different forces, and compare them to the values measured in a real crash. If the donīt Iīll readjust the deformation box until I have a euqation model that fits.
Remember, the main goal is to get a realistic relation between force and deformation.
Iīll use a test-readjust-procedure to get this part right. I already have lots of statistical data, wich will help in this process.

One problem that still has to be solved is the fact that most materials have to phases during deformation:
A elastic phase, where the deformation is reversible. The energy is stored and given back inverted. And a plastic phase where the deformation is irreversible.
If there was no elatic phase, the car would stay at the wall.
In fact, most crashes Iīve seen. (Iīve seen some bad real ones) ended with the car being pretty far away from the Barrier, even in a frontal crash. Therefore Iīll have to include elasticity, and the resulting forces.

There are two kinds of crashes:

rigid barrier - highly localizedinertia forces
distributed more uniform - deformable barrier.

I will do the first type, to keep my simulation-model simple. This is not much time for such a task.

Thatīs it for today. Iīll have to work now, not just talk about it.

:banghead:May the impact force be with you!

RobertoOrtiz
05-20-2005, 08:16 PM
I have to admit that this thread is a great read. I am looking forward to your first images.


-R

Sir_Vuclan
05-21-2005, 01:46 PM
thats some good information, I'll have to remember this when I start crashing my cars.

Sir_Vulcan

Laeng
05-23-2005, 04:54 PM
I found nearly no time to work on the project this weekend. I spent some of it between hundreds of machanic books. For today Iīm fed up with that stuff.
I havenīt worked out all the deformation mechanics yet. I talked to some experienced engineers, and they donīt know of any equation that would realy fit in my case. The problem is that one part of my simulation model is to simple to give results that
would be scientiffical wothfull. And for the other part engineers would just take measured data.
Iīll continue to work on this problem, but it seems just like Iīll have to find an equation thatīs completely wrong from the scientists view, but works in my case.
A realistic approach woul take me 4 month to understand all the dynamics, and another year to programm it. (Mel is unable to deal with such data). Seems like itīs me who hit the wall first. It is not impossible to get a good looking result, but itīs going to be much trickier than I thought. Iīll post the results of my Research as soon as they form a clear image.


Iīm currently testing the maya dynamics engine, to see If it fits my needs, and how it deals with scientific principles. This is the connection point between the deformation box and Maya, so this point is critical.

Impulse of a force F
--------------------------------------
The impulse of a Force F acting on an object is equal to the product of the force and the time interval during wich the force acts.

impulse = F * t(i)

Definition of Newton (N):
-----------------------------------------
The force needed to accelerate one kilogram one meter per second squared.
If a force of 1N acts upon a mass of 1kg, it takes one second to push it to a velocity of 1m/s.

1N = 1 kg*m/s^2

I setup a test to see if this works in Maya. There is one option to externaly influence the dynamics the way i need it:

It is the impulse channel. You can set it with the channel box.
The use of the term impulse is misleading, since impulse is the complete influence of a force at a interval of time. The input in Maya is animatable, and evaluated every frame, therefore we should take the impulse in Maya as a input for a force with the characteristic of an impulse.

"The impulse channel in maya is evaluated as a force, and suits for time-limited forces like an impulse."

I set maya to fit the Definition of Newton. (We donīt have any units here like kg or meter,
so I have to test if the units in maya fit to the scientifical units.)
(1 distance unit = 1meter
1 force unit = 1 newton
1 mass unit = 1 kg)

I set the following values:

mass = 1
Impulse(Force) = 1
time interval = 1 s. (25 frames in PAL)

The result should be a velocity of 1Unit/s

at 1second the velocity is 25 units,
the translation is at 0.13 units.
THIS IS TOTALLY WRONG!

Conclusion: The translation is evaluated in a different unit as the velocity!
-The Impulse is evaluated in frames, not in seconds.

The Maya Definition of Newton is: (u means Maya unit)
------------------------------------------------------------------------------------------
If a force of 1 acts upon a mass of 1, it takes the 25th fractional of a second to push it to a velocity of 1.
An object with the velocity of 1u/s travels a distance of 0.01u in one second.

This is a realy bad behavior for Dynamics, and I have to fix that first.

Causes:
After some research I found out that maya is calculating the dynamics velocity in cm.

Under Window-Settings/Preferences-Preferences-Settings-Working units
I can set those values to cm. Now distance and velocity fit together again.

Test:
What about gravity? If I take an object and let it fall with an acceleration of 9.81m/s, will it accelerate to a velocity of 98.1 cm after one second?

The answer is: NO!
Maya calculates cm like meters. It doesnīt work with the usual units, not even with itīs own.

So how do we fix this?
1) We accept itīs irritation with meter and centimeter. We leave the units to cm but treat them as meter.
2) We create a costum attribute set. I call it i_force. We set the impulse by the following expression: impulse=i_force/25

Problem:
the following expression leaves the result 0: $x = 1/25

why? Maya takes both values as integers: 1 as well as 25.
Therefore Maya treats the result as an integer and rounds it down to 0.

Solution: Divide by 25.0 (Maya recognizes this as a float, and therefore gives a float as a result)

Test:
Velocity =1 after 1s

To test the distance, we assume that the distance is v*t in a constant motion.
v*t is the area on a function graph.This graph is divided into 2 parts by the acceleration function.
So d = 1/2*v*t.

Distance = 0.5 after 1sec at vel=1
2 at 2sec at vel=2

Now the dynamics are OK. This was a long text for such a simple problem, but since the appearing forces vary 2500 % from what they should be, we have to look closer at the problem.


I want to use the impulse to connect my deformation with the Maya Danymics. The next thing Iīll test is the Impulse Position and itīs influence on the object.

IMPULSE AND ROTATION:
If I displace the impulse from the center, will there be a difference?

Yes, there is a difference! The object starts to rotate, but not in the right manner.

If an object hits another one in a perfekt 90°angle, the resulting forces will cause a translation.
if the angle is different, a part of the energy will result in a rotation, and the translating force will be weaker. This isnīt the case in Maya, wich kind of sucks a bit.

The next thing Iīll try to do is to create a locator and transfer a world-position to the impulse position, since the impulse-position is relative to the object, so I get a clearer impression of how
the dynamics work (or donīt work in this case)

I paranted the locator under the object. This method seems to work, but it doesnīt influence the force vector, just the point where it attacs. For my final model I will have to calculate the direction of the force based on the angle of the object.
For today I leave Maya alone, and go back to the math stuff.

Laeng
05-23-2005, 04:57 PM
I should do shorter posts. Who reads this?
Anyway,
I would like to use a new VW Passat as my crash car. I choose this car beceause it has a good length, so the crash can cause a lot of visible damage to the front. I also have a lot of construction details aviable, and this car is common in my area. ( I used to rent them when I was drivin home from Berlin)
I have a tendency to take the hard road beceause I can learn more that way, but in this case time is an important factor, and I have few.

Modeling is a huge time problem. I would like to take a finished model, but I will have to go through all steps beceause I use this as my semester project at university. I start modeling as soon as I am sure if the simulation will work. I hope Iīll reach that point about Sunday.

colt
05-23-2005, 06:34 PM
Well, there are people who read your stuff. It's pretty interesting. :)

I can't follow your problems with mayas dynamics. I just did a gravity test. Units set to cm, time to 25 fps. Gravity is 981. Start at frame 1. At frame 51, which is exactly 2 seconds later, the falling sphere is at -1962. Perfect result. s = a/2*t^2 ... 9,81/2 * 2^2 = 19,62. But maybe I misunderstood some of your stuff.

Laeng
05-23-2005, 08:29 PM
Seems like what I wrote is a bit confusing.

What I would like to have is the option to just enter the standart units. Someone who picks up the usual 9.8 in a book and enters them will get a wrong result, without maybe realizing why. I just wanted to point point out that here is a possible troublemaker. Beceause there are no units visible, I would like to use the standart units meter kg second, itīs less confusing once my models get more complex, and Maya doesnīt mind.

Thereīs still the problem with impulse. If you use cm as cm, you wonīt have to divide by 25, you can instead multiply by 4 to get 1 meter.
impulse of 4 = 100 units after 1 second.

Ok, this is much better. youīre right, thanks a lot!

<Pino>
05-27-2005, 12:48 PM
any update here ? :)

Laeng
06-01-2005, 10:58 PM
I spend the last days traveling a lot, trying to fix trouble and get work done that appeared out of nowhere. No internet for a few days, and right now i canīt upload.
Iīm back home at Sunday night. Good to have a laptop.
I decided to change my pipeline a bit. I started modeling the car one step earlier. There is few time left, and even if I have a good simulation, itīs worth nothing without the car.
I guess I will lock myself up, and plug out the phone when I return. At least for a week or two.

I have to leave again. Big update coming monday. (I know that some are interested in my approach, and the details, you will get them, i promise. Iīm not sure if I will get a good result in time, but iīll keep working on it even after the challenge.)
Clock hitīs 12 pm. :buttrock: Yea, 25 yeras today. (Hey, thatīs cg :deal: , I start my 25th birthday posting on cgtalk :buttrock:

Laeng
06-08-2005, 02:49 PM
Iīve started to build some makros and mess around with Maya. Itīs just basic tests for now but Iīve already runned into huge problems.

I wrote some procedures wich build up costum attributes and expressions. I will implement them in some kind of simple GUI later.

My main focus right now is to get the depht of deformation at a certain time. My first idea was to use the bounding-box and trace the distance to a "closest point on surface".
I had to learn that the bounding box atribute is locked to the World axes. It doesnīt change itīs orientation, so if you rotate your object it changes itīs size instead. Thatīs not how I like it.

I found a realy nice(but slow) script: computePolysetVolume
It calculates the Volume of polygonal geometry. After some modification I was able to use it in an expression.
My idea is to calculate the volume of the intersection between the deformed object and my barrieer. I first tried the boolean approach.
Unfortanately it doesnīt behave very well. I get negative values going up and down randomly.

I tried softbodys, and they work perfektly.

Next step:
I build those attributes by random:

1) current Volume
2) initial Volume (calculated at frame 1)
3) Relationship in percent.

I use the last one to drive a shader color for some visual feedback. Itīs turning from green to tred depending on the degree of deformation.

If i animate the softbody object(on the transform node) it works perfekt. What I would like to do is to feed the motion of a active rigid body (the car) into the motion of the softbody.
It tried the following:
1) Parenting
2) Point constrain
3) Connection with Connection Editor
4) Expression

They all give me some motion, but I lose the rigid-Body character. In all 4 cases my softbody goes through my barrier.

I tried the following: pCube1.translateX = frame;
This works.
A constrain to a simple animated object also works.
If I constrain the parent object I get a failure too.
So my problem is the rigid body.

I have to options:
1) I fix this problem
2) I bake my Pro-Colision-dynamics and start to mess around with velocitys, angles and forces on my own.

I realy prefer the 1th one.

For now this is my main problem. If anyone has some ideas, please help me. Iīll keep working on it, and iīll post some of my mel-scripts as soon as they are in a usable level.
I suppose itīs a restriction of the dynamics engine. Maaybe it doesnīt occur when I run 2 solvers.

blasphemy3_d
06-08-2005, 03:19 PM
I canīt wait to see what you are working in :)

Laeng
06-08-2005, 04:59 PM
thank blasphemy3_d. I hope I can show some results soon, but right now, it doesnīt seem like it.

Iīm still messing around with that problem. Iīve digged deep in the hypergraph. (I have to post something so you see what I meen. but my problem with posting is that I have a mac for Internet and a pc for my work. My memory stick is damaged so I have to burn a CD everytime I want to upload. So sorry for the low posting frequency)

Back to the hypergraph:

There is no direct connection from any of the rigid-body-nodes to my softbody.
I always thought Maya uses those nodes as some kind of blackbox. There is a value plugged in an attribute, and the node doesnīt care where it comes from.
At least thatīs what I learned (Seems like the world isnīt that flat).
Right now Iīm aiming for updating problems. Maya doesnīt evaluate all the nodes at a time. The is a special order behind it. I guess that this order creates my problem.

The only other option is that Maya checks for A Rigid-Softbody conflic, and disables the softbodys without leaving a message.
Thats not how maya behaves usually.

Itīs me who hit the wall, not the car. :banghead: Long night ahead, gonna make some real strong coffee and look out for ideas.

There is a passage about updating in "The complete Maya programming guide". I own it, but rent to a friend. Hope to get it back soon.

Gonzomuse
06-08-2005, 08:14 PM
Hi Laeng, Im enjoying reading your posts.

What made you choose such a scientific approach?

It just seems like an insane amount of number crunching and fighting with the fact that Mayas dynamics engine isnt "Real World" accurate, to acheive what could be faked to nearly the same level of "realism" (certainly enough to fool most viewers) in a much shorter time.

No offense is meant by this, I am very interested and inspired by your posts.
I would like to know if you have succeeded with Scietific approach's before?

Good Luck

Laeng
06-08-2005, 09:46 PM
Hi Laeng, Im enjoying reading your posts.

What made you choose such a scientific approach?

It just seems like an insane amount of number crunching and fighting with the fact that Mayas dynamics engine isnt "Real World" accurate, to acheive what could be faked to nearly the same level of "realism" (certainly enough to fool most viewers) in a much shorter time.

No offense is meant by this, I am very interested and inspired by your posts.
I would like to know if you have succeeded with Scietific approach's before?

Good Luck

Itīs hard to explain my choice since itīs more a philosophic decision than a rational one. Iīll try to explain it. This is not going to be a short explanation but rather some cg-passionate philosophy. At least I hope itīs entertaining.

For many people, CG is magic. When I was already a CG student, I went to Cinema to look at the first Harry Potter movie. I left cinema with a great feeling of identification. Not beceause I wanted to be a wizzard student, but beceause I was already one. Yea realy, cos this is what we do. We do magic. We create thing that donīt exist, change thing that do. We give live to ideas, pull them out of a "thought bubble" and put them into our world. Call it a illusion, for the audience itīs always real.

But though all the empathy and passion, it is not enough to give your ideas wings and let them fly. Remember the story of Icarus who build wings out of fethers and wax? As he came near the sun, the feathers melted, and he started to fall.
You need wings that are able to carry the weight of your ideas. How do you get them? Well itīs not enough to just thing about them. They stay an idea wich will not apear in reality. Magic is limited!
You have to construct them, give them a concept, a grid, an underlying structure, call it whatever. You have to focus.

Iīve seen a lot of great art, on cgtalk. and other places, and many people full of inspiration and ideas. Those who were sucessfull with their work, who managed to fly a long way, were not only those with inspiration, but those with focus.

I noticed one thing about me, and some other creative people at school: They are to much creative. Their heads are full of ideas, so many that they loose focus. Itīs like someone is throwing 2000 balls at you, and you are trying to catch them all. You wonīt catch a single one.

Why do I talk about this?

Well, there were 2 things happening while I was a student.

I learned, and I agree, that story, and character is the most important thing. Itīs what creates empathy, and no movie can live without it for a long time.
I met a lot of good drawers, storyteller, and animators. I realy like my school, but in my opinion, there was one problem:
Most people gain the impression that they all will be supervisors, lead animators, or directors. This might happen, but talking to professionals, I had to learn, that there is a lack of concepts, of technical knowledge.
Iīve seen many good projects fail, beceause of conceptual mistakes, or a lack of knowledge, and if everyone thinkīs heīs the next spielberg, no one wantīs to do the dirty work.

I explain this very drastic, but those are things I make up my mind a lot. Such conditions can realy consume all your energy. The decision I took beceause of this is that I want to learn to build better wings. I want to train myself to more conceptual and complex thinking, and I want to learn to teach myself. I maybe take the hard road, the very scientific approach, beceause it forces me to focus.
For now I leave all the magic to others.

For the future:
I met Karen Goulecas once, a supervisor of Day After Tomorrow. I asked her to write down something as an advice for a young student.
This is what she wrote:
"Visual Effects is the best carreer in the world, you can never get bored beceause you can never stop learning"
Thatīs what I want to do, gain experience, gain knowlege, and create something out of it.
There are people who will look at a tornado, and try to paint or animate it. Iīm the kind of person that would pick up a list of pressure and velocity data, and try to build a model of it, beceause it makes me understand the world a bit more. I think the right path leads somewhere in the middle. As you noticed, Iīm coming from the other side. I started very scientific but now Iīm beginning to fake a lot.

Thatīs so far, got to get back to Maya and my update problem.

Laeng
06-09-2005, 01:09 AM
Iīm still messing with Maya. Seems like it has to do with the order in wich Maya updates the nodes. I tried to change the dirty bits( The dirty bit tells Maya if an attribute has changed, e.g. due to user interaction or time-change. If the dirty bit is on, Maya recalculates all nodes connected to that output) without success. Iīll try to use a rigid-Body as goal until collision and then set the goal weight to 0. This will consume more calculation and be less accurate, but itīs all I have for now. I found some stuff about the dependency graph. This makes a good bedtime lecture. Itīs 2 am anyway, and I have to get up at 6.

Laeng
06-09-2005, 04:44 PM
The goal approach seems to work. Iīm not trusting it completely, but right now itīs all I have.
Iīm modifying my scripts. If theyīre ok, Iīll post some playblast tests tomorrow.

Laeng
06-10-2005, 02:38 AM
I have some simple Modules ready. Time to stick them together, but not today. 3:30 a.m. Iīm tired.
Iīm investing lot of time in writing macros and procedures. Itīs easier to do everything by hand, but I guess I can use them in combination later.

I wrote a simple movement-Energy-Calculation for the rigid-body, and a volume-base deformation calculation. I also have visual feedback with a shader that turns from green to red as the deformation takes place.
Itīs easy to script those, but as a MEL-newbie I find it tricky to handle all the possible error messages and conditions.

Iīll work on the softbody-feedback tomorrow. Iīll just try to decrease the rigid-body velocity by the amount of deformation on the softbody. It think itīs a good starting point.

If it works Iīll go on and care about vectors. My rigid-body motion works in 3 axes. If I want a realistic feedback, the force has to have 3 axes as well.

Laeng
06-15-2005, 02:29 AM
My aproach is much harder than I thought. Anyway, I made a documentation of my aproach and what I achieved so far. Itīs to big to post it here. I would like to keep my posts short and simple in the future, so I uploaded it to my HP. For those interested: here is the link

BIG UPDATE (http://www.cgknowledge.com/fxwars/update1.htm)

Gonzomuse
06-15-2005, 12:51 PM
HI Laeng, Im enjoying reading about your approach. Very thoroughly documented.

How had you planned to translate the cubes movements into a surface deformation?

I hope you are able to post your MEL's at some point.

No Sleep till you fall over......

Laeng
06-15-2005, 02:41 PM
I have some options, and iīll probably test them and maybe use a combination
My frist aproach would be a bigscale FFD with itīs vertices constrained to the cube-centers.
I could also use clusters on my geometry, or maybe even bones, soline deformers, there are lots of options.

I can use the cubes mesh (softbody) as eighter some kind of wrap-deformer, or to drive some FFDīs to produce a small-scale deformation. This way i can push the profile of the barrier into the hires-geometry.

My current problem is that the cubes are goaled. They will expand after the crash. I can solve this problem by choosing a different target geometry, but then itīll be tricky to reset them at frame1.

A few comments about "no sleep till you fall over:"
(I know they might sound very unpolite, but they are not meant to)

I can work about 36 hours with no coffee or sleep, but if one does this for months...
In fact I ruined my health on my last project, I falled over and woke up in hospital some hours later. I realy love CG, but Iīm still a student, and I can give all other students one good advice:
Watch your health.

1) If you are very tired, you do more mistakes, you donīt take the time to think about it, in most cases you just act by instink. As a result you invest a lot of time in repairing mistakes, and searching for errors, and you learn much less. (The human brain remembers about 80% less in such conditions)

2) Watch your spine (not the one of your character, your own) and your eyes. Take your time now and then, and look out of the window (your eyes need to focus some distant things in order to relax), and be sure to do some sports, or at least move more than 500 meters a day.

If you get used to it as a student, you wonīt have to think about it when youīre a professional.
Yes, things are different in buisness, there are stricter timelines, there are people depending on your work. But can still ruin your health in 10 years. I donīt say "be lazy", I just say take care.

Gonzomuse
06-15-2005, 05:30 PM
Hi Laeng, Thanks for the reply.

Im interested to know if the lattice with the cubes driving the verts will work. I have noticed real crashed cars have alot of sharp edges in the deformed metal and you would need quite a high res lattice to make these edges.

I was going to make another throw away comment regarding sleep, but i dont want you wasting more time replying when you should be slaving over a hot PC running Maya.

(This is what is known as "friendly banter" and as such should be responded to with much the same lightheartedness) ;-)

Ganimed
06-18-2005, 02:14 PM
Interesting stuff.
Hey Laeng, where do you come from?

regards

Ganimed

Laeng
06-20-2005, 02:36 AM
Hi Laeng, Thanks for the reply.

Im interested to know if the lattice with the cubes driving the verts will work. I have noticed real crashed cars have alot of sharp edges in the deformed metal and you would need quite a high res lattice to make these edges.

I was going to make another throw away comment regarding sleep, but i dont want you wasting more time replying when you should be slaving over a hot PC running Maya.

(This is what is known as "friendly banter" and as such should be responded to with much the same lightheartedness) ;-)


The small-size deformation is highly localized. I just use it to somehow capture the shape of the barrier. I would need to build a much more complex Simulation to get the sharp edges, and all the subtle material reactions.
I guess the easiest way would be to use displacement maps to create the sharp edges. But Iīm still so deep into MEL and simulation that I didnīt take much time to think about it yet.

Ganimed: Iīm from "Saarbrücken" in germany (15 km from France), but I study in "Berlin"

I tried to upload the next update, but there are some problems with the ftp-server, so itīs coming tomorrow morning.

Laeng
06-20-2005, 02:47 AM
FTP is working again, so hereīs my update:

I ran into the following problem:

My rigidBody is the goal of the Softbody. So once I loose Contact to the Barrier, the Softbody will return into itīs old Shape.

I tried to find a way to Bake the Rigid and the Softbody, and I had to work it out for about 3 days. You can read more about the problem and the solution on the following page.

Big Update 2 (http://www.cgknowledge.com/fxwars/update2.htm)

I also worked a bit on user interaction.

ivanisavich
06-20-2005, 03:11 AM
Hi Laeng,

Your theoretical knowledge is very impressive, and the progress of your "pipeline" is definitely interesting...but do you have any visual content yet (ie...animations etc)? The deadline is in only a couple of days!

anirudha
06-20-2005, 08:32 PM
waiting to see ur work.............
a very tough approah

Laeng
06-21-2005, 01:52 AM
Hi Laeng,

Your theoretical knowledge is very impressive, and the progress of your "pipeline" is definitely interesting...but do you have any visual content yet (ie...animations etc)? The deadline is in only a couple of days!


First of all:
Iīm not going to finish before deadline. Thatīs obvious since the first June week, and my recent problems in Maya realy made me miss the last train.

I would love to show some artwork like animations, wireframes and such at this point. Itīs obvious that this would be more interesting, and more entertaining than pipelines and functions.

Unfortunately I hade to make a decision.
It would have been possible to pull the Emergency Break, and change the concept with many cutbacks at the simulation to save some time for the artistic part, but the result would have been the following:

-The documentation would be worse, so none of you would get the slightest idea how the different parts fit together, and I wouldnīt be able to learn from all the mistakes and dead-end streets that occcured on the way.
-The GUI would be realy bad, so no one would be able to use it exept me.
-The simulation would just fit to this situation. No costumisation to other needs.
-I would get a bad result for the contest, and it would be nearly impossible to improve the result till my second deadline (30th of July) without restarting halfway.
(My university accepted this as my semester-project, therefore the second deadline)

I started to participate at this challange in order to gather experience with pipelines, developing concepts, and to share some of the knowledge and ideas. The fact that Iīm still a student gives me the option to continue working on the simulation, even if I miss the fx-wars deadline, and include the artwork and animation afterwars.

Sorry to keep you guys waiting.
Iīm working 18hour-shifts to at least show some stable simulation by the deadline.

RobertoOrtiz
06-21-2005, 02:26 AM
The dateline is this week, BUT the voting thread goes up NEXT WEEK (maybe Friday)
so until then I am turning my back....



-R

michaeljr
06-21-2005, 07:14 AM
you turning your back for all of us?

:)

Laeng
06-21-2005, 11:39 PM
RobertoOrtiz: Thanks a lot. I realy need that extra-time, and Iīll use it as best as I can.

michaeljr: Seems like he does, look at this thread.
http://www.cgtalk.com/showthread.php?t=250936

Spend the whole day cleaning up my scrips, throwing out old stuff, and preparing for the last few steps. If nothing unpredictable happens Iīll have the simulation running this friday.

Good luck to everyone.

Laeng
06-28-2005, 10:59 PM
Still fighting with Mayas little traps.

Problem 1: I have to calculate an average force as well as an average impulse position.
I solved this so far, but very different from what I expected.

Problem 2: The impact position has to be in local space.
What I recieve from my simulation is in World Space.

I found a conversion node, but it didnīt work right. I finaly got some workarounds but lost to much time.

Problem 3: I get fluctuations in the volume calculator. I guess it has to do with the accuracy in space conversion. Maya seems to skipp small numbers, so the volume changes slightly, but the effect is huge.

Problem 4: The impact directionj goes nuts every few frames. I now use a centroid-based system instead (Centroid is the average position of the Particles in World).

Problem 5: The advantage is that this is very accurate, the dissadvantage is that only the particles are moving, not the pivot. I have to do some very tricky matrix conversion to get it right.

I solved 1 to 4. That means that Iīm working on 5 now, instead of doing something incredibly amazing. Hope I can finish tonight.
Skip that sentence: "If nothing unpredictable happens Iīll have the simulation running this friday."

Laeng
06-30-2005, 07:33 PM
Another day of bugfixing. I had the first realistic results, but only with a smal moddel.

Itīs consuming a lot of memory, and I guess I should take care of this first. If I use more than 40 cubes Maya crashes after a few frames.

Good Luck to all who show something for voting thread. Iīll post my results a soon as I have some on www.cgknowledge.com.

RobertoOrtiz
07-02-2005, 02:35 PM
First I would like to thank Samuel Kvaalen for coding this voting page and hosting it.


Go >>HERE<< (http://kvaalen.com/cgtalk/fxwars/enter.php) and post your infromation if you want your animation to be part of the voting on Monday night.

-R

CGTalk Moderation
07-02-2005, 02:35 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.