We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionExhibition › noisefield
Page Index Toggle Pages: 1
noisefield (Read 3088 times)
noisefield
Sep 22nd, 2009, 4:22pm
 
http://openprocessing.org/visuals/?visualID=3897

It can be kind of mesmerizing if you get the mouse in the right spot.

The longer you wait the more the lines tighten up.
Re: noisefield
Reply #1 - Sep 22nd, 2009, 5:19pm
 
Really nice!  Will you keep playing with the technique?
Re: noisefield
Reply #2 - Sep 23rd, 2009, 3:48pm
 
really cool. looked at it for 45 minutes =)
Re: noisefield
Reply #3 - Sep 27th, 2009, 11:28am
 
ben_hem wrote on Sep 22nd, 2009, 5:19pm:
Really nice!  Will you keep playing with the technique


yep. i'm trying to use it to make some wind for particles.

my project now though is a game like starfox.

i'm using the noise function still, though, to generate a landscape. everything else is loaded in with the objloader library.

it seems like you can only render so many polygons at a time, so instead of making a heightmap style terrain and exporting it to a .obj file, I have a mesh of polygons that use the noise function to generate the parts of it that you can see as you move around.

for collision detection, i can check just a couple key points on the ship (nose, wings, back) to see if they've gone under the noise function's value at their location, so i wont have to check the mesh for collision detection, just call the noise function.

i love noise.
Re: noisefield
Reply #4 - Sep 27th, 2009, 2:40pm
 
Sounds cool.  That's how I did collision detection in Crystal Cave, and I've been working on an swimming-fish thing using the same basic idea...

re: the limits on polygons, check out pure GL vertex buffering methods like display lists and VBOs.  I can't get VBOs to work quite as reliably as display lists, but they are a little faster.  Either will be a huge improvement over sending the vertex data each frame.  The other thing I do, in the fish demo for example, is split the noisefield into chunks, and only draw the 3x3 grid of chunks around the player at a given moment.

--Ben
Re: noisefield
Reply #5 - Sep 27th, 2009, 2:45pm
 
Noise is awesome.
Re: noisefield
Reply #6 - Sep 30th, 2009, 6:14am
 
ben_hem wrote on Sep 27th, 2009, 2:40pm:
Sounds cool.  That's how I did collision detection in Crystal Cave, and I've been working on an swimming-fish thing using the same basic idea...

re: the limits on polygons, check out pure GL vertex buffering methods like display lists and VBOs.  I can't get VBOs to work quite as reliably as display lists, but they are a little faster.  Either will be a huge improvement over sending the vertex data each frame.  The other thing I do, in the fish demo for example, is split the noisefield into chunks, and only draw the 3x3 grid of chunks around the player at a given moment.

--Ben


I'll have to try these...display lists you speak of. haha.

I really wish I could find some concrete examples of pixel/vertex shaders in processing, seems like that would speed things up a bit.

anyone have links to easy-to-read source code using hlsl or cg for shaders in processing
Re: noisefield
Reply #7 - Sep 30th, 2009, 2:39pm
 
Shaders are black magic.  There might be something if you google JOGL shaders.  But what are you trying to achieve  For example, GL_LIGHTS and GL_FOG can do wonders...

Display lists are easy like unto pie, check out:
http://benhem.com/games/GLP5align
for a quick example...

--Ben
Re: noisefield
Reply #8 - Oct 4th, 2009, 9:54am
 
ben_hem wrote on Sep 30th, 2009, 2:39pm:
Shaders are black magic.  There might be something if you google JOGL shaders.  But what are you trying to achieve  For example, GL_LIGHTS and GL_FOG can do wonders...

Display lists are easy like unto pie, check out:
http://benhem.com/games/GLP5align
for a quick example...

--Ben


Wow.

With display lists and objloader I was able to load in much larger models and run it all at full speed.

Of course, the other half of the code using processing's functions seem to have made a bunch of things misaligned in 3d space.

Now that i've switched from loading the geometry for my landscape to generating it with the noise function, I probably can't make too much use of display lists. I have to generate new geometry all the time as you move.

Is this speed increase somewhat just from using pure openGL and not processing's functions

I may have to switch to the old fashioned way....
Re: noisefield
Reply #9 - Oct 4th, 2009, 10:53am
 
The speed increase is due to the fact that you're sending all your information to the graphics card at once, ahead of time.  Otherwise, you're sending all the vertex and color information each frame.

The drawback, as you mention, is the immutability of that data once sent.  That's why I recommend pregenerating your noisefield, splitting it into chunks, and rendering the 3x3 grid of chunks around your location.  You can also generate your terrain that way, and use dynamic elements along with it...

The example should help you get P5 and GL aligned...it may be that you just need a push and pop around the two rendering sequences, or change the order in which they're called.  (Note: gl.glPushMatrix(); instead of just pushMatrix(); for the GL bits).  Oh, and calling camera(); with no params will reset the P5 viewport.

--Ben

P.S. missed your "somewhat" so I probably just told you a bunch of stuff you already know.  Yes, using pure GL drawing commands instead of P5's wrapper will buy you a slight speed increase...
Re: noisefield
Reply #10 - Oct 4th, 2009, 10:44pm
 
I love noise...
Re: noisefield
Reply #11 - Oct 5th, 2009, 4:04am
 
there is a lib to work with shaders in processing, using gl.

http://www.pixelnerve.com/processing/libraries

examples show how to use cg, glsl and cgfx.
Re: noisefield
Reply #12 - Oct 6th, 2009, 7:14am
 
WOW

I found this library one day but I somehow couldn't find that vitamin library to go with it. I must have seen it on some other website.

This has to be THE definitive solution for shaders in processing.

Thank you, good sir!
Re: noisefield
Reply #13 - Oct 14th, 2009, 12:43am
 
nice...
Page Index Toggle Pages: 1