What is easySunflow?


easySunflow is an user interface, to simplify the creating of scenes for Sunflow Render engine.
This software is written in Processing using the Sunflow API, is based on a simplified version of the java library SunflowAPIAPI and others, with custom functions to manage the rendering and the scenes. Were added commands to import the mesh from the library TOXILIBS with the possibility to use the powerful class from TOXILIBS Phisics. It is possible to use HEMESH library, with full use of primitives and modifiers.
You can load external geometries using the Sunflow parser or the OBJLoader library, this is Wavefront .OBJ file loader for Processing, while for the stl models you can use TOXILIBS STLLoader.

Also i added a timeline with the possibility to animate many properties of objects and the camera, for every object you can create an Animator to manage keyframes. The new interface controls most of the necessary parameters to Sunflow, the camera position, the lights and quality of rendering and various types of global illumination. Using the new commands implemented in easysunflow, you can create very complex scenes in a short time.


PROCESSING  SUNFLOW APIAPI  TOXILIBS  HEMESH  OBJLOADER
download

Gallery

here is a series of images and videos generated by Sunflow using easySunflow

 

Source Code

The following examples illustrate just some of the uses of the new classes of easySunflow 2.0

  • primitive
  • lights
  • colors
  • shader
  • animators
  • camera keyframes
  • particles
  • toxilibs mesh
  • toxilibs instances
  • toxilibs STLReader
  • hemesh mesh
  • hemesh instances
  • hemesh animation
  • objloader mesh
  • objloader instances


  • 	//------------------------------------------------------------------
    	//  PRIMITIVES 
    	//------------------------------------------------------------------
    	
    	// set sun position
    	guiSunPosition(-150,30);
    	
    	// shader diffuse
    	ShaderDiffuse diffuse_white =new ShaderDiffuse("diffuse_white", new SunflowColor(.9, .9, .9));
    	ESF.addShader(diffuse_white);
    	// shader shine
    	ShaderShine shaderground=new ShaderShine("shaderground",new SunflowColor(.1, .1, .1),.1);
    	ESF.addShader(shaderground);
    	
    	// sphere parameters
    	Sphere thesphere= new Sphere();
    	thesphere.setSize(50);
    	thesphere.setPosition(-300,50,0);
    	thesphere.setShader(diffuse_white);
    	ESF.addGeometry("thesphere", thesphere);
    	
    	//cube parameters
    	Cube thecube= new Cube();
    	thecube.setSize(50);
    	thecube.setPosition(-100,50,0);
    	thecube.setShader(diffuse_white);
    	ESF.addGeometry("thecube",thecube);
    	
    	// cylinder parameters
    	Cylinder thecylinder=new Cylinder();
    	thecylinder.setSize(50);
    	thecylinder.setPosition(100,50,0);
    	thecylinder.setRotation(90,0,0);
    	thecylinder.setShader(diffuse_white);
    	ESF.addGeometry("thecylinder",thecylinder);
    	
    	//torus parameters
    	Torus thetorus=new Torus();
    	thetorus.setSize(50);
    	thetorus.setPosition(300,60,0);
    	thetorus.setShader(diffuse_white);
    	ESF.addGeometry("thetorus",thetorus);
    	
    	//ground parameters
    	Ground ground=new Ground();
    	ground.setShader(shaderground); 
    	ESF.addGeometry("ground", ground);
    	
    	
  • 	//------------------------------------------------------------------
    	//  LIGHTS 
    	//------------------------------------------------------------------
    	
    	// disable sun light
    	guiSetSunVisible(false);
    	
    	// 	SpericalLight
    	SpericalLight spherical=new SpericalLight("sperical",new PVector(-300,100,-200));
    	spherical.setColor(color(200,200,200));
    	spherical.setPower(5);
    	spherical.setSize(60);
    	ESF.addLight(spherical);
    	
    	// 	PointLight
    	PointLight  pointLight=new PointLight("pointLight",new PVector(300,100,-200));
    	pointLight.setPower(200);
    	ESF.addLight(pointLight);
    	
    	//	Spotlight
    	Spotlight spotlight=new Spotlight("spotlight",new PVector(0,200,100),new PVector(0,0,-450));  
    	spotlight.setPower(5);
    	spotlight.setRadius(300);
    	ESF.addLight(spotlight);
    	
    	// shader diffuse
    	ShaderDiffuse shaderground =new ShaderDiffuse("shaderground", new SunflowColor(.8, .8, .8));
    	ESF.addShader(shaderground);
    	
    	//cube parameters
    	Cube room= new Cube();
    	room.setSize(500);
    	room.setPosition(0,500,0);
    	room.setShader(shaderground);
    	ESF.addGeometry("room",room);
    	
    	ShaderDiffuse shadersphere =new ShaderDiffuse("shadersphere", new SunflowColor(1, 0, 0));
    	ESF.addShader(shadersphere);
    	
    	// sphere parameters
    	Sphere thesphere= new Sphere();
    	thesphere.setSize(50);
    	thesphere.setPosition(-100,50,0);
    	thesphere.setShader(shadersphere);
    	ESF.addGeometry("thesphere", thesphere);
    	
    	

One Comment on easySunflow

LEAVE A COMMENT ON EASYSUNFLOW