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.
IndexProgramming Questions & HelpOther Libraries › P5Sunflow noise render problem.
Page Index Toggle Pages: 1
P5Sunflow noise render problem. (Read 1217 times)
P5Sunflow noise render problem.
Apr 3rd, 2008, 6:17pm
 
May be someone knows what's the problem. Thanks in advance

That's the P5Sunflow's camera example replacing the boxes by spheres. Looks good.
http://www.onionlab.com/colab/p5Sunflow/im1.jpg

That's the same example changing a little bit the sphere's z position. Begin to appear black strange noise.
http://www.onionlab.com/colab/p5Sunflow/im2.jpg

That's the same example decreasing the z position again. The noise it's really hard.
http://www.onionlab.com/colab/p5Sunflow/im3.jpg

I tryed to increase the samples (setAaSamples(int i)), disable GI,... and change some more parameters but the noise  is still there.

Thant's the last image source code.

import hipstersinc.sunflow.*;
import hipstersinc.sunflow.shader.*;
import hipstersinc.*;

// Set up the scene, make sure we don't loop
void setup() {
 size(1280, 720, "hipstersinc.P5Sunflow");
 noStroke();
 noLoop();
}

// Draw our scene
void draw() {
 background(255);

 setupCamera();
 setupScene();

 // Adjust perspective
 translate(width/2, height/2, -800);
 rotateX(QUARTER_PI);
 rotateZ(QUARTER_PI);
 translate(-width/2, -height/2);

 // Draw some boxes
 float boxSize = width / 11;
 translate(boxSize, boxSize);
 for(int i=0; i<3; i++) {
   for(int j=0; j<5; j++) {
     pushMatrix();
     translate(j*boxSize, j*boxSize);
     fill(j * 50);
     sphere(boxSize);
     popMatrix();
   }
   translate(boxSize * 2, 0);
 }
 
}

void setupCamera() {
 P5Sunflow sunflow = (P5Sunflow) g;
 sunflow.camera.setType(SunflowCamera.THINLENS);
}

void setupScene() {
 P5Sunflow sunflow = (P5Sunflow) g;
}
Re: P5Sunflow noise render problem.
Reply #1 - Apr 8th, 2008, 4:31am
 
I can't give you an answer, but I'm having the same problem.  Seems to be only when rendering spheres, and only in grayscale I think.  So far I haven't found any rhyme or reason as to the cause but I'll post if I get anywhere.

Here's my sample photo of the noise.

http://farm3.static.flickr.com/2278/2397385626_6cd2120b7c.jpg?v=0
Re: P5Sunflow noise render problem.
Reply #2 - Jun 6th, 2008, 12:08am
 
hi guys.

i got an answer to this.
http://flickr.com/photos/lennyjpg/1732089275/in/set-72157602619301641/
check the comments there.
Re: P5Sunflow noise render problem.
Reply #3 - Jun 25th, 2008, 5:20pm
 
From what I gathered from Mark Chadwick's comments in the above Fickr link, you need to render small things up close rather than large things far away.... I guess? This method seems to work in my tests, replace the draw() loop above with this:

// Draw our scene
void draw() {
 background(255);

 //setupCamera();
 //setupScene();
 translate(400,250,700);

 // Draw some boxes
 float boxSize = 50;
 //translate(boxSize, boxSize);
 for(int i=0; i<3; i++) {
   for(int j=0; j<5; j++) {
    pushMatrix();
      translate(j*boxSize, j*boxSize);
      fill(j * 50);
      sphere(boxSize);
    popMatrix();
   }
   translate(boxSize * 2, 0);
 }
 
}
Re: P5Sunflow noise render problem.
Reply #4 - Jul 6th, 2008, 9:25am
 
Hi guys, could anybody please tell what's wrong with my p5 sunflow installation?
I'm testing the example shown in the library's page, and i get this error:

java.lang.UnsupportedClassVersionError: hipstersinc/P5Sunflow (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
Re: P5Sunflow noise render problem.
Reply #5 - Jul 6th, 2008, 9:44am
 
This is certainly the wrong place to post that question, but you probably have the wrong version of Java installed. Try downloading "Processing with Java" from the download page and re-install it.
Page Index Toggle Pages: 1