Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 03-23-2009, 08:42 PM   #1 (permalink)
New Member
 
Nitrex88's Avatar
 
Join Date: Apr 2008
Location: Long Island, NY
Age: 21
Posts: 84
Send a message via AIM to Nitrex88 Send a message via Skype™ to Nitrex88
Default GLUT --> openGL ES help!!!

Ok I'm trying to learn fluid simulation and the best I could find was using the navier stokes equations for fluid simulation in gaming. A very in depth article about this was created by Jos Stam. The article can be found here...

http://www.google.com/url?sa=t&sourc...sDBl28cphoIxUQ

Along with this article (on Jos Stam's website) I found a link to a full C project written in openGL and GLUT creating this fluid simulation. You can download it yourself from his website if you want. I went ahead and packaged it in an xcode project already and you can see it here...

www.nitrexpro.com/GLUT_Fluid_Example.zip

Just build and go to run. To add density you right click and hold and then click with left mouse button to apply forces. You can also hit "V" to see a line version of the velocity.

Anyway I'm trying to port this to iPhone which does not have GLUT and i am having some trouble. I know it can be done and a video using this exact code ported to iPhone can be seen here...

Besmoke - Interactive Fluid Simulation with iPhone and Sound Reactivity on Vimeo

Therefore i know it can be done but i cannot figure out the transition. If any of you are up for the challenge and have some spare time can you try to make the changes in code so it will run on iPhone. I dont need the velocity view with the lines and stuff, just the stuff with adding density and pushing it around (you will see). If not can you perhaps give me some pointers on what needs to be changed and where to look or start. This forum has been super helpful so hopefully someone can solve this problem too. Thanks a ton!

Nick
Nitrex88 is offline   Reply With Quote
Old 03-23-2009, 09:23 PM   #2 (permalink)
Pro. Game Developer
iPhone Dev SDK Supporter
 
Join Date: Feb 2009
Location: żLa Islas Hermosas?
Posts: 2,178
Default

Quote:
Originally Posted by Nitrex88 View Post
...Anyway I'm trying to port this to iPhone which does not have GLUT and i am having some trouble. I know it can be done and a video using this exact code ported to iPhone can be seen here...
I could be wrong, but I don't believe that video shows the code actually running on an iPhone. Based on the author's comments below the video, it sounds like he was using the iPhone only for the accelerometer and multitouch inputs to the application, which is running on another machine.
Kalimba is offline   Reply With Quote
Old 03-24-2009, 12:44 AM   #3 (permalink)
Registered Member
 
GhostDog's Avatar
 
Join Date: Mar 2009
Location: Convict Hill
Posts: 80
Default

I don't think it's possible AFAIK. There is the Glut|ES project but I haven't been able to get it to compile all the way through. I get some conflicts with data types. Try Mesa instead.
__________________
Play Pocket Rocks!



4 out of 5 professional pirates prefer it over scurvy!
GhostDog is offline   Reply With Quote
Old 03-24-2009, 11:13 PM   #4 (permalink)
New Member
 
Nitrex88's Avatar
 
Join Date: Apr 2008
Location: Long Island, NY
Age: 21
Posts: 84
Send a message via AIM to Nitrex88 Send a message via Skype™ to Nitrex88
Default Figured something out

Hey I was able to somewhat successful do what i was trying too but i got some new issues that i posted in a new thread (only because the question is different from the one im really asking in this thread). Go check it out here...

http://www.iphonedevsdk.com/forum/ip...engl-code.html

Can you guys help some more now that I have the code in objective-C working on iPhone?

Nick
Nitrex88 is offline   Reply With Quote
Old 05-17-2010, 05:27 AM   #5 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 1
Default Looking for OpenGL help with fluid simulation

Hi Nick,

Is there any chance that GLUT_Fluid_Example.zip or other similar source is still available for download somewhere? I've been trying to implement the navier-stokes solver, and could use the help.

Any help would be greatly appreciated.
Cheers,
Dan.
Square Master (Dan & Kathy Bourque)

Quote:
Originally Posted by Nitrex88 View Post
Ok I'm trying to learn fluid simulation and the best I could find was using the navier stokes equations for fluid simulation in gaming. A very in depth article about this was created by Jos Stam. The article can be found here...

http://www.google.com/url?sa=t&sourc...sDBl28cphoIxUQ

Along with this article (on Jos Stam's website) I found a link to a full C project written in openGL and GLUT creating this fluid simulation. You can download it yourself from his website if you want. I went ahead and packaged it in an xcode project already and you can see it here...

Welcome nitrexpro.com - Hostmonster.com

Just build and go to run. To add density you right click and hold and then click with left mouse button to apply forces. You can also hit "V" to see a line version of the velocity.

Anyway I'm trying to port this to iPhone which does not have GLUT and i am having some trouble. I know it can be done and a video using this exact code ported to iPhone can be seen here...

Besmoke - Interactive Fluid Simulation with iPhone and Sound Reactivity on Vimeo

Therefore i know it can be done but i cannot figure out the transition. If any of you are up for the challenge and have some spare time can you try to make the changes in code so it will run on iPhone. I dont need the velocity view with the lines and stuff, just the stuff with adding density and pushing it around (you will see). If not can you perhaps give me some pointers on what needs to be changed and where to look or start. This forum has been super helpful so hopefully someone can solve this problem too. Thanks a ton!

Nick
DanBourque is offline   Reply With Quote
Reply

Bookmarks

Tags
fluid, glut, graphics, opengl

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 267
14 members and 253 guests
2WeeksToGo, AdamL, ADY, BrianSlick, Dani77, Dattee, headkaze, mer10, prchn4christ, smithdale87, timle8n1, Touchmint, vigu360
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,879
Threads: 89,228
Posts: 380,747
Top Poster: BrianSlick (7,129)
Welcome to our newest member, mgon987
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:51 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0