Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r762 - in trunk: Model/Materials SwigInterface


Chronological Thread 
  • From: bigler@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r762 - in trunk: Model/Materials SwigInterface
  • Date: Fri, 9 Dec 2005 21:22:51 -0700 (MST)

Author: bigler
Date: Fri Dec  9 21:22:51 2005
New Revision: 762

Removed:
   trunk/Model/Materials/LambertianMaterial.h
Modified:
   trunk/SwigInterface/manta.i
   trunk/SwigInterface/runmanta.py
Log:

Model/Materials/LambertianMaterial.h

  Don't know why this got added, but it's an empty file.

SwigInterface/manta.i

  Added Lambertian and Metal materials to the interface.

SwigInterface/runmanta.py

  Started the dielectric test scene.  Right now it only rendered the
  background and the metal sphere.


Modified: trunk/SwigInterface/manta.i
==============================================================================
--- trunk/SwigInterface/manta.i (original)
+++ trunk/SwigInterface/manta.i Fri Dec  9 21:22:51 2005
@@ -199,6 +199,8 @@
 #include <Interface/Material.h>
 #include <Model/Materials/LitMaterial.h>
 #include <Model/Materials/Phong.h>
+#include <Model/Materials/Lambertian.h>
+#include <Model/Materials/MetalMaterial.h>
 #include <Model/Groups/Group.h>
 #include <Model/Primitives/PrimitiveCommon.h>
 #include <Interface/TexCoordMapper.h>
@@ -219,6 +221,8 @@
 %include <Interface/Material.h>
 %include <Model/Materials/LitMaterial.h>
 %include <Model/Materials/Phong.h>
+%include <Model/Materials/Lambertian.h>
+%include <Model/Materials/MetalMaterial.h>
 %include <Model/Groups/Group.h>
 %include <Model/Primitives/PrimitiveCommon.h>
 %include <Interface/TexCoordMapper.h>

Modified: trunk/SwigInterface/runmanta.py
==============================================================================
--- trunk/SwigInterface/runmanta.py     (original)
+++ trunk/SwigInterface/runmanta.py     Fri Dec  9 21:22:51 2005
@@ -35,7 +35,31 @@
     scene.getRenderParameters().maxDepth = 5
     return scene
 
-    
+def createDielectricTestScene():
+    scene = manta_new(Scene())
+    scene.setBackground(manta_new(ConstantBackground(Color(RGBColor(0.5, 
0.8, 0.9)))))
+    world = manta_new(Group())
+    groundmatl = manta_new(Lambertian(Color(RGBColor(0.95, 0.65, 0.35))))
+#    world.add(manta_new(Plane(groundmatl, Vector(0,0,1), Point(0,0,2.5))))
+
+    ball_matl = manta_new(MetalMaterial(Color(RGBColor(0.8, 0.8, 0.8)), 100))
+    world.add(manta_new(Sphere(ball_matl, Point(-6, 3.5, 3.5), 1.0)))
+
+    scene.setObject(world)
+
+    lights = manta_new(LightSet())
+    lights.add(manta_new(PointLight(Point(20, 30, 100), 
Color(RGBColor(.9,.9,.9)))))
+    lights.add(manta_new(PointLight(Point(-40, -30, 50), 
Color(RGBColor(.3,.1,.1)))))
+    lights.setAmbientLight(manta_new(ConstantAmbient(Color(RGBColor(.4, .4, 
.4)))))
+    print lights
+
+    scene.setLights(lights)
+    scene.getRenderParameters().maxDepth = 25
+    scene.getRenderParameters().importanceCutoff = 0.01
+
+    return scene
+
+
 engine = createManta()
 engine.changeNumWorkers(1)
 engine.selectImageType("rgba8")
@@ -45,7 +69,8 @@
 #engine.selectPixelSampler("jittersample(-numberOfSamples 4)")
 engine.selectRenderer("raytracer")
 engine.selectShadowAlgorithm("hard")
-currentCamera = engine.createCamera("pinhole(-eye 3 3 2 -lookat 0 0 0.3 -up 
0 0 1 -fov 60)")
+#currentCamera = engine.createCamera("pinhole(-eye 3 3 2 -lookat 0 0 0.3 -up 
0 0 1 -fov 60)")
+currentCamera = engine.createCamera("pinhole(-eye 8 -18 8.5 -lookat -4.7 2.5 
2.5 -up 0 0 1 -fov 15)")
 xres = 512
 yres = 512
 xinterface = engine.createUserInterface("X")
@@ -54,7 +79,8 @@
 
 
 #engine.setScene(createDefaultScene())
-engine.setScene(createDefaultScenePython())
+#engine.setScene(createDefaultScenePython())
+engine.setScene(createDielectricTestScene())
 
 
 # if __name__ == "__main__":




  • [MANTA] r762 - in trunk: Model/Materials SwigInterface, bigler, 12/09/2005

Archive powered by MHonArc 2.6.16.

Top of page