FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Topics & Contributions
   Simulation, Artificial Life
(Moderator: REAS)
   gras
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: gras  (Read 2997 times)
Sjeiti

WWW
gras
« on: Oct 7th, 2004, 11:12pm »

I tried to grow some gras... http://www.sjeiti.com/p5ref.html?organicLines08&p55/organicLines08.j ar&p55/organicLines08.pde&640&640&organicLines08&
does it look like it? ... or does it need to bend more (and less wind maybe)...
 
One weird thing I got though is that sometimes the bottom side of the butterfly wings has no fill.. anybody ever had problems filling beginShape(POLYGON)s?
(I tried to make them fly more realistic but I got kind of stuck rotating the wings, I never really understood how those matrix rotations work)
 
Sjeiti
 

http://www.sjeiti.com/
flight404

WWW Email
Re: gras
« Reply #1 on: Oct 7th, 2004, 11:20pm »

Well done.  very beautiful.  I love the underground dirt.  nicely considered.  Funny you should mention this.  I made a moth constructor the other day that uses images for the wings and matrix rotations.  Once I get home, I will upload and post.
 
BTW, I had a very difficult time grasping the matrix push pop and translate.  Until I read this article.
 
http://www.edm2.com/0510/opengl.html
 
UPDATE NOTE-------
this article is a little longer than i remember it.  scroll down to Matrix Stacks and read the 13 step list in that section.  It alone helped me grasp the concept quite a bit.
-------------------
 
It shows step by step how the system works.  Since Processing is very much like OpenGL, you should get enough info from this article to make some progress understanding the syntax and execution.
 
 
As for the Polygon fills, I believe it is a known bug.  Happens from time to time.  Do a search in the bug category for 'polygon' and 'fill' and you should get some idea of the progress.
 
r
 
 
UPDATE NOTE-------------
Put up the moth study.  It is a bit overkill on code and the moths just swarm in a cyclone around the center of the movie (and eventually cross the clipping plane for the camera which makes bad stuff happen), but it uses push, pop, and translate to rotate wing graphics around the axis of the moth body.  Take a peek if it will help
 
http://www.flight404.com/p5/mothStudy
« Last Edit: Oct 8th, 2004, 3:51am by flight404 »  
rgovostes

rgovostes
Re: gras
« Reply #2 on: Oct 8th, 2004, 4:15am »

Both the grass and moth sketches are fantastic. Combining them would be great, and perhaps some perlin clouds ... a great landscape!
 
I particularly like the appearance of grassy areas in Sonic Adventure, a video game for Sega Dreamcast. Everything was highly contrasted, but fairly detailed, so the scenes looked somewhat fake and yet spectacular at the same time. Many recent movies, like the Lord of the Rings ones, use this technique often as well.
 
Fish-face

308232952308232952thedemonsheep WWW Email
Re: gras
« Reply #3 on: Oct 8th, 2004, 9:25am »

Hmm... real grass doesn't move back and forth so much - you need very long grass (e.g. wheat) to move much at all, and then it generally all ripples in one direction, then back to almost vertical, then back again, with occasional gusts rippling it more.
 
At the moment it goes a lot in both directions, and the wind seems very irregular - I think, perhaps, you're using perlin flow field? If so, then try scaling it up a bit, so that you don't get so much variation. Alternatively, use your own algorithm for cool wind!
 

--

The C@ S@ on the M@
=Fish-Face=
~#Chris#~
Sjeiti

WWW
Re: gras
« Reply #4 on: Oct 8th, 2004, 9:59am »

ah... push and pop... I took a look at the article but the moth source made it clearer
so (correct me if I'm wrong): push() basicly marks the start of the deformation of the entire 3d world (using translate and rotate)... then you draw just like you normally would... and use pop() to return the 3d world to it's normal size, deforming your just drawn stuff...
 
...and yes, the wind is perlin noise (almost everything is, I just can't seem to stop using that function) ... I'll slighten it down a bit... and make the grass a bit more curly to give it a more worn look
 

http://www.sjeiti.com/
Pages: 1 

« Previous topic | Next topic »