View Full Version : traffic system - thoughts and problems
05-31-2007, 10:54 AM
I have a city which I want to populate with flying cars - fifth element style.
So I drew a spline through all the houses added a pflow system where a speed by icon is following the spline.
The Pflow is then emitting cars which follow the icon.
The bad thing is, the path is really long so it takes the icon around 60.000 frames until it moves to the end. (I don't want the cars to race through the city, but slowly drive)
That means if I want to render a 100 frame animation of a populated city, PF needs 60.000 frames to precalculate until all paths are populated with cars.
When I try to render this, max runs out of RAM and crashes - not mentioning the time it takes to precalculate.
Do you have any idea for a more elegant approach, or how I could optimize this system?
thanks in advance
05-31-2007, 10:59 AM
Box#3 has a definite solution. You can pre-calculate the particle motion (without the car shape applied) and save it with Cache Disk operator. Then you can add car shapes to particles in post-cache process.
05-31-2007, 11:15 AM
caching is definitely a good idea. if the high amount of shape instances kills your system use a script by bobo to transfer the motion of your precalculated particles to geometry objects:
06-01-2007, 12:30 AM
Can you post a screen shot of the paths with some of the particles on them. I am certain there is an easier way to do this. If it takes 60,000 frames to get the cars where you want them, it is unlikely that you will see enough in 100 or even 1,000 frames to justify getting all the particles in position with the Paths. You could probably use objects to scatter the cars throughout some areas using simply a Speed op and only use Paths/Speed by Icon when it is absolutely needed.
06-03-2007, 04:41 PM
thanks all for your help:
Sorry I don't want to buy a plugin to solve this. Though I will have a look at caching it.
But how do I spawn particles and assign meshes later on? does this save ram / rendertime?
Thanks for the link. But I don't understand what this script does. Is it baking the animation/meshes? I've never scripted anything, but I may give it a try.
Thanks for offering me help:
I attached some pictures. The first one shows the path where 60.000 frames were needed to get some life into the street. I strapped that to a really shorter path.
zoomed to where they spawn - and get killed once they touch the plane on the right:
here's the flow:
I tried to use caching but I wasn't sure how it works best.
Now it emits from 0-4000 and I want to render from 3500-4000. The speed by Icon events need 3500 frames each to travel the path.
So I tried to just cache frame 3500 - took around 150 MB which I saved with the file, sent it the backburner manager - but they didn't render any of the particles. The precalculation Phase was really short (around 2 minutes instead of 3 hours) but if they don't render anything - this will not help me :)
Is it a good idea to only cache the first frame of the desired animation and save it with the file? Or is it better to use caching in a different manner?
06-18-2007, 04:23 AM
lehmi, I recently tryed to do something similar for a personal project (but faild:sad:) I trued to use Crowd instead but I couldn't get it to work right cause I just started learning Crowd simulation. My biggest problem was traffic jam! :D
But you should give it a try!
If you figure something out let me know.
Good Luck :buttrock:
06-29-2007, 09:24 PM
did everyone here forgot about the comp???? lol i cant beleive pshyco forgot about the comp. heres what you do first off seperate all your particles into sub sections like forground mid-ground and far-ground if your running out of ram turn down the amount particles and and render each section in passes like the forground you would need somewhat higher detail in the cars the other plates. so forground you might need to render that into a few passes each with only a few amount of cars in the scene then just render out a few of them and comp them together filling up the forground plate full of cars. you want to do the same with the mid-ground and faraway but the far away and midground cars need less detail and thus should start takeing up less ram. this is what i would do myself. and with all the passes you will have more control over the final look you can add more motion blur in the back ground cars or deth of feild ect all the fun stuff people like to do these days. I have been doing game effects for the last year and half so something that pops up into the brain is lods. im not sure if max supports it if it does its news to me but thats also something you can look into. right now my brain is burned out with e3 deadlines so i am starting to ramble and i might be missing something. sorry
07-01-2007, 09:52 PM
Good point feldy, totally forgot about compositing :banghead: Its a great and powerful way to cut corners. :buttrock:
And yes Max does suport LOD, its in the utilities panel » more » level of detail. I've used it before, it saved my butt many times :)
07-01-2007, 09:52 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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.