You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
(116) |
May
(220) |
Jun
(52) |
Jul
(30) |
Aug
(35) |
Sep
(24) |
Oct
(49) |
Nov
(44) |
Dec
(70) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(21) |
Feb
(30) |
Mar
(9) |
Apr
(44) |
May
(2) |
Jun
|
Jul
(10) |
Aug
(20) |
Sep
(25) |
Oct
(12) |
Nov
(16) |
Dec
(4) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(25) |
Aug
|
Sep
|
Oct
|
Nov
(26) |
Dec
(10) |
2006 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(33) |
2007 |
Jan
(4) |
Feb
(57) |
Mar
(17) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Gerardo H. <ma...@us...> - 2005-12-06 02:33:45
|
Update of /cvsroot/jrman/drafts/sampleData In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8703/sampleData Modified Files: noiseShadersTest.rib Log Message: Updated noiseShadersTest.rib to better quality and shadowmaps. Index: noiseShadersTest.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/noiseShadersTest.rib,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** noiseShadersTest.rib 20 Dec 2003 15:35:04 -0000 1.5 --- noiseShadersTest.rib 6 Dec 2005 02:33:37 -0000 1.6 *************** *** 1,12 **** Format 700 700 1 Display "shaderTest" "framebuffer" "rgba" ! PixelSamples 4 4 PixelFilter "gaussian" 2 2 Exposure 1 2.2 Projection "perspective" "fov" 10 Translate 0 0 40 WorldBegin ! LightSource "distantlight" 1 "from" [1 1 -1] "to" [0 0 0] "intensity" 1 ! LightSource "ambientlight" 2 "intensity" 0.05 AttributeBegin Translate -2.2 2.2 0 --- 1,75 ---- + Format 1024 1024 1 + Display "noiseShadersTest.shdw" "file" "z" + PixelSamples 1 1 + Projection "orthographic" + ScreenWindow -3.5 3.5 -4.5 4.5 + Clipping 1 20 + Translate 0 0 10 + Rotate -35.264389683 0 0 1 + Rotate 45 0 1 0 + WorldBegin + Surface "constant" + AttributeBegin + Translate -2.2 2.2 0 + Sphere 1 -1 1 360 + AttributeEnd + AttributeBegin + Translate 0 2.2 0 + Sphere 1 -1 1 360 + AttributeEnd + AttributeBegin + Translate 2.2 2.2 0 + Sphere 1 -1 1 360 + AttributeEnd + AttributeBegin + Translate -2.2 0 0 + Displacement "noisetest" "uniform float noisescale" 2 "uniform integer noiseoctaves" 4 "uniform float Km" 0.3 + Attribute "displacementbound" "sphere" 0.3 + Sphere 1 -1 1 360 + AttributeEnd + AttributeBegin + Displacement "dented" "uniform float noisescale" 2 "uniform integer noiseoctaves" 6 "uniform float Km" 0.3 + Sphere 1 -1 1 360 + AttributeEnd + AttributeBegin + Translate 2.2 0 0 + Displacement "turbulence" "uniform float noisescale" 2 "uniform integer noiseoctaves" 4 "uniform float Km" 0.3 + Attribute "displacementbound" "sphere" 0.3 + Sphere 1 -1 1 360 + AttributeEnd + AttributeBegin + Translate -2.2 -2.2 0 + Sphere 1 -1 1 360 + AttributeEnd + AttributeBegin + Translate 0 -2.2 0 + Sphere 1 -1 1 360 + AttributeEnd + AttributeBegin + Translate 2.2 -2.2 0 + Displacement "dented" "uniform float noisescale" 3 "uniform integer noiseoctaves" 4 "uniform float Km" 0.3 + Sphere 1 -1 1 360 + AttributeEnd + WorldEnd + + Declare "shadowmap" "string" + Declare "bias" "uniform float" + Declare "samples" "uniform float" + Declare "blur" "uniform float" Format 700 700 1 Display "shaderTest" "framebuffer" "rgba" ! PixelSamples 8 8 PixelFilter "gaussian" 2 2 Exposure 1 2.2 Projection "perspective" "fov" 10 + ScreenWindow -1 1 -1 1 + Clipping .1 1000 Translate 0 0 40 WorldBegin ! ShadingRate .25 ! LightSource "shadowdistantlight" 1 "from" [1 1 -1] "to" [0 0 0] "intensity" .8 ! "shadowmap" "noiseShadersTest.shdw" "bias" .01 ! "samples" 64 "blur" 4 ! LightSource "ambientlight" 2 "intensity" .02 AttributeBegin Translate -2.2 2.2 0 |
From: Elmer G. <ega...@us...> - 2005-11-30 03:08:34
|
Update of /cvsroot/jrman/drafts/src/org/jrman/primitive In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13107/src/org/jrman/primitive Modified Files: NurbsRI.java Log Message: Clamped an other array Index: NurbsRI.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/NurbsRI.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** NurbsRI.java 27 Nov 2005 04:08:38 -0000 1.9 --- NurbsRI.java 30 Nov 2005 03:08:26 -0000 1.10 *************** *** 439,444 **** if (i < 0) omega = 0; ! else ! omega = (u - kv[i]) / (kv[i + r - 1] - kv[i]); bvals[s + 1] = bvals[s + 1] + (1 - omega) * bvals[s]; bvals[s] = omega * bvals[s]; --- 439,447 ---- if (i < 0) omega = 0; ! else { ! int ir1 = Calc.clamp(i + r - 1, 0, kv.length - 1); ! int ic = Calc.clamp(i, 0, kv.length - 1); ! omega = (u - kv[ic]) / (kv[ir1] - kv[ic]); ! } bvals[s + 1] = bvals[s + 1] + (1 - omega) * bvals[s]; bvals[s] = omega * bvals[s]; |
From: Gerardo H. <ma...@us...> - 2005-11-27 04:08:52
|
Update of /cvsroot/jrman/drafts/src/org/jrman/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2531/src/org/jrman/render Modified Files: Renderer.java Added Files: RendererBoundingBox.java Log Message: Implemented "boundingbox" Hider (to be used for DelayedReadArchive) --- NEW FILE: RendererBoundingBox.java --- /* RendererBoundingBox.java Copyright (C) 2005 Gerardo Horvilleur Martinez This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package org.jrman.render; import org.jrman.geom.BoundingVolume; import org.jrman.geom.MutableBounds3f; import org.jrman.geom.Transform; import org.jrman.primitive.Primitive; public class RendererBoundingBox extends Renderer { private MutableBounds3f boundingBox = new MutableBounds3f(); public void addPrimitive(Primitive primitive) { Transform objectToWorld = primitive.getAttributes().getTransform(); BoundingVolume bv = primitive.getBoundingVolume(); float db = primitive.getAttributes().getDisplacementBound(); if (db != 0f) bv = bv.enlarge(db); bv = bv.transform(objectToWorld); boundingBox.addBoundingVolume(bv); } public void render() { System.out.println(boundingBox); } } Index: Renderer.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/Renderer.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Renderer.java 11 Sep 2004 17:36:27 -0000 1.3 --- Renderer.java 27 Nov 2005 04:08:38 -0000 1.4 *************** *** 41,44 **** --- 41,46 ---- else if (hider == Hider.NULL) renderer = new RendererNull(); + else if (hider == Hider.BOUNDING_BOX) + renderer = new RendererBoundingBox(); renderer.init(frame, world, parser); return renderer; |
From: Gerardo H. <ma...@us...> - 2005-11-27 04:08:52
|
Update of /cvsroot/jrman/drafts/src/org/jrman/geom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2531/src/org/jrman/geom Modified Files: Bounds3f.java Log Message: Implemented "boundingbox" Hider (to be used for DelayedReadArchive) Index: Bounds3f.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/geom/Bounds3f.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Bounds3f.java 6 Jul 2005 22:53:23 -0000 1.16 --- Bounds3f.java 27 Nov 2005 04:08:38 -0000 1.17 *************** *** 249,271 **** public String toString() { StringBuffer sb = new StringBuffer(); - sb.append("Bounds3f"); sb ! .append(", min: ") ! .append('(') .append(minX) ! .append(", ") ! .append(minY) ! .append(", ") ! .append(minZ) ! .append(')'); ! sb ! .append(", max: ") ! .append('(') .append(maxX) ! .append(", ") .append(maxY) ! .append(", ") .append(maxZ) ! .append(')'); return sb.toString(); } --- 249,266 ---- public String toString() { StringBuffer sb = new StringBuffer(); sb ! .append('[') .append(minX) ! .append(" ") .append(maxX) ! .append(" ") ! .append(minY) ! .append(" ") .append(maxY) ! .append(" ") ! .append(minZ) ! .append(" ") .append(maxZ) ! .append(']'); return sb.toString(); } |
From: Gerardo H. <ma...@us...> - 2005-11-27 04:08:52
|
Update of /cvsroot/jrman/drafts/src/org/jrman/primitive In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2531/src/org/jrman/primitive Modified Files: NurbsRI.java Log Message: Implemented "boundingbox" Hider (to be used for DelayedReadArchive) Index: NurbsRI.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/NurbsRI.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** NurbsRI.java 23 Nov 2005 03:55:34 -0000 1.8 --- NurbsRI.java 27 Nov 2005 04:08:38 -0000 1.9 *************** *** 247,250 **** --- 247,251 ---- attributes); } else { + float splitKnot = kv1[0]; float mid = (splitKnot - kv0[0]) / |
From: Gerardo H. <ma...@us...> - 2005-11-27 04:08:52
|
Update of /cvsroot/jrman/drafts/sampleData In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2531/sampleData Modified Files: vehicleElement.rib x.rib complexnurbs1.rib ice.rib space.rib teapot.rib Log Message: Implemented "boundingbox" Hider (to be used for DelayedReadArchive) Index: teapot.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/teapot.rib,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** teapot.rib 13 Apr 2004 20:37:03 -0000 1.3 --- teapot.rib 27 Nov 2005 04:08:38 -0000 1.4 *************** *** 2,6 **** Format 800 600 1.0 PixelSamples 4 4 ! Exposure 1.0 2.2 Option "quality" "highlights" 1 Projection "perspective" "fov" 3.2 --- 2,6 ---- Format 800 600 1.0 PixelSamples 4 4 ! Exposure 1.0 1.8 Option "quality" "highlights" 1 Projection "perspective" "fov" 3.2 *************** *** 19,27 **** Color [1 1 1] Surface "paintedplastic" "roughness" .01 ! "texturename" "mandrill.txr" ! #Displacement "noisetest" "uniform float noisescale" 2 ! # "uniform integer noiseoctaves" 4 ! # "uniform float Km" 0.15 ! #Attribute "displacementbound" "sphere" 0.15 AttributeBegin ShadingRate .25 --- 19,27 ---- Color [1 1 1] Surface "paintedplastic" "roughness" .01 ! "texturename" "brick.txr" "Ks" 0 ! Displacement "noisetest" "uniform float noisescale" 2 ! "uniform integer noiseoctaves" 4 ! "uniform float Km" 0.15 ! Attribute "displacementbound" "sphere" 0.15 AttributeBegin ShadingRate .25 Index: vehicleElement.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/vehicleElement.rib,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** vehicleElement.rib 28 May 2003 06:22:44 -0000 1.1 --- vehicleElement.rib 27 Nov 2005 04:08:38 -0000 1.2 *************** *** 1,36 **** TransformBegin Translate 0 0 0 ! ReadArchive "bikeData.rib" TransformEnd TransformBegin Translate -10 0 0 ! ReadArchive "mbikeData.rib" TransformEnd TransformBegin Translate 14 0 0 ! ReadArchive "carData.rib" TransformEnd TransformBegin Translate -14 0 -36 ! ReadArchive "bikeData.rib" TransformEnd TransformBegin Translate 14 0 -36 ! ReadArchive "mbikeData.rib" TransformEnd TransformBegin Translate 0 0 -36 ! ReadArchive "carData.rib" TransformEnd TransformBegin Translate -14 0 36 ! ReadArchive "bikeData.rib" TransformEnd TransformBegin Translate 14 0 36 ! ReadArchive "mbikeData.rib" TransformEnd TransformBegin Translate 0 0 36 ! ReadArchive "carData.rib" TransformEnd --- 1,36 ---- TransformBegin Translate 0 0 0 ! Procedural "DelayedReadArchive" ["bikeData.rib"] [-3.0660005 3.0349998 -0.11199999 9.91 -8.96 7.9870005] TransformEnd TransformBegin Translate -10 0 0 ! Procedural "DelayedReadArchive" ["mbikeData.rib"] [-4.1450005 4.1450005 -0.09 10.06 -9.76 10.195] TransformEnd TransformBegin Translate 14 0 0 ! Procedural "DelayedReadArchive" ["carData.rib"] [-7.1150007 7.1150007 -0.120000005 13.655001 -15.045 18.52] TransformEnd TransformBegin Translate -14 0 -36 ! Procedural "DelayedReadArchive" ["bikeData.rib"] [-3.0660005 3.0349998 -0.11199999 9.91 -8.96 7.9870005] TransformEnd TransformBegin Translate 14 0 -36 ! Procedural "DelayedReadArchive" ["mbikeData.rib"] [-4.1450005 4.1450005 -0.09 10.06 -9.76 10.195] TransformEnd TransformBegin Translate 0 0 -36 ! Procedural "DelayedReadArchive" ["carData.rib"] [-7.1150007 7.1150007 -0.120000005 13.655001 -15.045 18.52] TransformEnd TransformBegin Translate -14 0 36 ! Procedural "DelayedReadArchive" ["bikeData.rib"] [-3.0660005 3.0349998 -0.11199999 9.91 -8.96 7.9870005] TransformEnd TransformBegin Translate 14 0 36 ! Procedural "DelayedReadArchive" ["mbikeData.rib"] [-4.1450005 4.1450005 -0.09 10.06 -9.76 10.195] TransformEnd TransformBegin Translate 0 0 36 ! Procedural "DelayedReadArchive" ["carData.rib"] [-7.1150007 7.1150007 -0.120000005 13.655001 -15.045 18.52] TransformEnd Index: space.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/space.rib,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** space.rib 16 Apr 2004 03:47:26 -0000 1.5 --- space.rib 27 Nov 2005 04:08:38 -0000 1.6 *************** *** 1,11 **** ! #MakeTexture "earth.4096x2048.jpg" "earth.txr" "clamp" "clamp" "x" 1 1 ! #MakeTexture "earth-clouds.jpg" "earth-clouds.txr" "clamp" "clamp" "x" 1 1 ! #MakeTexture "moon.1440x720.1.jpg" "moon.txr" "clamp" "clamp" "x" 1 1 ! #MakeTexture "mars.2880x1440.jpg" "mars.txr" "clamp" "clamp" "x" 1 1 ! #MakeTexture "tycho.jpg" "tycho.txr" "periodic" "periodic" "x" 1 1 Display "Space.png" "framebuffer" "rgb" Format 800 600 1 PixelSamples 8 8 ! Exposure 1 2.2 ScreenWindow -400 400 -300 300 Projection "orthographic" --- 1,11 ---- ! #MakeTexture "earth.4096x2048.jpg" "earth.txr" "clamp" "clamp" "box" 1 1 ! #MakeTexture "earth-clouds.jpg" "earth-clouds.txr" "clamp" "clamp" "box" 1 1 ! #MakeTexture "moon.1440x720.1.jpg" "moon.txr" "clamp" "clamp" "box" 1 1 ! #MakeTexture "mars.2880x1440.jpg" "mars.txr" "clamp" "clamp" "box" 1 1 ! #MakeTexture "tycho.jpg" "tycho.txr" "periodic" "periodic" "box" 1 1 Display "Space.png" "framebuffer" "rgb" Format 800 600 1 PixelSamples 8 8 ! Exposure 1 1.8 ScreenWindow -400 400 -300 300 Projection "orthographic" *************** *** 24,29 **** Rotate 90 1 0 0 AttributeBegin ! Attribute "displacementbound" "sphere" .1 ! Displacement "bumpy" "texturename" "earth.txr" "Km" .1 Sphere 250 -250 250 360 "texturename" "earth.txr" AttributeEnd --- 24,29 ---- Rotate 90 1 0 0 AttributeBegin ! Attribute "displacementbound" "sphere" .3 ! Displacement "bumpy" "texturename" "earth.txr" "Km" .3 Sphere 250 -250 250 360 "texturename" "earth.txr" AttributeEnd Index: ice.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/ice.rib,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ice.rib 7 Nov 2005 01:04:47 -0000 1.2 --- ice.rib 27 Nov 2005 04:08:38 -0000 1.3 *************** *** 3,7 **** FrameBegin 1 Display "ice" "framebuffer" "rgba" ! Format 400 300 -1 Projection "perspective" "fov" [90] FrameAspectRatio 1.33333 --- 3,7 ---- FrameBegin 1 Display "ice" "framebuffer" "rgba" ! Format 800 600 -1 Projection "perspective" "fov" [90] FrameAspectRatio 1.33333 Index: complexnurbs1.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/complexnurbs1.rib,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** complexnurbs1.rib 13 Nov 2004 21:21:36 -0000 1.2 --- complexnurbs1.rib 27 Nov 2005 04:08:38 -0000 1.3 *************** *** 26,31 **** Opacity [1 1 1] #Surface "matte" ! TextureCoordinates 0 0 10 0 0 10 10 10 ! Surface "paintedplastic" "texturename" "brick.txr" ShadingInterpolation "smooth" NuPatch 51 4 [0 0 0 0 0.0208333 0.0416667 0.0625 --- 26,31 ---- Opacity [1 1 1] #Surface "matte" ! #TextureCoordinates 0 0 10 0 0 10 10 10 ! Surface "paintedplastic" "texturename" "brick.txr" "Ks" 0 ShadingInterpolation "smooth" NuPatch 51 4 [0 0 0 0 0.0208333 0.0416667 0.0625 Index: x.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/x.rib,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** x.rib 8 Apr 2003 20:02:30 -0000 1.1 --- x.rib 27 Nov 2005 04:08:38 -0000 1.2 *************** *** 1,142 **** ! ######################################################################### ! # fig9.7.rib - RIB to create Figure 9.7 of: ! # ! # _Advanced RenderMan: Creating CGI for Motion Picture_, ! # by Anthony A. Apodaca and Larry Gritz, Morgan Kaufmann, 1999. ! # ! # This file demostrates the difference between the Oren/Nayar reflection ! # model (output in fig9.7a.tif) and an ordinary diffuse model ! # (fig9.7b.tif). ! # ! ######################################################################### ! ! ##RenderMan RIB-Structure 1.0 ! version 3.03 ! ! Option "searchpath" "shader" [".:../shaders:&"] ! Option "searchpath" "archive" [".:../models:&"] ! Format 300 240 1 ! PixelSamples 2 2 ! ShadingRate 1 ! ! FrameBegin 1 ! Display "fig9.7a.tif" "file" "rgb" ! Projection "perspective" "fov" [23] ! ##CameraOrientation 0 -40 15 0 0 5.75 0 0.225304 0.974288 ! ConcatTransform [-1 0 0 0 0 0.225304 0.974288 0 0 0.974288 -0.225304 0 0 0 0 1] ! Translate 0 40 -15 ! WorldBegin ! TransformBegin ! CoordSysTransform "camera" ! # Ambient light ! LightSource "ambientlight" 1 "intensity" [0.01] ! Illuminate 1 1 ! # Fill light ! AttributeBegin ! Translate -50 50 -100 ! #Translate 1e10 .1e3 4e-1 ! Rotate -20 0 1 0 ! Rotate 30 1 0 0 ! Declare "a" "float" ! Declare "b" "integer" ! Declare "c" "string" ! Declare "d" "color" ! Declare "e" "point" ! Declare "f" "hpoint" ! Declare "g" "matrix" ! Declare "h" "vector" ! Declare "i" "normal" ! Declare "a" "uniform float" ! Declare "b" "varying integer" ! Declare "c" "constant string" ! Declare "d" "vertex color" ! Declare "e" "uniform point[2]" ! Declare "f" "vertex hpoint[3]" ! Declare "g" "uniform matrix[1]" ! Declare "h" "varying vector[10]" ! Declare "lighttype" "string" ! LightSource "uberlight" 3 "lighttype" ["omni"] "intensity" [0.075] "__nonspecular" [1] ! AttributeEnd ! Illuminate 3 1 ! # Bounce light ! AttributeBegin ! Translate 0 -20 -100 ! LightSource "uberlight" 5 "string lighttype" ["omni"] "intensity" [0.025] "__nonspecular" [1] ! AttributeEnd ! Illuminate 5 1 ! TransformEnd ! # Key light ! AttributeBegin ! Rotate 90 -1 0 0 ! Translate 0 0 -100 ! LightSource "uberlight" 2 "string lighttype" ["omni"] "intensity" [1.1] ! AttributeEnd ! Illuminate 2 1 ! AttributeBegin ! Color 1 .3 .05 ! Surface "clay" "roughness" [0.5] ! Translate -0.5 0 1 ! Scale 3 3 3 ! ReadArchive "z.rib" ! ReadArchive "gumbo.rib" ! ReadArchive "teapot.rib" ! ReadArchive "vase.rib" ! AttributeEnd ! AttributeBegin ! Color .65 .65 .65 ! Surface "constant" ! Sphere 50 -50 50 360 ! AttributeEnd ! WorldEnd ! FrameEnd ! ! FrameBegin 2 ! Display "fig9.7b.tif" "file" "rgb" ! Projection "perspective" "fov" [23] ! ##CameraOrientation 0 -40 15 0 0 5.75 0 0.225304 0.974288 ! ConcatTransform [-1 0 0 0 0 0.225304 0.974288 0 0 0.974288 -0.225304 0 0 0 0 1] ! Translate 0 40 -15 ! WorldBegin ! TransformBegin ! CoordSysTransform "camera" ! # Ambient light ! LightSource "ambientlight" 1 "intensity" [0.01] ! Illuminate 1 1 ! # Fill light ! AttributeBegin ! Translate -50 50 -100 ! Rotate -20 0 1 0 ! Rotate 30 1 0 0 ! Declare "lighttype" "string" ! LightSource "uberlight" 3 "lighttype" ["omni"] "intensity" [0.075] "__nonspecular" [1] ! AttributeEnd ! Illuminate 3 1 ! # Bounce light ! AttributeBegin ! Translate 0 -20 -100 ! LightSource "uberlight" 5 "string lighttype" ["omni"] "intensity" [0.025] "__nonspecular" [1] ! AttributeEnd ! Illuminate 5 1 ! TransformEnd ! # Key light ! AttributeBegin ! Rotate 90 -1 0 0 ! Translate 0 0 -100 ! LightSource "uberlight" 2 "string lighttype" ["omni"] "intensity" [1.1] ! AttributeEnd ! Illuminate 2 1 ! AttributeBegin ! Color 1 .3 .05 ! Surface "clay" "roughness" [0] ! Translate -0.5 0 1 ! Scale 3 3 3 ! ReadArchive "z.rib" ! AttributeEnd ! AttributeBegin ! Color .65 .65 .65 ! Surface "constant" ! Sphere 50 -50 50 360 ! AttributeEnd ! WorldEnd ! FrameEnd ! --- 1,65 ---- ! MakeTexture "mandrill.jpg" "mandrill.txr" "periodic" "periodic" "gaussian" 2 2 ! Option "statistics" "endofframe" 1 ! Format 4000 3000 1 ! PixelSamples 8 8 ! Exposure 1 1.8 ! Display "cubeScene.png" "framebuffer" "rgb" ! PixelFilter "gaussian" 2 2 ! Projection "perspective" "fov" 50 ! Translate 0 0 60 ! Rotate 20 0 0 1 ! Rotate -30 1 0 0 ! LightSource "ambientlight" 1 "intensity" [0.1] ! LightSource "distantlight" 2 "intensity" [0.7] "lightcolor" [1 1 1] "from" [0 100 -200] "to" [0 0 0] ! WorldBegin ! ShadingRate .25 ! Surface "paintedplastic" "texturename" "mandrill.txr" ! AttributeBegin ! Translate 20 20 0 ! Rotate 60 1 1 1 ! Scale 1.5 1.5 1.5 ! ReadArchive "cube.rib" ! AttributeEnd ! ! AttributeBegin ! Translate -15 20 0 ! Rotate 60 1 0 1 ! Scale 1.5 1.5 1.5 ! ReadArchive "cube.rib" ! AttributeEnd ! ! AttributeBegin ! Translate 20 -10 0 ! Rotate 45 0 1 1 ! Scale 1.5 1.5 1.5 ! ReadArchive "cube.rib" ! AttributeEnd ! ! AttributeBegin ! Translate -15 -12 0 ! Rotate 45 1 1 0 ! Scale 1.5 1.5 1.5 ! ReadArchive "cube.rib" ! AttributeEnd ! ! AttributeBegin ! Translate 0 0 15 ! Rotate 0 1 0 0 ! Scale 1.5 1.5 1.5 ! ReadArchive "cube.rib" ! AttributeEnd ! ! AttributeBegin ! Translate 10 -20 5 ! Rotate -60 1 0 1 ! Scale 1.5 1.5 1.5 ! ReadArchive "cube.rib" ! AttributeEnd ! ! AttributeBegin ! Translate 0 -50 100 ! Rotate 180 1 0 0 ! Scale 12 12 12 ! ReadArchive "cube.rib" ! AttributeEnd ! WorldEnd |
From: Gerardo H. <ma...@us...> - 2005-11-27 04:08:52
|
Update of /cvsroot/jrman/drafts/src/org/jrman/options In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2531/src/org/jrman/options Modified Files: Hider.java Log Message: Implemented "boundingbox" Hider (to be used for DelayedReadArchive) Index: Hider.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/options/Hider.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Hider.java 9 Apr 2003 05:04:58 -0000 1.1 --- Hider.java 27 Nov 2005 04:08:38 -0000 1.2 *************** *** 28,31 **** --- 28,33 ---- public static final Hider NULL = new Hider("null"); + + public static final Hider BOUNDING_BOX = new Hider("boundingbox"); private String name; *************** *** 36,39 **** --- 38,42 ---- map.put("hidden", HIDDEN); map.put("null", NULL); + map.put("boundingbox", BOUNDING_BOX); } |
From: Gerardo H. <ma...@us...> - 2005-11-23 03:55:47
|
Update of /cvsroot/jrman/drafts/src/org/jrman/primitive In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1535/src/org/jrman/primitive Modified Files: NurbsRI.java Log Message: Fixed NURBS split (u, v, s, and t). Index: NurbsRI.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/NurbsRI.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** NurbsRI.java 19 Nov 2005 23:27:54 -0000 1.7 --- NurbsRI.java 23 Nov 2005 03:55:34 -0000 1.8 *************** *** 219,223 **** if (dirflag) { ! float mid = (umax + umin) / 2; int p0c = kv0.length - uorder; Point4f[][] points0 = new Point4f[vpc][p0c]; --- 219,225 ---- if (dirflag) { ! float splitKnot = kv1[0]; ! float mid = (splitKnot - kv0[0]) / ! (kv1[kv1.length -1] - kv0[0]); int p0c = kv0.length - uorder; Point4f[][] points0 = new Point4f[vpc][p0c]; *************** *** 227,234 **** } } ! result[0] = new NurbsRI(p0c, uorder, kv0, umin, umax, vpc, vorder, vknot, vmin, vmax, !dirflag, nuInterpolateParameters ! (umin, mid, vmin, vmax, points0), attributes); int p1c = kv1.length - uorder; --- 229,236 ---- } } ! result[0] = new NurbsRI(p0c, uorder, kv0, umin, splitKnot, vpc, vorder, vknot, vmin, vmax, !dirflag, nuInterpolateParameters ! (0f, mid, 0f, 1f, points0), attributes); int p1c = kv1.length - uorder; *************** *** 239,249 **** } } ! result[1] = new NurbsRI(p1c, uorder, kv1, umin, umax, vpc, vorder, vknot, vmin, vmax, !dirflag, nuInterpolateParameters ! (mid, umax, vmin, vmax, points1), attributes); } else { ! float mid = (vmax + vmin) / 2; int p0c = kv0.length - vorder; Point4f[][] points0 = new Point4f[p0c][upc]; --- 241,253 ---- } } ! result[1] = new NurbsRI(p1c, uorder, kv1, splitKnot, umax, vpc, vorder, vknot, vmin, vmax, !dirflag, nuInterpolateParameters ! (mid, 1f, 0f, 1f, points1), attributes); } else { ! float splitKnot = kv1[0]; ! float mid = (splitKnot - kv0[0]) / ! (kv1[kv1.length -1] - kv0[0]); int p0c = kv0.length - vorder; Point4f[][] points0 = new Point4f[p0c][upc]; *************** *** 254,260 **** } result[0] = new NurbsRI(upc, uorder, uknot, umin, umax, ! p0c, vorder, kv0, vmin, vmax, !dirflag, nuInterpolateParameters ! (umin, umax, vmin, mid, points0), attributes); --- 258,264 ---- } result[0] = new NurbsRI(upc, uorder, uknot, umin, umax, ! p0c, vorder, kv0, vmin, splitKnot, !dirflag, nuInterpolateParameters ! (0f, 1f, 0f, mid, points0), attributes); *************** *** 267,273 **** } result[1] = new NurbsRI(upc, uorder, uknot, umin, umax, ! p1c, vorder, kv1, vmin, vmax, !dirflag, nuInterpolateParameters ! (umin, umax, mid, vmax, points1), attributes); } --- 271,277 ---- } result[1] = new NurbsRI(upc, uorder, uknot, umin, umax, ! p1c, vorder, kv1, splitKnot, vmax, !dirflag, nuInterpolateParameters ! (0f, 1f, mid, 1f, points1), attributes); } *************** *** 391,398 **** protected void dice_P(ShaderVariables sv) { Point3fGrid P = sv.P; - FloatGrid U = sv.u; - FloatGrid V = sv.v; - FloatGrid S = sv.s; - FloatGrid T = sv.t; int uSize = Grid.getUSize(); int vSize = Grid.getVSize(); --- 395,398 ---- *************** *** 407,414 **** eval(uPos, vPos, p); P.set(u, v, p); - U.set(u, v, uPos); - V.set(u, v, vPos); - S.set(u, v, uPos); - T.set(u, v, vPos); } } --- 407,410 ---- |
From: Gerardo H. <ma...@us...> - 2005-11-19 23:28:03
|
Update of /cvsroot/jrman/drafts/src/org/jrman/primitive In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29595/src/org/jrman/primitive Modified Files: Primitive.java NurbsRI.java Log Message: Small workaround test for texturing bug on NURBS. Index: Primitive.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/Primitive.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** Primitive.java 7 Nov 2005 22:52:58 -0000 1.37 --- Primitive.java 19 Nov 2005 23:27:54 -0000 1.38 *************** *** 136,139 **** --- 136,141 ---- dice_u(shaderVariables); dice_v(shaderVariables); + dice_s(shaderVariables); + dice_t(shaderVariables); dice_P(shaderVariables); dice_du(shaderVariables); *************** *** 145,150 **** dice_Cs(shaderVariables); dice_Os(shaderVariables); - dice_s(shaderVariables); - dice_t(shaderVariables); dice_others(shaderVariables); shaderVariables.primitiveTransform(objectToCamera); --- 147,150 ---- Index: NurbsRI.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/NurbsRI.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** NurbsRI.java 16 Nov 2005 07:03:51 -0000 1.6 --- NurbsRI.java 19 Nov 2005 23:27:54 -0000 1.7 *************** *** 284,289 **** float vmax, Point4f[][] points) { - VaryingScalarHPoint paramHp = - (VaryingScalarHPoint) parameters.getParameter("Pw"); ParameterList result = linearInterpolateParameters(umin, umax, vmin, vmax); --- 284,287 ---- *************** *** 403,407 **** * (vknot[vpc] - vknot[vorder - 1]) + vknot[vorder - 1]; - float fu = 0f; for (int u = 0; u < uSize; u++) { float uPos = ( u /(float) (uSize - 1)) --- 401,404 ---- |
From: Elmer G. <ega...@us...> - 2005-11-16 07:04:00
|
Update of /cvsroot/jrman/drafts/src/org/jrman/primitive In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1719/src/org/jrman/primitive Modified Files: NurbsRI.java Removed Files: Nurbs.java Log Message: Fixed an other HORRIBLE Bug in Nurbs Normals!! Index: NurbsRI.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/NurbsRI.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** NurbsRI.java 8 Nov 2005 00:29:37 -0000 1.5 --- NurbsRI.java 16 Nov 2005 07:03:51 -0000 1.6 *************** *** 24,27 **** --- 24,28 ---- import javax.vecmath.Point4f; import javax.vecmath.Vector3f; + import javax.vecmath.Vector4f; import org.jrman.attributes.Attributes; *************** *** 30,33 **** --- 31,35 ---- import org.jrman.geom.ConvexHull3f; import org.jrman.grid.Grid; + import org.jrman.grid.FloatGrid; import org.jrman.grid.Point3fGrid; import org.jrman.grid.Vector3fGrid; *************** *** 81,85 **** int vpc, int vorder, float[] vknot, float vmin, float vmax, boolean dirflag, ! ParameterList parameters, Attributes attributes) { this.parameters = parameters; this.attributes = attributes; --- 83,87 ---- int vpc, int vorder, float[] vknot, float vmin, float vmax, boolean dirflag, ! ParameterList parameters, Attributes attributes) { this.parameters = parameters; this.attributes = attributes; *************** *** 391,394 **** --- 393,400 ---- protected void dice_P(ShaderVariables sv) { Point3fGrid P = sv.P; + FloatGrid U = sv.u; + FloatGrid V = sv.v; + FloatGrid S = sv.s; + FloatGrid T = sv.t; int uSize = Grid.getUSize(); int vSize = Grid.getVSize(); *************** *** 399,407 **** float fu = 0f; for (int u = 0; u < uSize; u++) { ! float uPos = ( u /(float) (uSize - 1)) ! * (uknot[upc] - uknot[uorder - 1]) ! + uknot[uorder - 1]; eval(uPos, vPos, p); P.set(u, v, p); } } --- 405,417 ---- float fu = 0f; for (int u = 0; u < uSize; u++) { ! float uPos = ( u /(float) (uSize - 1)) ! * (uknot[upc] - uknot[uorder - 1]) ! + uknot[uorder - 1]; eval(uPos, vPos, p); P.set(u, v, p); + U.set(u, v, uPos); + V.set(u, v, vPos); + S.set(u, v, uPos); + T.set(u, v, vPos); } } *************** *** 483,488 **** float tmp = bu[rj] * bv[ri]; ! int ivfirst = Calc.clamp(i + vfirst, 0, points.length); ! int jufirst = Calc.clamp(j + ufirst, 0, points[0].length); Point4f cp = points[ivfirst][jufirst]; result.x += cp.x * tmp; --- 493,498 ---- float tmp = bu[rj] * bv[ri]; ! int ivfirst = Calc.clamp(i + vfirst, 0, points.length - 1); ! int jufirst = Calc.clamp(j + ufirst, 0, points[0].length - 1); Point4f cp = points[ivfirst][jufirst]; result.x += cp.x * tmp; --- Nurbs.java DELETED --- |
From: Elmer G. <ega...@us...> - 2005-11-16 03:20:54
|
Update of /cvsroot/jrman/drafts/jrMan/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32179/jrMan/bin Modified Files: jrman jrman.bat jrmangui jrmangui.bat mktxr mktxr.bat Log Message: Preparing release. Changed executables memory. Index: jrmangui =================================================================== RCS file: /cvsroot/jrman/drafts/jrMan/bin/jrmangui,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** jrmangui 11 Feb 2004 16:20:30 -0000 1.1 --- jrmangui 16 Nov 2005 03:20:46 -0000 1.2 *************** *** 1,4 **** export CLASSPATH=$JRMAN_HOME/jar/jrman.jar:$JRMAN_HOME/jar/vecmath.jar:$JRMAN_HOME/jar/commons-cli-1.0.jar:$JRMAN_HOME/jar/form-1.0.3.jar:$JRMAN_HOME/jar/looks-1.2.0.jar ! export MEMORY=160m java -Xms$MEMORY -Xmx$MEMORY org.jrman.main.JRManGUI \ No newline at end of file --- 1,4 ---- export CLASSPATH=$JRMAN_HOME/jar/jrman.jar:$JRMAN_HOME/jar/vecmath.jar:$JRMAN_HOME/jar/commons-cli-1.0.jar:$JRMAN_HOME/jar/form-1.0.3.jar:$JRMAN_HOME/jar/looks-1.2.0.jar ! export MEMORY=256m java -Xms$MEMORY -Xmx$MEMORY org.jrman.main.JRManGUI \ No newline at end of file Index: jrman =================================================================== RCS file: /cvsroot/jrman/drafts/jrMan/bin/jrman,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** jrman 11 Dec 2003 20:21:11 -0000 1.4 --- jrman 16 Nov 2005 03:20:46 -0000 1.5 *************** *** 1,4 **** export CLASSPATH=$JRMAN_HOME/jar/jrman.jar:$JRMAN_HOME/jar/vecmath.jar:$JRMAN_HOME/jar/commons-cli-1.0.jar ! export MEMORY=160m java -Xms$MEMORY -Xmx$MEMORY org.jrman.main.JRMan $* \ No newline at end of file --- 1,4 ---- export CLASSPATH=$JRMAN_HOME/jar/jrman.jar:$JRMAN_HOME/jar/vecmath.jar:$JRMAN_HOME/jar/commons-cli-1.0.jar ! export MEMORY=256m java -Xms$MEMORY -Xmx$MEMORY org.jrman.main.JRMan $* \ No newline at end of file Index: mktxr =================================================================== RCS file: /cvsroot/jrman/drafts/jrMan/bin/mktxr,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mktxr 11 Dec 2003 20:21:11 -0000 1.3 --- mktxr 16 Nov 2005 03:20:46 -0000 1.4 *************** *** 1,4 **** export CLASSPATH=$JRMAN_HOME/jar/jrman.jar:$JRMAN_HOME/jar/vecmath.jar:$JRMAN_HOME/jar/commons-cli-1.0.jar ! export MEMORY=192m java -Xms$MEMORY -Xmx$MEMORY org.jrman.main.MkTxr $* \ No newline at end of file --- 1,4 ---- export CLASSPATH=$JRMAN_HOME/jar/jrman.jar:$JRMAN_HOME/jar/vecmath.jar:$JRMAN_HOME/jar/commons-cli-1.0.jar ! export MEMORY=256m java -Xms$MEMORY -Xmx$MEMORY org.jrman.main.MkTxr $* \ No newline at end of file Index: jrman.bat =================================================================== RCS file: /cvsroot/jrman/drafts/jrMan/bin/jrman.bat,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** jrman.bat 11 Dec 2003 20:21:11 -0000 1.6 --- jrman.bat 16 Nov 2005 03:20:46 -0000 1.7 *************** *** 2,5 **** set CLASSPATH=%JRMAN_HOME%\jar\jrman.jar;%JRMAN_HOME%\jar\vecmath.jar;%JRMAN_HOME%\jar\commons-cli-1.0.jar ! set MEMORY=160m java -Xms%MEMORY% -Xmx%MEMORY% org.jrman.main.JRMan %* \ No newline at end of file --- 2,5 ---- set CLASSPATH=%JRMAN_HOME%\jar\jrman.jar;%JRMAN_HOME%\jar\vecmath.jar;%JRMAN_HOME%\jar\commons-cli-1.0.jar ! set MEMORY=256m java -Xms%MEMORY% -Xmx%MEMORY% org.jrman.main.JRMan %* \ No newline at end of file Index: mktxr.bat =================================================================== RCS file: /cvsroot/jrman/drafts/jrMan/bin/mktxr.bat,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mktxr.bat 11 Dec 2003 20:21:11 -0000 1.6 --- mktxr.bat 16 Nov 2005 03:20:46 -0000 1.7 *************** *** 2,5 **** set CLASSPATH=%JRMAN_HOME%\jar\jrman.jar;%JRMAN_HOME%\jar\vecmath.jar;%JRMAN_HOME%\jar\commons-cli-1.0.jar ! set MEMORY=192m java -Xms%MEMORY% -Xmx%MEMORY% org.jrman.main.MkTxr %* --- 2,5 ---- set CLASSPATH=%JRMAN_HOME%\jar\jrman.jar;%JRMAN_HOME%\jar\vecmath.jar;%JRMAN_HOME%\jar\commons-cli-1.0.jar ! set MEMORY=256m java -Xms%MEMORY% -Xmx%MEMORY% org.jrman.main.MkTxr %* Index: jrmangui.bat =================================================================== RCS file: /cvsroot/jrman/drafts/jrMan/bin/jrmangui.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** jrmangui.bat 11 Feb 2004 16:20:30 -0000 1.1 --- jrmangui.bat 16 Nov 2005 03:20:46 -0000 1.2 *************** *** 2,5 **** set CLASSPATH=%JRMAN_HOME%\jar\jrman.jar;%JRMAN_HOME%\jar\vecmath.jar;%JRMAN_HOME%\jar\commons-cli-1.0.jar;%JRMAN_HOME%\jar\forms-1.0.3.jar;%JRMAN_HOME%\jar\looks-1.2.0.jar ! set MEMORY=160m java -Xms%MEMORY% -Xmx%MEMORY% org.jrman.main.JRManGUI \ No newline at end of file --- 2,5 ---- set CLASSPATH=%JRMAN_HOME%\jar\jrman.jar;%JRMAN_HOME%\jar\vecmath.jar;%JRMAN_HOME%\jar\commons-cli-1.0.jar;%JRMAN_HOME%\jar\forms-1.0.3.jar;%JRMAN_HOME%\jar\looks-1.2.0.jar ! set MEMORY=256m java -Xms%MEMORY% -Xmx%MEMORY% org.jrman.main.JRManGUI \ No newline at end of file |
From: Elmer G. <ega...@us...> - 2005-11-16 03:20:53
|
Update of /cvsroot/jrman/drafts/src/org/jrman/main In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32179/src/org/jrman/main Modified Files: JrManGUI.java Log Message: Preparing release. Changed executables memory. Index: JrManGUI.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/main/JrManGUI.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JrManGUI.java 24 Oct 2004 21:14:37 -0000 1.3 --- JrManGUI.java 16 Nov 2005 03:20:46 -0000 1.4 *************** *** 10,13 **** --- 10,18 ---- import org.jrman.ui.MainFrame; + import javax.swing.UIManager; + import javax.swing.UnsupportedLookAndFeelException; + + import com.jgoodies.plaf.plastic.Plastic3DLookAndFeel; + /** * The entry point for the basic GUI for jrMan *************** *** 18,45 **** public class JrManGUI { ! private static void centerOnScreen(Frame frame) { ! Dimension paneSize= frame.getSize(); ! Dimension screenSize= frame.getToolkit().getScreenSize(); ! frame.setLocation((screenSize.width - paneSize.width) / 2, (screenSize.height - paneSize.height) / 2); ! } ! /** ! * Main method of the GUI. ! * @param args command line arguments ! */ ! public static void main(String[] args) { ! // Removed Plastic3D look & feel to enable Aqua look & feel on Mac OS X ! /* ! try { ! UIManager.setLookAndFeel(new Plastic3DLookAndFeel()); ! } ! catch (UnsupportedLookAndFeelException e) { ! e.printStackTrace(); ! } ! */ ! Framebuffer.dontExit(); ! MainFrame gui= new MainFrame(); ! centerOnScreen(gui); ! gui.setVisible(true); ! } } --- 23,51 ---- public class JrManGUI { ! private static void centerOnScreen(Frame frame) { ! Dimension paneSize= frame.getSize(); ! Dimension screenSize= frame.getToolkit().getScreenSize(); ! frame.setLocation((screenSize.width - paneSize.width) / 2, ! (screenSize.height - paneSize.height) / 2); ! } ! /** ! * Main method of the GUI. ! * @param args command line arguments ! */ ! public static void main(String[] args) { ! try { ! // Leave Aqua L&F on OS X ! if (!System.getProperty("os.name").equals("Mac OS X")) ! UIManager.setLookAndFeel(new Plastic3DLookAndFeel()); ! } ! catch (UnsupportedLookAndFeelException e) { ! e.printStackTrace(); ! } ! ! Framebuffer.dontExit(); ! MainFrame gui= new MainFrame(); ! centerOnScreen(gui); ! gui.setVisible(true); ! } } |
From: Elmer G. <ega...@us...> - 2005-11-16 03:20:53
|
Update of /cvsroot/jrman/drafts/jrMan In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32179/jrMan Modified Files: README.TXT Log Message: Preparing release. Changed executables memory. Index: README.TXT =================================================================== RCS file: /cvsroot/jrman/drafts/jrMan/README.TXT,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** README.TXT 20 Dec 2003 15:35:04 -0000 1.10 --- README.TXT 16 Nov 2005 03:20:46 -0000 1.11 *************** *** 14,22 **** Setup: ------ ! To install jrMan you must first download and install the JDK 1.4.1 (or above). You can find it at: http://java.sun.com (jrMan doesn't require Java3D anymore) ! Once Java is installed in your system you need to download the jrman-0_3.zip or ! jrman-0_3.tar.gz file an unzip (tar xfz) it. This will create a "jrman-0_3" directory with all the files you need. --- 14,22 ---- Setup: ------ ! To install jrMan you must first download and install the JDK 1.4.2 (or above). You can find it at: http://java.sun.com (jrMan doesn't require Java3D anymore) ! Once Java is installed in your system you need to download the jrman-0_4.zip or ! jrman-0_4.tar.gz file an unzip (tar xfz) it. This will create a "jrman-0_4" directory with all the files you need. *************** *** 24,29 **** you might need to type something like this at the command prompt: ! set PATH=%PATH%;C:\jrman-0_3\bin ! set JRMAN_HOME=C:\jrman-0_3 (assuming you unpacked the jrMan distribution in C:\) --- 24,29 ---- you might need to type something like this at the command prompt: ! set PATH=%PATH%;C:\jrman-0_4\bin ! set JRMAN_HOME=C:\jrman-0_4 (assuming you unpacked the jrMan distribution in C:\) *************** *** 31,36 **** If you are using Linux or Unix you might need to type something like: ! export PATH=$PATH:/usr/local/jrman-0_3/bin ! export JRMAN_HOME=/usr/local/jrman-0_3 (assuming you unzipped the jrMan distribution in /usr/local) --- 31,36 ---- If you are using Linux or Unix you might need to type something like: ! export PATH=$PATH:/usr/local/jrman-0_4/bin ! export JRMAN_HOME=/usr/local/jrman-0_4 (assuming you unzipped the jrMan distribution in /usr/local) *************** *** 44,48 **** jrman scene.rib ! You can also type 'jrman' by itself and it will display a window where you can select the scenes you want to render. You can also use the '-h' option to see all available options. --- 44,48 ---- jrman scene.rib ! You can also type 'jrmangui' and it will display a window where you can select the scenes you want to render. You can also use the '-h' option to see all available options. *************** *** 65,69 **** above scenes). ! Renderman features implemented in jrMan 0.3: -------------------------------------------- * Shadows --- 65,70 ---- above scenes). ! ! Renderman features implemented in jrMan 0.4: -------------------------------------------- * Shadows *************** *** 81,89 **** Points Patch "bilinear" ! Patch "bicubic" (only Bezier) Polygon PointsPolygon ObjectInstance ! * Surface shaders: constant --- 82,92 ---- Points Patch "bilinear" ! Patch "bicubic" (all basis & rational) Polygon PointsPolygon ObjectInstance ! PatchMesh ! NuPatch ! * Surface shaders: constant *************** *** 123,130 **** * All pixel filters ! * Generate image to file ! Renderman features not yet implemented in jrMan 0.3: ---------------------------------------------------- * Shading language compiler --- 126,135 ---- * All pixel filters ! * Generate image to file (RGB & RGBA) + * Delayed Read Archive ! ! Renderman features not yet implemented in jrMan 0.4: ---------------------------------------------------- * Shading language compiler *************** *** 133,145 **** * Level of detail * CSG ! * Nurbs and trim curves * Subdivision surfaces * Curves * General Polygons - * Bicubic patches != "bezier" - * PatchMesh ! Comparing jrMan 0.3 to other Renderman renderers: ------------------------------------------------- We provided in the "model" directory the shading language source code for: --- 138,148 ---- * Level of detail * CSG ! * Trim curves * Subdivision surfaces * Curves * General Polygons ! Comparing jrMan 0.4 to other Renderman renderers: ------------------------------------------------- We provided in the "model" directory the shading language source code for: *************** *** 149,205 **** Performance: ------------ ! We measured the performance relative to jrMan 0.2 and in some cases jrMan 0.3 ! is over twice as fast! ! ! Here are the results of the benchmarks we did with the sample rib files from ! the distribution: ! ! File jrMan 0.2 jrMan 0.3 Speed Improvement ! ---- --------- --------- ----------------- ! aphrodite.rib 24s 16s 1.50 ! uteapot.rib 40s 29s 1.38 ! bike.rib 47s 34s 1.38 ! vehicles.rib 1m59s 1m21s 1.47 ! capsules.rib 3m22s 3m10s 1.06 ! elephant.rib 10m18s 3m39s 2.82 ! shadowTest.rib 7m24s 2m57s 2.51 ! DinningRoom.rib 5m43s 4m03s 1.41 ! ManySpheres.rib 1m39s 1m20s 1.24 ! ! ! How we ran these benchmarks: ! We changed the standard jrman .bat script to assign 384 MB of RAM and to use ! the Server Hotspot compiler, here is the modified script: ! ! @echo off ! ! set CLASSPATH=%JRMAN_HOME%\jar\jrman.jar;%JRMAN_HOME%\jar\vecmath.jar;%JRMAN_HOME%\jar\commons-cli-1.0.jar ! set MEMORY=384m ! java -server -Xms%MEMORY% -Xmx%MEMORY% org.jrman.main.JRMan %* ! ! (we did the same thing for the jrMan 0.2 script) ! ! Then we rendered each image twice, like this: jrman aphrodite.rib aphrodite.rib ! and we took the time for te second render. This is because the hotspot compiler ! starts by intrepreting and profiling the java bytecodes and then uses the ! profile information to select what methods should be translated into optimized ! machine code. ! After rendering the first image the hotspot compiler has already finished ! translating all critical methods into machine code so we can measure ! performance without interpretation or compilation side effects. ! ! We ran these tests with a lot fo RAM to avoid memory footprint side effects ! (we wanted to test only the CPU optimizations by themselves), but jrMan 0.3 ! also has memory optimizations to use a smaller amount of RAM when rendering ! scenes with a large number of primitives. These memory optimizations can also ! be reflected in smaller rendering times. Here are the result of some tests ! using the default amount of RAM (160 MB): ! ! ! File jrMan 0.2 jrMan 0.3 Speed Improvement ! ---- --------- --------- ----------------- ! vehicles.rib 3m09s 1m25s 2.22 ! ! Creating RIB files for jrMan: --- 152,158 ---- Performance: ------------ ! If your JVM supports the HotSpot Server compiler then you can render images up ! to twice as fast by adding the "-server" option when invoking Java in the ! "jrman"or "jrman.bat" script. Creating RIB files for jrMan: |
From: Elmer G. <ega...@us...> - 2005-11-16 03:20:53
|
Update of /cvsroot/jrman/drafts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32179 Modified Files: build.xml Log Message: Preparing release. Changed executables memory. Index: build.xml =================================================================== RCS file: /cvsroot/jrman/drafts/build.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** build.xml 17 Dec 2003 01:34:20 -0000 1.16 --- build.xml 16 Nov 2005 03:20:45 -0000 1.17 *************** *** 63,66 **** --- 63,68 ---- <include name="bin/mktxr.bat"/> <include name="bin/mktxr"/> + <include name="bin/jrmangui.bat"/> + <include name="bin/jrmangui"/> </fileset> </copy> |
From: Gerardo H. <ma...@us...> - 2005-11-14 02:51:49
|
Update of /cvsroot/jrman/drafts/src/org/jrman/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3571/src/org/jrman/render Modified Files: RendererHidden.java Log Message: Saved primitive distance to camera before cameraToRaster transform (probably doesn't make any difference). Index: RendererHidden.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/RendererHidden.java,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** RendererHidden.java 9 Nov 2005 07:09:51 -0000 1.71 --- RendererHidden.java 14 Nov 2005 02:51:32 -0000 1.72 *************** *** 206,211 **** int row, boolean check) { - bve = bve.transform(cameraToRaster); primitive.setDistance(bve.getMinZ()); Bounds2f bounds = bve.toBounds2f(); float db = primitive.getAttributes().getDisplacementBound(); --- 206,211 ---- int row, boolean check) { primitive.setDistance(bve.getMinZ()); + bve = bve.transform(cameraToRaster); Bounds2f bounds = bve.toBounds2f(); float db = primitive.getAttributes().getDisplacementBound(); |
From: Gerardo H. <ma...@us...> - 2005-11-14 02:51:49
|
Update of /cvsroot/jrman/drafts/src/org/jrman/geom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3571/src/org/jrman/geom Modified Files: ConvexHull3f.java Log Message: Saved primitive distance to camera before cameraToRaster transform (probably doesn't make any difference). Index: ConvexHull3f.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/geom/ConvexHull3f.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ConvexHull3f.java 20 Sep 2004 21:09:05 -0000 1.15 --- ConvexHull3f.java 14 Nov 2005 02:51:32 -0000 1.16 *************** *** 28,32 **** private static Point3f tmpPoint = new Point3f(); ! private float[] pointsData = new float[4 * 3]; --- 28,32 ---- private static Point3f tmpPoint = new Point3f(); ! private float[] pointsData = new float[4 * 3]; |
From: Gerardo H. <ma...@us...> - 2005-11-14 02:00:28
|
Update of /cvsroot/jrman/drafts/src/org/jrman/grid In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28128/src/org/jrman/grid Modified Files: Color3fGrid.java Log Message: Textures: really use the grid intersection for texture coordinates instead of the quad's centroid. Index: Color3fGrid.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/grid/Color3fGrid.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Color3fGrid.java 13 Apr 2004 20:37:02 -0000 1.9 --- Color3fGrid.java 14 Nov 2005 02:00:19 -0000 1.10 *************** *** 68,73 **** --- 68,77 ---- / 2f; area = Math.abs(area) + blur; + /* float avgS = (s.get(u, v) + s.get(u1, v) + s.get(u1, v1) + s.get(u, v1)) / 4f; float avgT = (t.get(u, v) + t.get(u1, v) + t.get(u1, v1) + t.get(u, v1)) / 4f; + */ + float avgS = s.get(u, v); + float avgT = t.get(u, v); getColor(texture, avgS, avgT, area, tmpc); set(u, v, tmpc); |
From: Gerardo H. <ma...@us...> - 2005-11-09 07:10:05
|
Update of /cvsroot/jrman/drafts/src/org/jrman/render In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16007/src/org/jrman/render Modified Files: RendererHidden.java Log Message: Fixed DelayedReadArchive bug: Primitives were being added to already processed buckets. Index: RendererHidden.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/RendererHidden.java,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** RendererHidden.java 6 Jul 2005 22:53:24 -0000 1.70 --- RendererHidden.java 9 Nov 2005 07:09:51 -0000 1.71 *************** *** 112,115 **** --- 112,117 ---- private int column; + + private boolean rendering; public void init(Frame frame, World world, Parser parser) { *************** *** 130,134 **** public void addPrimitive(Primitive primitive) { ! internalAddPrimitive(primitive, column, row, false); } --- 132,136 ---- public void addPrimitive(Primitive primitive) { ! internalAddPrimitive(primitive, column, row, rendering); } *************** *** 278,281 **** --- 280,284 ---- public void render() { + rendering = true; worldParseEnd = System.currentTimeMillis(); Display.Mode displayMode = frame.getDisplay().getMode(); *************** *** 501,504 **** --- 504,508 ---- float time = (end - start) / 1000f; displayStats(gridCount, sampler, time); + rendering = false; } |
From: Gerardo H. <ma...@us...> - 2005-11-08 15:20:14
|
Update of /cvsroot/jrman/drafts/sampleData In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2116/sampleData Modified Files: cubeScene.rib unit.rib Log Message: Test scene with 7,000 teapots. Index: cubeScene.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/cubeScene.rib,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** cubeScene.rib 20 Sep 2004 21:09:06 -0000 1.8 --- cubeScene.rib 8 Nov 2005 15:20:06 -0000 1.9 *************** *** 1,21 **** ! Format 2000 1500 1 ! PixelSamples 4 4 ! Exposure 1 2.2 ! Display "cubeScene.tif" "framebuffer" "rgb" ! PixelFilter "sinc" 2 2 Projection "perspective" "fov" 50 - ShadingRate 1 - Surface "fakedlight" Translate 0 0 60 Rotate 20 0 0 1 Rotate -30 1 0 0 ! LightSource "ambientlight" 1 "intensity" [0.3 ] ! LightSource "distantlight" 2 "intensity" [1 ] "lightcolor" [1 1 1] "from" [0 100 -200] "to" [0 0 0] ! LightSource "distantlight" 3 "intensity" [0.6 ] "lightcolor" [0.4 0.5 0.4] "from" [200 10 0] "to" [0 0 0] ! LightSource "distantlight" 4 "intensity" [1 ] "lightcolor" [1 1 1] "from" [-50 10 200] "to" [0 0 0] WorldBegin ! # red AttributeBegin - Color 1 0 0 Translate 20 20 0 Rotate 60 1 1 1 --- 1,18 ---- ! MakeTexture "mandrill.jpg" "mandrill.txr" "periodic" "periodic" "gaussian" 2 2 ! Format 4000 3000 1 ! PixelSamples 8 8 ! Exposure 1 1.8 ! Display "cubeScene.png" "framebuffer" "rgb" ! PixelFilter "gaussian" 2 2 Projection "perspective" "fov" 50 Translate 0 0 60 Rotate 20 0 0 1 Rotate -30 1 0 0 ! LightSource "ambientlight" 1 "intensity" [0.1] ! LightSource "distantlight" 2 "intensity" [0.7] "lightcolor" [1 1 1] "from" [0 100 -200] "to" [0 0 0] WorldBegin ! ShadingRate .25 ! Surface "paintedplastic" "texturename" "mandrill.txr" AttributeBegin Translate 20 20 0 Rotate 60 1 1 1 *************** *** 23,29 **** ReadArchive "cube.rib" AttributeEnd ! # green AttributeBegin - Color 0 1 0 Translate -15 20 0 Rotate 60 1 0 1 --- 20,25 ---- ReadArchive "cube.rib" AttributeEnd ! AttributeBegin Translate -15 20 0 Rotate 60 1 0 1 *************** *** 31,37 **** ReadArchive "cube.rib" AttributeEnd ! # blue AttributeBegin - Color 0 0 1 Translate 20 -10 0 Rotate 45 0 1 1 --- 27,32 ---- ReadArchive "cube.rib" AttributeEnd ! AttributeBegin Translate 20 -10 0 Rotate 45 0 1 1 *************** *** 39,45 **** ReadArchive "cube.rib" AttributeEnd ! # yellow AttributeBegin - Color 1 1 0 Translate -15 -12 0 Rotate 45 1 1 0 --- 34,39 ---- ReadArchive "cube.rib" AttributeEnd ! AttributeBegin Translate -15 -12 0 Rotate 45 1 1 0 *************** *** 47,53 **** ReadArchive "cube.rib" AttributeEnd ! # cyan AttributeBegin - Color 0 1 1 Translate 0 0 15 Rotate 0 1 0 0 --- 41,46 ---- ReadArchive "cube.rib" AttributeEnd ! AttributeBegin Translate 0 0 15 Rotate 0 1 0 0 *************** *** 55,61 **** ReadArchive "cube.rib" AttributeEnd ! # magenta AttributeBegin - Color 1 0 1 Translate 10 -20 5 Rotate -60 1 0 1 --- 48,53 ---- ReadArchive "cube.rib" AttributeEnd ! AttributeBegin Translate 10 -20 5 Rotate -60 1 0 1 *************** *** 63,70 **** ReadArchive "cube.rib" AttributeEnd ! # large gray AttributeBegin - Color .6 .6 .6 Translate 0 -50 100 Scale 12 12 12 ReadArchive "cube.rib" --- 55,62 ---- ReadArchive "cube.rib" AttributeEnd ! AttributeBegin Translate 0 -50 100 + Rotate 180 1 0 0 Scale 12 12 12 ReadArchive "cube.rib" Index: unit.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/unit.rib,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** unit.rib 20 Sep 2004 21:09:06 -0000 1.8 --- unit.rib 8 Nov 2005 15:20:06 -0000 1.9 *************** *** 1,6 **** ! #AttributeBegin ! #Rotate 90 0 1 0 ! #Scale .05 .05 .05 ! #Procedural "DelayedReadArchive" ["bikeData.rib"] [-8 8 -8 8 -8 8] ! #AttributeEnd ! ReadArchive "torusUnit.rib" --- 1,6 ---- ! AttributeBegin ! Rotate 90 1 1 0 ! Scale .005 .005 .005 ! Procedural "DelayedReadArchive" ["uteapotData.rib"] [-100 100 -100 100 -100 100] ! AttributeEnd ! #ReadArchive "torusUnit.rib" |
From: Elmer G. <ega...@us...> - 2005-11-08 00:29:46
|
Update of /cvsroot/jrman/drafts/src/org/jrman/primitive In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4632/src/org/jrman/primitive Modified Files: NurbsRI.java Log Message: Extracted variables to final. Index: NurbsRI.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/NurbsRI.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NurbsRI.java 7 Nov 2005 23:28:45 -0000 1.4 --- NurbsRI.java 8 Nov 2005 00:29:37 -0000 1.5 *************** *** 73,76 **** --- 73,80 ---- Declaration.StorageClass.VERTEX, Declaration.Type.HPOINT, 1); + + private static Point4f result = new Point4f(); + + private static Point3f p = new Point3f(); public NurbsRI(int upc, int uorder, float[] uknot, float umin, float umax, *************** *** 398,402 **** * (uknot[upc] - uknot[uorder - 1]) + uknot[uorder - 1]; - Point3f p = new Point3f(); eval(uPos, vPos, p); P.set(u, v, p); --- 402,405 ---- *************** *** 469,473 **** float[] bv = basisFunctions(v, vbrkPoint, vknot, vorder); ! Point4f result = new Point4f(); for (int i = 0; i < vorder; i++) { for (int j = 0; j < uorder; j++) { --- 472,480 ---- float[] bv = basisFunctions(v, vbrkPoint, vknot, vorder); ! result.x = 0; ! result.y = 0; ! result.z = 0; ! result.w = 0; ! for (int i = 0; i < vorder; i++) { for (int j = 0; j < uorder; j++) { |
From: Elmer G. <ega...@us...> - 2005-11-07 23:28:52
|
Update of /cvsroot/jrman/drafts/src/org/jrman/primitive In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12553/src/org/jrman/primitive Modified Files: NurbsRI.java Log Message: Removed unused eval code Index: NurbsRI.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/NurbsRI.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** NurbsRI.java 7 Nov 2005 22:52:58 -0000 1.3 --- NurbsRI.java 7 Nov 2005 23:28:45 -0000 1.4 *************** *** 103,107 **** (VaryingArrayFloat) parameters.getParameter("st"); if (stParam != null) { ! parameters.addParameter(stParam.extract(Global.getDeclaration("s"), 0)); } else { float[] s = new float[4]; --- 103,108 ---- (VaryingArrayFloat) parameters.getParameter("st"); if (stParam != null) { ! parameters.addParameter ! (stParam.extract(Global.getDeclaration("s"), 0)); } else { float[] s = new float[4]; *************** *** 118,122 **** s[3] = umax; } ! parameters.addParameter(new VaryingScalarFloat(Global.getDeclaration("s"), s)); } } --- 119,124 ---- s[3] = umax; } ! parameters.addParameter ! (new VaryingScalarFloat(Global.getDeclaration("s"), s)); } } *************** *** 126,130 **** (VaryingArrayFloat) parameters.getParameter("st"); if (stParam != null) { ! parameters.addParameter(stParam.extract(Global.getDeclaration("t"), 1)); } else { float[] t = new float[4]; --- 128,133 ---- (VaryingArrayFloat) parameters.getParameter("st"); if (stParam != null) { ! parameters.addParameter ! (stParam.extract(Global.getDeclaration("t"), 1)); } else { float[] t = new float[4]; *************** *** 141,145 **** t[3] = vmax; } ! parameters.addParameter(new VaryingScalarFloat(Global.getDeclaration("t"), t)); } } --- 144,149 ---- t[3] = vmax; } ! parameters.addParameter ! (new VaryingScalarFloat(Global.getDeclaration("t"), t)); } } *************** *** 170,174 **** VaryingScalarHPoint paramHp = (VaryingScalarHPoint) parameters.getParameter("Pw"); - //parameters.removeParameter("Pw"); Point4f[][] points = new Point4f[vpc][upc]; for (int i = 0; i < vpc; i++) { --- 174,177 ---- *************** *** 191,220 **** return ch; } - - public String toString() { - return print(points, vpc) + print(uknot) + print(vknot); - } - - private String print(Point4f[][] points, int vpc) { - StringBuffer sb = new StringBuffer(); - sb.append("["); - for (int i = 0; i < vpc; i++) { - sb.append(Arrays.asList(points[i])); - sb.append(" "); - } - sb.append("]"); - return sb.toString(); - } - - private String print(float[] a) { - StringBuffer sb = new StringBuffer(); - sb.append("["); - for (int i = 0; i < a.length; i++) { - sb.append(a[i]); - sb.append(" "); - } - sb.append("]"); - return sb.toString(); - } public Primitive[] split() { --- 194,197 ---- *************** *** 236,240 **** if (dirflag) { ! float mid = (umax + umin) /2; int p0c = kv0.length - uorder; Point4f[][] points0 = new Point4f[vpc][p0c]; --- 213,217 ---- if (dirflag) { ! float mid = (umax + umin) / 2; int p0c = kv0.length - uorder; Point4f[][] points0 = new Point4f[vpc][p0c]; *************** *** 262,266 **** attributes); } else { ! float mid = (vmax + vmin) /2; int p0c = kv0.length - vorder; Point4f[][] points0 = new Point4f[p0c][upc]; --- 239,243 ---- attributes); } else { ! float mid = (vmax + vmin) / 2; int p0c = kv0.length - vorder; Point4f[][] points0 = new Point4f[p0c][upc]; *************** *** 289,297 **** attributes); } ! ! //System.out.println(this); ! //System.out.println(result[0]); ! //System.out.println(result[1]); ! result[0].setObjectToCamera(objectToCamera); result[1].setObjectToCamera(objectToCamera); --- 266,270 ---- attributes); } ! result[0].setObjectToCamera(objectToCamera); result[1].setObjectToCamera(objectToCamera); *************** *** 414,418 **** protected void dice_P(ShaderVariables sv) { Point3fGrid P = sv.P; - Vector3fGrid Ng = sv.Ng; int uSize = Grid.getUSize(); int vSize = Grid.getVSize(); --- 387,390 ---- *************** *** 427,453 **** + uknot[uorder - 1]; Point3f p = new Point3f(); ! Vector3f utan = new Vector3f(); ! Vector3f vtan = new Vector3f(); ! eval(uPos, vPos, p, utan, vtan); P.set(u, v, p); - /* - Vector3f n = new Vector3f(); - n.cross(utan, vtan); - float d = n.length(); - if (d != 0.0) - { - n.x /= d; - n.y /= d; - n.z /= d; - } - else - { - n.x = 0; - n.y = 0; - n.z = 0; - } - - Ng.set(u, v, n); - */ } } --- 399,404 ---- + uknot[uorder - 1]; Point3f p = new Point3f(); ! eval(uPos, vPos, p); P.set(u, v, p); } } *************** *** 470,476 **** */ ! private float[] basisFunctions(float u, int brkPoint, float[] kv, int k, ! int order) { ! float[] bvals = new float[order]; bvals[0] = 1.0f; for (int r = 2; r <= k; r++) { --- 421,426 ---- */ ! private float[] basisFunctions(float u, int brkPoint, float[] kv, int k) { ! float[] bvals = new float[k]; bvals[0] = 1.0f; for (int r = 2; r <= k; r++) { *************** *** 490,516 **** return bvals; } ! ! /* ! * Compute derivatives of the basis functions Bi,k(u)' ! */ ! private float[] basisDerivatives(float u, int brkPoint, ! float[] kv, int k) { ! float[] dvals = basisFunctions(u, brkPoint, kv, k - 1, k); ! dvals[k - 1] = 0.0F; // BasisFunctions misses this ! ! float knotScale = kv[brkPoint + 1] - kv[brkPoint]; ! ! int i = brkPoint - k + 1; ! for (int s = k - 2; s >= 0; s--) { ! i++; ! int ik1 = Calc.clamp(i + k - 1, 0, kv.length); ! int ic = Calc.clamp(i, 0, kv.length); ! float omega = knotScale * (k - 1.0F) / (kv[ik1] - kv[ic]); ! dvals[s + 1] += -omega * dvals[s]; ! dvals[s] *= omega; ! } ! return dvals; ! } ! /* * Return the current knot the parameter u is less than or equal to. Find --- 440,444 ---- return bvals; } ! /* * Return the current knot the parameter u is less than or equal to. Find *************** *** 532,550 **** } ! private void eval(float u, float v, Point3f p, Vector3f utan, ! Vector3f vtan) { int ubrkPoint = findBreakPoint(u, uknot, upc - 1, uorder); int ufirst = ubrkPoint - uorder + 1; ! float[] bu = basisFunctions(u, ubrkPoint, uknot, uorder, uorder); ! float[] buprime = basisDerivatives(u, ubrkPoint, uknot, uorder); int vbrkPoint = findBreakPoint(v, vknot, vpc - 1, vorder); int vfirst = vbrkPoint - vorder + 1; ! float[] bv = basisFunctions(v, vbrkPoint, vknot, vorder, vorder); ! float[] bvprime = basisDerivatives(v, vbrkPoint, vknot, vorder); - Point4f rutan = new Point4f(); - Point4f rvtan = new Point4f(); - Point4f result = new Point4f(); for (int i = 0; i < vorder; i++) { --- 460,472 ---- } ! private void eval(float u, float v, Point3f p) { int ubrkPoint = findBreakPoint(u, uknot, upc - 1, uorder); int ufirst = ubrkPoint - uorder + 1; ! float[] bu = basisFunctions(u, ubrkPoint, uknot, uorder); int vbrkPoint = findBreakPoint(v, vknot, vpc - 1, vorder); int vfirst = vbrkPoint - vorder + 1; ! float[] bv = basisFunctions(v, vbrkPoint, vknot, vorder); Point4f result = new Point4f(); for (int i = 0; i < vorder; i++) { *************** *** 561,588 **** result.z += cp.z * tmp; result.w += cp.w * tmp; - - tmp = buprime[rj] * bv[ri]; - rutan.x += cp.x * tmp; - rutan.y += cp.y * tmp; - rutan.z += cp.z * tmp; - rutan.w += cp.w * tmp; - - tmp = bu[rj] * bvprime[ri]; - rvtan.x += cp.x * tmp; - rvtan.y += cp.y * tmp; - rvtan.z += cp.z * tmp; - rvtan.w += cp.w * tmp; } } ! ! float wsqrdiv = 1.0f / (result.w * result.w); ! utan.x = (result.w * rutan.x - rutan.w * result.x) * wsqrdiv; ! utan.y = (result.w * rutan.y - rutan.w * result.y) * wsqrdiv; ! utan.z = (result.w * rutan.z - rutan.w * result.z) * wsqrdiv; ! ! vtan.x = (result.w * rvtan.x - rvtan.w * result.x) * wsqrdiv; ! vtan.y = (result.w * rvtan.y - rvtan.w * result.y) * wsqrdiv; ! vtan.z = (result.w * rvtan.z - rvtan.w * result.z) * wsqrdiv; ! p.x = result.x / result.w; p.y = result.y / result.w; --- 483,489 ---- result.z += cp.z * tmp; result.w += cp.w * tmp; } } ! p.x = result.x / result.w; p.y = result.y / result.w; |
From: Gerardo H. <ma...@us...> - 2005-11-07 22:53:07
|
Update of /cvsroot/jrman/drafts/src/org/jrman/attributes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1263/src/org/jrman/attributes Modified Files: MutableAttributes.java Log Message: Fixed handling of texture coordinates for NURBS. Index: MutableAttributes.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/attributes/MutableAttributes.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** MutableAttributes.java 20 May 2003 01:08:38 -0000 1.6 --- MutableAttributes.java 7 Nov 2005 22:52:58 -0000 1.7 *************** *** 40,44 **** color = new Color3f(1f, 1f, 1f); opacity = new Color3f(1f, 1f, 1f); ! textureCoordinates = new TextureCoordinates(0f, 0f, 1f, 0f, 0f, 1f, 1f, 1f); lightSources = Collections.EMPTY_SET; surface = null; --- 40,44 ---- color = new Color3f(1f, 1f, 1f); opacity = new Color3f(1f, 1f, 1f); ! textureCoordinates = null; lightSources = Collections.EMPTY_SET; surface = null; |
From: Gerardo H. <ma...@us...> - 2005-11-07 22:53:07
|
Update of /cvsroot/jrman/drafts/src/org/jrman/primitive In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1263/src/org/jrman/primitive Modified Files: Primitive.java NurbsRI.java Log Message: Fixed handling of texture coordinates for NURBS. Index: Primitive.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/Primitive.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Primitive.java 6 Jul 2005 22:53:23 -0000 1.36 --- Primitive.java 7 Nov 2005 22:52:58 -0000 1.37 *************** *** 40,46 **** public abstract class Primitive implements Comparable { ! private static Declaration U_DECL = new Declaration("u", "varying float"); ! private static Declaration V_DECL = new Declaration("v", "varying float"); private static Color3f c0 = new Color3f(); --- 40,46 ---- public abstract class Primitive implements Comparable { ! protected static Declaration U_DECL = new Declaration("u", "varying float"); ! protected static Declaration V_DECL = new Declaration("v", "varying float"); private static Color3f c0 = new Color3f(); *************** *** 267,274 **** float[] s = new float[4]; TextureCoordinates tc = attributes.getTextureCoordinates(); ! s[0] = tc.getS1(); ! s[1] = tc.getS2(); ! s[2] = tc.getS3(); ! s[3] = tc.getS4(); parameters.addParameter(new VaryingScalarFloat(Global.getDeclaration("s"), s)); } --- 267,281 ---- float[] s = new float[4]; TextureCoordinates tc = attributes.getTextureCoordinates(); ! if (tc != null) { ! s[0] = tc.getS1(); ! s[1] = tc.getS2(); ! s[2] = tc.getS3(); ! s[3] = tc.getS4(); ! } else { ! s[0] = 0; ! s[1] = 1; ! s[2] = 0; ! s[3] = 1; ! } parameters.addParameter(new VaryingScalarFloat(Global.getDeclaration("s"), s)); } *************** *** 283,290 **** float[] t = new float[4]; TextureCoordinates tc = attributes.getTextureCoordinates(); ! t[0] = tc.getT1(); ! t[1] = tc.getT2(); ! t[2] = tc.getT3(); ! t[3] = tc.getT4(); parameters.addParameter(new VaryingScalarFloat(Global.getDeclaration("t"), t)); } --- 290,304 ---- float[] t = new float[4]; TextureCoordinates tc = attributes.getTextureCoordinates(); ! if (tc != null) { ! t[0] = tc.getT1(); ! t[1] = tc.getT2(); ! t[2] = tc.getT3(); ! t[3] = tc.getT4(); ! } else { ! t[0] = 0; ! t[1] = 0; ! t[2] = 1; ! t[3] = 1; ! } parameters.addParameter(new VaryingScalarFloat(Global.getDeclaration("t"), t)); } Index: NurbsRI.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/NurbsRI.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** NurbsRI.java 7 Nov 2005 16:47:57 -0000 1.2 --- NurbsRI.java 7 Nov 2005 22:52:58 -0000 1.3 *************** *** 19,42 **** package org.jrman.primitive; import javax.vecmath.Point3f; import javax.vecmath.Point4f; - import javax.vecmath.Tuple3f; - import javax.vecmath.Tuple4f; import javax.vecmath.Vector3f; ! import java.util.Arrays; ! ! import org.jrman.util.Calc; import org.jrman.geom.BoundingVolume; import org.jrman.geom.ConvexHull3f; ! import org.jrman.attributes.Attributes; import org.jrman.parameters.Declaration; import org.jrman.parameters.ParameterList; import org.jrman.parameters.VaryingScalarHPoint; import org.jrman.parameters.VaryingScalarTuple3f; ! import org.jrman.grid.Grid; ! import org.jrman.grid.Point3fGrid; ! import org.jrman.grid.Vector3fGrid; import org.jrman.render.ShaderVariables; public class NurbsRI extends Primitive { --- 19,45 ---- package org.jrman.primitive; + import java.util.Arrays; + import javax.vecmath.Point3f; import javax.vecmath.Point4f; import javax.vecmath.Vector3f; ! import org.jrman.attributes.Attributes; ! import org.jrman.attributes.TextureCoordinates; import org.jrman.geom.BoundingVolume; import org.jrman.geom.ConvexHull3f; ! import org.jrman.grid.Grid; ! import org.jrman.grid.Point3fGrid; ! import org.jrman.grid.Vector3fGrid; import org.jrman.parameters.Declaration; + import org.jrman.parameters.Parameter; import org.jrman.parameters.ParameterList; + import org.jrman.parameters.VaryingArrayFloat; + import org.jrman.parameters.VaryingScalarFloat; import org.jrman.parameters.VaryingScalarHPoint; import org.jrman.parameters.VaryingScalarTuple3f; ! import org.jrman.parser.Global; import org.jrman.render.ShaderVariables; + import org.jrman.util.Calc; public class NurbsRI extends Primitive { *************** *** 75,79 **** boolean dirflag, ParameterList parameters, Attributes attributes) { ! super(parameters, attributes); this.upc = upc; this.uorder = uorder; --- 78,148 ---- boolean dirflag, ParameterList parameters, Attributes attributes) { ! this.parameters = parameters; ! this.attributes = attributes; ! Parameter parameter = parameters.getParameter("u"); ! if (parameter == null) { ! float[] u = new float[4]; ! u[0] = umin; ! u[1] = umax; ! u[2] = umin; ! u[3] = umax; ! parameters.addParameter(new VaryingScalarFloat(U_DECL, u)); ! } ! parameter = parameters.getParameter("v"); ! if (parameter == null) { ! float[] v = new float[4]; ! v[0] = vmin; ! v[1] = vmin; ! v[2] = vmax; ! v[3] = vmax; ! parameters.addParameter(new VaryingScalarFloat(V_DECL, v)); ! } ! parameter = parameters.getParameter("s"); ! if (parameter == null) { ! VaryingArrayFloat stParam = ! (VaryingArrayFloat) parameters.getParameter("st"); ! if (stParam != null) { ! parameters.addParameter(stParam.extract(Global.getDeclaration("s"), 0)); ! } else { ! float[] s = new float[4]; ! TextureCoordinates tc = attributes.getTextureCoordinates(); ! if (tc != null) { ! s[0] = tc.getS1(); ! s[1] = tc.getS2(); ! s[2] = tc.getS3(); ! s[3] = tc.getS4(); ! } else { ! s[0] = umin; ! s[1] = umax; ! s[2] = umin; ! s[3] = umax; ! } ! parameters.addParameter(new VaryingScalarFloat(Global.getDeclaration("s"), s)); ! } ! } ! parameter = parameters.getParameter("t"); ! if (parameter == null) { ! VaryingArrayFloat stParam = ! (VaryingArrayFloat) parameters.getParameter("st"); ! if (stParam != null) { ! parameters.addParameter(stParam.extract(Global.getDeclaration("t"), 1)); ! } else { ! float[] t = new float[4]; ! TextureCoordinates tc = attributes.getTextureCoordinates(); ! if (tc != null) { ! t[0] = tc.getT1(); ! t[1] = tc.getT2(); ! t[2] = tc.getT3(); ! t[3] = tc.getT4(); ! } else { ! t[0] = vmin; ! t[1] = vmin; ! t[2] = vmax; ! t[3] = vmax; ! } ! parameters.addParameter(new VaryingScalarFloat(Global.getDeclaration("t"), t)); ! } ! } ! parameters.removeParameter("st"); this.upc = upc; this.uorder = uorder; |
From: Gerardo H. <ma...@us...> - 2005-11-07 16:48:10
|
Update of /cvsroot/jrman/drafts/src/org/jrman/primitive In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27320/src/org/jrman/primitive Modified Files: NurbsRI.java Log Message: Fixed normals bug in NURBS Index: NurbsRI.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/NurbsRI.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NurbsRI.java 7 Nov 2005 01:04:47 -0000 1.1 --- NurbsRI.java 7 Nov 2005 16:47:57 -0000 1.2 *************** *** 362,365 **** --- 362,366 ---- eval(uPos, vPos, p, utan, vtan); P.set(u, v, p); + /* Vector3f n = new Vector3f(); n.cross(utan, vtan); *************** *** 379,386 **** --- 380,392 ---- Ng.set(u, v, n); + */ } } } + protected void dice_Ng(ShaderVariables sv) { + sv.Ng.cross(sv.dPdu, sv.dPdv); + } + /* * Compute Bi,k(u), for i = 0..k. |
From: Elmer G. <ega...@us...> - 2005-11-07 01:04:59
|
Update of /cvsroot/jrman/drafts/sampleData In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29812/sampleData Modified Files: cactus.rib ice.rib testNu.rib testNu2.rib Log Message: Working NURBS!!! Index: ice.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/ice.rib,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ice.rib 22 Nov 2004 05:31:35 -0000 1.1 --- ice.rib 7 Nov 2005 01:04:47 -0000 1.2 *************** *** 14,20 **** Rotate 135 0 1 0 Translate -10 -7.5 -10 ! PixelSamples 1 1 PixelFilter "gaussian" 2 2 ! Exposure 1 1 Quantize "rgba" 255 0 255 0.5 Declare "minsamples" "integer" --- 14,20 ---- Rotate 135 0 1 0 Translate -10 -7.5 -10 ! PixelSamples 4 4 PixelFilter "gaussian" 2 2 ! Exposure 1 1.8 Quantize "rgba" 255 0 255 0.5 Declare "minsamples" "integer" *************** *** 35,42 **** Option "searchpath" "shader" ["shaders:&"] Declare "texturememory" "integer" ! Option "limits" "texturememory" [10000] Declare "geommemory" "integer" Option "limits" "geommemory" [40000] WorldBegin #Lights! TransformBegin --- 35,43 ---- Option "searchpath" "shader" ["shaders:&"] Declare "texturememory" "integer" ! Option "limits" "teturememory" [10000] Declare "geommemory" "integer" Option "limits" "geommemory" [40000] WorldBegin + ShadingRate 1 #Lights! TransformBegin Index: testNu.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/testNu.rib,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** testNu.rib 7 Nov 2004 22:42:18 -0000 1.3 --- testNu.rib 7 Nov 2005 01:04:47 -0000 1.4 *************** *** 11,15 **** ShadingRate .25 Color .3 .5 1 ! Surface "paintedplastic" "texturename" "checkerboard.txr" ReadArchive "vase.rib" --- 11,15 ---- ShadingRate .25 Color .3 .5 1 ! #Surface "paintedplastic" "texturename" "checkerboard.txr" ReadArchive "vase.rib" Index: testNu2.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/testNu2.rib,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** testNu2.rib 8 Nov 2004 03:23:49 -0000 1.3 --- testNu2.rib 7 Nov 2005 01:04:47 -0000 1.4 *************** *** 7,15 **** WorldBegin Translate 0 0 10 ! Rotate 45 1 1 1 LightSource "distantlight" 1 "intensity" [0.8] "from" [10 10 10] "to" [0 0 0] ShadingRate .25 Color .3 .5 1 ! Surface "paintedplastic" "texturename" "checkerboard.txr" NuPatch 9 3 [ 0 0 0 1 1 2 2 3 3 4 4 4 ] 0 4 --- 7,15 ---- WorldBegin Translate 0 0 10 ! Rotate 35 .5 1 1 LightSource "distantlight" 1 "intensity" [0.8] "from" [10 10 10] "to" [0 0 0] ShadingRate .25 Color .3 .5 1 ! # Surface "paintedplastic" "texturename" "checkerboard.txr" NuPatch 9 3 [ 0 0 0 1 1 2 2 3 3 4 4 4 ] 0 4 Index: cactus.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/cactus.rib,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** cactus.rib 22 Nov 2004 05:31:35 -0000 1.1 --- cactus.rib 7 Nov 2005 01:04:46 -0000 1.2 *************** *** 122,126 **** Declare "scaleBlue" "float" Declare "Km" "float" - Displacement "DSnoisedsp" "noiseType" [3]"offsetX" [0]"offsetY" [0]"offsetZ" [0]"scaleX" [0.5]"scaleY" [0.5]"scaleZ" [0.5]"scaleRed" [1]"scaleGreen" [1]"scaleBlue" [1]"Km" [0.25] AttributeBegin TransformBegin --- 122,125 ---- *************** *** 2638,2698 **** Declare "name" "string" Attribute "identifier" "name" ["Ground"] - AttributeBegin - TransformBegin - Translate -9.30945 -3.9 -24.4601 - Scale 64 1 64 - Color 0.8 0.8 0.8 - Opacity 1 1 1 - Declare "Ka" "float" - Declare "Kd" "float" - Surface "matte" "Ka" [1]"Kd" [1] - SolidBegin "primitive" - TransformBegin - Scale 1 1 1 - Patch "bilinear" - "P" [ - 0.5 0.5 0.5 - 0.5 0.5 -0.5 - 0.5 -0.5 0.5 - 0.5 -0.5 -0.5] - Rotate 90 0 0 1 - Patch "bilinear" - "P" [ - 0.5 0.5 0.5 - 0.5 0.5 -0.5 - 0.5 -0.5 0.5 - 0.5 -0.5 -0.5] - Rotate 90 0 0 1 - Patch "bilinear" - "P" [ - 0.5 0.5 0.5 - 0.5 0.5 -0.5 - 0.5 -0.5 0.5 - 0.5 -0.5 -0.5] - Rotate 90 0 0 1 - Patch "bilinear" - "P" [ - 0.5 0.5 0.5 - 0.5 0.5 -0.5 - 0.5 -0.5 0.5 - 0.5 -0.5 -0.5] - Rotate 90 0 1 0 - Patch "bilinear" - "P" [ - 0.5 0.5 0.5 - 0.5 0.5 -0.5 - 0.5 -0.5 0.5 - 0.5 -0.5 -0.5] - Rotate 180 0 1 0 - Patch "bilinear" - "P" [ - 0.5 0.5 0.5 - 0.5 0.5 -0.5 - 0.5 -0.5 0.5 - 0.5 -0.5 -0.5] - TransformEnd - SolidEnd - TransformEnd - AttributeEnd Declare "name" "string" Attribute "identifier" "name" ["Pot"] --- 2637,2640 ---- *************** *** 2734,2738 **** Declare "trough" "float" Declare "peak" "float" - Displacement "castucco" "freq" [5]"Km" [0.0025]"octaves" [3]"trough" [-0.15]"peak" [0.35] AttributeBegin TransformBegin --- 2676,2679 ---- |