PDA

View Full Version : Where to start with simulation?


H3ro
10-12-2006, 11:07 PM
Hi.

I am interested in beginning with some more hardcore grafics stuff. I have been looking at some research papers and I find the whole programing thing quite interesting. But I have no idea on where to start. So I am looking for some help and pointers.

If I want to look into simulations (rigid bodies, fluids and so on) so I need to be super good in math? I am currently doing math methods in the IB program, which does not cover to much. But I am also reading some stuff on the side (vectors, matrices) But most of the math is already done right? Papers written and stuff?

I also do physics at school, so I have a understanding of the forces that act on us (Well, its only high school physics so I dont know how much it will help)

And I know some c++ programing as well as a good understanding of Maya MEL and Maya in general.

I know I will not make something that will change the world, basicly I would be happy if I could make a ball hit the ground and bounce of.

So first of all, is there hope for me? Or is my background to limited?
Where should I start to look for info/tutorials on getting started? I think I am looking for stuff on how to create 3d objects first first. Would that be a good place to start?

Also, does anyone know about a really technical 3d course for university? I know Teesside has one.

Thanks in advance :)

HalfVector
10-13-2006, 06:58 PM
Take a look at this book: Physics for Game Developers (http://www.amazon.com/Physics-Game-Developers-David-Bourg/dp/0596000065/ref=pd_lpo_k2_dp_k2a_2_img/104-5737291-7417566?ie=UTF8)

H3ro
10-18-2006, 11:55 AM
thanks for the reply, but I think I am maybe trying to do so much as I am currently not really good at programming. So I wondered if someone could maybe help me to find out to do/buy?

Well, I know the basic.
So now I am going to start looking into openGL, is that a good idea? Or is there some other system I should use for deisplaying my stuff?
After I have some understanding of that I am thinking of buying the book posted about, does this sound smart?

Currently I cant make a cube and turn it around. I guess that is kind of fundamental if I want to this kind of stuff.

Thanks for the help, and sorry for asking all this basic questions, but I find this so interesting and want to be involved in it:)

TheGameMaker
10-18-2006, 01:44 PM
i would recommend you to use a opensource grafic engine... Ogre3d or irrlicht...
have a look on them!
Greetz

HollyWoodland
10-18-2006, 03:43 PM
I know I will not make something that will change the world, basicly I would be happy if I could make a ball hit the ground and bounce of.

So first of all, is there hope for me? Or is my background to limited?

Firstly never ever tell yourself there's no hope :) the only limitations are those we set ourselves.

I suggest you start by deciding exactly what you want to do - if you dont know where the goal posts are it's very difficult to score! it may be something as simple as learning how to represent a sphere in 3d space and learning how to use ray tracers like PovRay.

Once you decide what you are going to do you then work backwards to understand what you need to know to be able to achieve your goals.

My first proper 3D code was building a recursive ray tracer to render spheres of different material properties (including reflections, refractions and shadows).
To build a recursive one I needed to be able to build a basic one pass ray tracer. To achieve this I needed to know the following:
1. how ray tracing works (plus basic physics theory)
2. the ray tracing algorithm(s)
3. how to represent geometry in 3D space (spheres, rays)
4. how to find intersections between spheres and rays
5. what material properties I needed to store
6. how light rays bend and bounce with different materials

once you have your list of questions you can investigate each of them separately. Other questions are things like:
1. what language should I program in
2. INPUT: how do I tell my program what the spheres look like and where they are
3. OUTPUT: what format will i save the rendered image in?

as for language, a programming language is a tool- if you know one language then go with that to start. yes different languages have different capabilities and are better for different things but it is ultimately better to work with something you are comfortable in (especially if the theory you are implementing is new to you)

so my overall point is: define your goals/targets and then work backwards to understand what it is you need to know to be able to achieve it.

hope this helps

Holly


PS - sorry for the essay

H3ro
10-18-2006, 05:11 PM
Thanke you Holly, I really appreciate is.

EDIT: Is there somewhere where I can download sample code to look at? Just found out my compiler has some (dec-c++) would be cool if there are some more somewhere

H3ro
02-12-2007, 09:40 AM
I am still working on this project from time to time while trying to learn c++. I am mostly reading and trying to find information, research time which I hope will help me later.

A few question when thinking about a fluid simulators:
What are the advantages of a grid solver (like in Maya) and a particle solution (like realflow)
Would it be possible to do a fluid simulator as a plugin to maya? would that be harder than a stand alone?

I started a thread about CG vs CS education some time ago, I enden up with an inbetween, computer graphic science :)

Thanks in advance.

nurcc
02-12-2007, 09:38 PM
So you might have seen this, but there's a paper called Fluid Flow for the Rest of Us (http://poseidon.cs.byu.edu/%7Ecline/fluidFlowForTheRestOfUs.pdf)
It's a pretty practical primer for writing a fluid simulator, but you'll definitely want to try something smaller first, like NeHe's opengl tutorials, or writing a ray tracer, etc.

I know someone who wrote a fluid simulator inside of Maya, and it has upsides and downsides.

The main upside is that you're in a full-fledged 3d app, so you don't have to implement things like file IO, camera manipulation, animation, rendering, etc.

The downside is that you have to interface with their stuff, which can be pretty problematic. Usually, I just write a standalone 3d app with OBJ export, which I can then look at in Maya. The main thing I guess is to keep your backend separate from your UI, so you can change your mind about that part later if you want to.

UrbanFuturistic
02-13-2007, 12:21 PM
I still rate Computer Graphics and Visualisation (http://www2.shu.ac.uk/prospectus/op_uglookup1.cfm?id_num=CMS011&status=TN) at Sheffield Hallam Uni. The syllabus seems to have changed a bit since I was there but it still seems to cover the essentials and it certainly covered everything you've mentioned here. Just don't go near any hall of residence with 'Liberty' in the name.

Sadly, I had to leave due to illness and I can't afford to move back up to Sheffield so I can't tell you about the final year of the course but it was worth it for the skills I gained while I was there.

They also do a Games Development Degree (http://www2.shu.ac.uk/prospectus/op_uglookup1.cfm?id_num=CMS023&status=TN) if that's more what your after.

NeHe (http://nehe.gamedev.net/) has a number of tutorials on OpenGL programming, although some of the examples leave a bit to be desired, and it should at least get you started.

Finally, you could do worse than check out mindview.net (http://mindview.net/). Completely free and downloadable C, C++ and Java programming books. Covers more than just the kind of basics you'll find in the SAMS 'in 24 hours' type of books.

Oh, and it seems gamedev.net (http://www.gamedev.net/) is back up.

H3ro
02-15-2007, 09:08 AM
Thanks for the links.

I have found this paper also, looks interesting. http://download.developer.nvidia.com/developer/SDK/Individual_Samples/DEMOS/OpenGL/src/gpgpu_fluid/docs/GPU_Gems_Fluids_Chapter.pdf (http://forums.cgsociety.org/Fluid%20Paper)

Do anyone know where I can find a tutorial or good examples of a fluid solver? C++ would be great. I have been trying to find one for a while, but have not found any good ones. A 2d solver would be great, as it is probably not that advance.

sunit
02-16-2007, 12:56 PM
you might also try working out some ideas in a frontend environment like this one:

http://www.processing.org

i implemented a 2d java/processing version of jos stam's stable fluids last year - it was pretty trivial to port his c code over to java. processing handles all the on-screen drawing, and compiles and runs your code which makes it easy to get right into the physics problems.

stam's paper is available on the net and the code is also floating around (you might want to check acm.org). moving from a 2d solver to a 3d one is non-trivial, but pretty straightforward once you get your head around the concepts,

-sunit

djwarder
02-19-2007, 10:50 AM
A few question when thinking about a fluid simulators:
What are the advantages of a grid solver (like in Maya) and a particle solution (like realflow)
Would it be possible to do a fluid simulator as a plugin to maya? would that be harder than a stand alone?

AFAIK, a grid based solver would probably be best, as there is quite a good bit of info on Stam's 'Stable Fluids' method out there, and quite a bit of code too. Also, I've been told that particle methods (i.e SPH) can be quite hard to tune and get good results. I did start looking at the Lattice-Boltzmann stuff (http://www.ntoken.com) which is easier to understand and simplier to code than most solvers, but the excessive memory use put me off.

As for doing either a plugin or standalone, I think a plugin is a good way to go. As nurcc said, a lot of the backend stuff is done for you, although a lot of code needs to be done to set it all up in Maya. Its a difficult one, but for getting something up and running, you could probably get something working via the Maya API pretty quickly, and you might lose interest if you have to code all the support stuff first before getting onto the fun simulation code!

HollyWoodland
03-07-2007, 09:46 AM
a grid based solver would probably be best.......I've been told that particle methods (i.e SPH) can be quite hard to tune and get good results



yes and no - each has it's benefits depending on what your aims are (search for a comparison on Eulerian and Lagrangian methods).

Grid is best for modelling the body of the fluid but hard for tracking the surface (which is why Maya fluids are only really useful for things like gases).

Particles are great for modelling complex surfaces/boundaries but not great for the body.

IMHO the best approach is a hybrid method like the level set/implicit surface model by Fedkiw et al. OK I know i've been harping on about this for ages - and still haven't got around to actually implementing it - but i'm convinced that it takes the best of both worlds. Yes it is more complicated, and you really need to understand both grids and particles properly first but i reckon it can work.
Has anyone done this yet? I'd love to see some results


My other idea was to use the NS fluid grid provided in Maya to drive a particle system and wrap the particles in a polygon to represent the surface. I created a nifty little plugin to effectively shrink-wrap a sphere around a particle system (worked pretty well), now I just have to figure out how to animate it.

H3ro
03-07-2007, 10:19 AM
IMHO the best approach is a hybrid method like the level set/implicit surface model by Fedkiw et al. OK I know i've been harping on about this for ages - and still haven't got around to actually implementing it - but i'm convinced that it takes the best of both worlds. Yes it is more complicated, and you really need to understand both grids and particles properly first but i reckon it can work.
Has anyone done this yet? I'd love to see some results

This is way to hard for me, but I would love to see if anyone else have done it.
I have found a very interesting paper which talks about giving particles vicosity and simulate fluids that way. Looks nice and the math was not so hard as in e.g. the navier stokes equation.
Guess I will give that one a try or the SPH method when I feel ready :P
I am stuggeling with finding papers and info about the SPH, looks like not the much research have been done on that.

I am currently doing a particle system (posted in this forum) as a learning thing. Guess I still have a lot to learn before I can move on to fluid simulation. Working on some collision detection for my particles right now.

My other idea was to use the NS fluid grid provided in Maya to drive a particle system and wrap the particles in a polygon to represent the surface. I created a nifty little plugin to effectively shrink-wrap a sphere around a particle system (worked pretty well), now I just have to figure out how to animate it.

Any chance of seeing some pictures of it? Sounds interesting

HollyWoodland
03-07-2007, 10:38 AM
There is a demo picture here:

http://www.holly-woodland.com/Projects/plugins/cmd_wrapParticles.html

At some point i will make it available to download but it still needs some tweaks (you get very strange results if the particles move too far apart)

H3ro
03-07-2007, 01:56 PM
woops, posted twince
---------------------

H3ro
03-07-2007, 02:11 PM
There is a demo picture here:

http://www.holly-woodland.com/Proje...pParticles.html (http://www.holly-woodland.com/Projects/plugins/cmd_wrapParticles.html)

At some point i will make it available to download but it still needs some tweaks (you get very strange results if the particles move too far apart)

Nice work. I took a look at you website, quite a few nice scripts and plugins you have made so far. How is the raytracer going? Could not find any pictures of it. Btw, what is the technical name for making a surface for particles? Like you have done and like the mesh effect in realflow

I also see that you went to Royal Holloway, University of London. Did you like it? I got accepted there as well, and a few other places, but not sure what to choose.

HollyWoodland
03-08-2007, 06:10 PM
thanks - I keep meaning to do more but have switched to learning Renderman at the moment.


You can see the project report for my ray tracer on the website (http://www.holly-woodland.com/Projects/Lucifer/LuciferProjectReport.pdf) but i haven't uploaded the actual program yet. When i do i'll let you know
The report has some nice pics in it - around pages 100 to 110 - and you might find my bibliography useful for reference papers.

Royal Holloway was a lovely uni and a couple of wonderful professors but i actually wouldn't recommend it for CS - definitely not for CG. Most of the graphics work i did there was totally independent - my professor was helpful but had no graphics knowledge himself - and most the professors weren't particularly inspiring. Have you looked at Bournemouth? I'm currently job hunting in London and most companies have told me that the majority of their graduates come from Bournemouth. I would love to do the MSc in Computer Animation but can't really afford to go back to uni - need to find a job.

hope this helps a bit

Robert Bateman
03-09-2007, 12:32 AM
Have you looked at Bournemouth? I'm currently job hunting in London and most companies have told me that the majority of their graduates come from Bournemouth. I would love to do the MSc in Computer Animation but can't really afford to go back to uni - need to find a job.

yeah, i know bournemouth and the msc course very well. I used to teach C++/openGL/mel and maya API on the course for about 3 and a bit years... ;) [and still do the odd guest lecture]

The course itself is very diverse, and a lot of hard work! It covers the whole process from the animation, modelling & texturing side of things, all the way through to maths and programming side. They cover the in's and out's of renderman, houdini, maya and also include bits about shake (compositing) and a tonne of other stuff (eg, linux, shell scripting, etc).

I think all in all, it's an extremely good course, however there are 2 things that are what i'd consider my personal niggles with it :

1. It's too short. I'd prefer it to be a 2 year course, since it's an awful lot to cram into a single year. (The Ba course tends to produce better graduates in all fairness. After 3 years of doing it, they tend to know the subject much more intemately than someone who does a single year).

2. Some students apply without fully understanding the course and what it does. It is not a course to learn animation on! It's designed to teach the technology behind the animation tools, whilst giving you an insight into how the tools are used by animators. You won't be animating for disney at the end of it.... ;)

Having Bournemouth on the CV tends to be very useful when job hunting in soho. It doesn't guarentee you a job by any means, it certainly helps to get a foot in the door, but then it's down to your demo reel and interview....

[swansea institute & teeside are also worth a look imo]

on another note, we are hiring.... feel free to send me a CV.

HollyWoodland
03-09-2007, 08:47 AM
2. Some students apply without fully understanding the course and what it does. It is not a course to learn animation on! It's designed to teach the technology behind the animation tools, whilst giving you an insight into how the tools are used by animators. You won't be animating for disney at the end of it.... ;)


that's actually what I really liked about the course - I have no illusions of being an animator but I do want to work with/develop the technology behind it. Whether that's building tools or doing the R&D/core programming etc - I don't really mind at the moment - just looking for a way in.


on another note, we are hiring.... feel free to send me a CV.

where are you working at the moment?
I'll email my CV over to you if that's ok


cheers
Holly

H3ro
03-09-2007, 03:01 PM
I ask my quuestion here, as this thread allready is way off topic:P
Is there any good forums for Graphics programing? I have found some good ones for c++ and for game development, but non of them have much of graphics programing. Also, there are not that many people on this subsection of Cgtalk.

thanks

djwarder
03-10-2007, 11:14 AM
Right, yep getting a bit off-topic. All I can suggest is that you start with looking at basic simulations and start from there, tho that sounds a bit vague!

I'm kind of in the same situation as you - I'm currently a cloth/FX TD looking to get into R&D, but my maths isn't exactly strong! What I've done is to start with a basic particle simulation in Maya, so I can learn about physics, numerical integration, etc as well as learning the Maya API which is a bonus. Now, I've started to code a simple cloth solver using the verlet integration method and when I'm ready I'll move onto implicit integration, accurate collision detection and all that jazz! Eventually, I want to get into fluid simulation, but as that is probably the hardest area on simulation you can get into at the moment, I'm taking my time to learn all the elementary stuff first.

As for forums or websites, well I think this site (http://www.gaffer.org) has some good physics tutorials with code supplied and also that 'Physics-Based Animation' book ain't a bad starting point either. Quite a few formulas in it and I hoped there would be more code, less maths, but if you suppliment the hard parts with easier to digest stuff on the web, it all comes together. Hope that helps?

CGTalk Moderation
03-10-2007, 11:14 AM
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.