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: <ma...@us...> - 2003-07-02 07:03:34
|
Update of /cvsroot/jrman/drafts/sampleData In directory sc8-pr-cvs1:/tmp/cvs-serv6730/sampleData Modified Files: rotonda.rib uteapot.rib TextureTest.rib Log Message: Fixed some bugs... Index: rotonda.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/rotonda.rib,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rotonda.rib 26 May 2003 08:13:09 -0000 1.1 --- rotonda.rib 2 Jul 2003 07:03:30 -0000 1.2 *************** *** 2,6 **** version 3.03 ! Display "hama_out.tif" "file" "rgba" Format 640 480 1 PixelSamples 4 4 --- 2,6 ---- version 3.03 ! Display "hama_out" "framebuffer" "rgba" Format 640 480 1 PixelSamples 4 4 Index: uteapot.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/uteapot.rib,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** uteapot.rib 1 Jun 2003 08:34:08 -0000 1.5 --- uteapot.rib 2 Jul 2003 07:03:31 -0000 1.6 *************** *** 14,18 **** #Option "limits" "bucketsize" [32 32] "gridsize" 1024 PixelSamples 4 4 - PixelFilter "box" 1 1 # Correct for monitor gamma of 2.2 Exposure 1.0 2.2 --- 14,17 ---- Index: TextureTest.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/TextureTest.rib,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** TextureTest.rib 12 Jun 2003 18:36:01 -0000 1.3 --- TextureTest.rib 2 Jul 2003 07:03:31 -0000 1.4 *************** *** 9,12 **** --- 9,14 ---- Patch "bilinear" "P" [-1 -1 1 -1 0 1 0 -1 1 0 0 1] Patch "bilinear" "P" [0 0 1 1 0 1 0 1 1 1 1 1] + Color 0 0 1 + Patch "bilinear" "P" [-1 -1 2 -1 1 2 1 -1 2 1 1 2] WorldEnd MakeTexture "checkerboard.png" "checkerboard.txr" "periodic" "periodic" "x" 1 1 |
From: <ma...@us...> - 2003-06-26 04:10:48
|
Update of /cvsroot/jrman/drafts/sampleData In directory sc8-pr-cvs1:/tmp/cvs-serv7530/sampleData Modified Files: bike.rib aphrodite.rib Log Message: Implemented PixelFilters. Index: bike.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/bike.rib,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** bike.rib 25 Jun 2003 17:14:05 -0000 1.6 --- bike.rib 26 Jun 2003 04:10:45 -0000 1.7 *************** *** 1,4 **** Display "bike" "framebuffer" "rgb" ! PixelFilter "gaussian" 2 2 #Option "limits" "bucketsize" [32 32] Format 800 600 1 --- 1,4 ---- Display "bike" "framebuffer" "rgb" ! PixelFilter "triangle" 2 2 #Option "limits" "bucketsize" [32 32] Format 800 600 1 Index: aphrodite.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/aphrodite.rib,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** aphrodite.rib 29 May 2003 18:12:17 -0000 1.2 --- aphrodite.rib 26 Jun 2003 04:10:45 -0000 1.3 *************** *** 6,10 **** # scene definitions Display "aphrodite" "framebuffer" "rgb" ! PixelFilter "box" 1 1 Format 640 480 1 PixelSamples 4 4 --- 6,10 ---- # scene definitions Display "aphrodite" "framebuffer" "rgb" ! PixelFilter "gaussian" 2 2 Format 640 480 1 PixelSamples 4 4 |
Update of /cvsroot/jrman/drafts/src/org/jrman/util In directory sc8-pr-cvs1:/tmp/cvs-serv7530/src/org/jrman/util Added Files: TriangleSamplesFilter.java SincSamplesFilter.java CatmullRomSamplesFilter.java BoxSamplesFilter.java Log Message: Implemented PixelFilters. --- NEW FILE: TriangleSamplesFilter.java --- /* TriangleSamplesFilter.java Copyright (C) 2003 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.util; public class TriangleSamplesFilter extends SamplesFilter { protected float filterFunc(float x, float y, float xWidth, float yWidth) { return ((1f - Math.abs(x)) / (xWidth * .5f)) * ((1f - Math.abs(y)) / (yWidth * .5f)); } } --- NEW FILE: SincSamplesFilter.java --- /* SincSamplesFilter.java Copyright (C) 2003 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.util; public class SincSamplesFilter extends SamplesFilter { protected float filterFunc(float x, float y, float xWidth, float yWidth) { float s; float t; if (x > -0.001f && x < 0.001f) s = 1f; else s = (float) Math.sin(x) / x; if (y > -0.001f && y < 0.001f) t = 1f; else t = (float) Math.sin(y) / y; return s * t; } } --- NEW FILE: CatmullRomSamplesFilter.java --- /* CatmullRomSamplesFilter.java Copyright (C) 2003 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.util; public class CatmullRomSamplesFilter extends SamplesFilter { protected float filterFunc(float x, float y, float xWidth, float yWidth) { float r2 = (x * x + y * y); float r = (float) Math.sqrt(r2); return (r >= 2f) ? 0f : (r < 1f) ? (3f * r * r2 - 5f * r2 + 2f) : (-r * r2 + 5f * r2 - 8f * r + 4); } } --- NEW FILE: BoxSamplesFilter.java --- /* BoxSamplesFilter.java Copyright (C) 2003 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.util; public class BoxSamplesFilter extends SamplesFilter { protected float filterFunc(float x, float y, float xWidth, float yWidth) { return 1f; } } |
From: <ma...@us...> - 2003-06-26 04:10:48
|
Update of /cvsroot/jrman/drafts/src/org/jrman/render In directory sc8-pr-cvs1:/tmp/cvs-serv7530/src/org/jrman/render Modified Files: RendererHidden.java Log Message: Implemented PixelFilters. Index: RendererHidden.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/RendererHidden.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** RendererHidden.java 25 Jun 2003 17:14:04 -0000 1.34 --- RendererHidden.java 26 Jun 2003 04:10:45 -0000 1.35 *************** *** 120,124 **** createClippingVolume(); createBuckets(); ! samplesFilter = new GaussianSamplesFilter(); worldParseStart = System.currentTimeMillis(); } --- 120,124 ---- createClippingVolume(); createBuckets(); ! samplesFilter = frame.getFilter().getSamplesFilter(); worldParseStart = System.currentTimeMillis(); } |
From: <ma...@us...> - 2003-06-26 04:10:48
|
Update of /cvsroot/jrman/drafts/src/org/jrman/options In directory sc8-pr-cvs1:/tmp/cvs-serv7530/src/org/jrman/options Modified Files: Filter.java Log Message: Implemented PixelFilters. Index: Filter.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/options/Filter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Filter.java 9 Apr 2003 05:04:58 -0000 1.1 --- Filter.java 26 Jun 2003 04:10:44 -0000 1.2 *************** *** 23,26 **** --- 23,33 ---- import java.util.Map; + import org.jrman.util.BoxSamplesFilter; + import org.jrman.util.CatmullRomSamplesFilter; + import org.jrman.util.GaussianSamplesFilter; + import org.jrman.util.SamplesFilter; + import org.jrman.util.SincSamplesFilter; + import org.jrman.util.TriangleSamplesFilter; + public class Filter { *************** *** 87,90 **** --- 94,109 ---- public float getVerticalWidth() { return verticalWidth; + } + + public SamplesFilter getSamplesFilter() { + if (type == Type.BOX) + return new BoxSamplesFilter(); + if (type == Type.TRIANGLE) + return new TriangleSamplesFilter(); + if (type == Type.CATMULL_ROM) + return new CatmullRomSamplesFilter(); + if (type == Type.GAUSSIAN) + return new GaussianSamplesFilter(); + return new SincSamplesFilter(); } |
From: <ma...@us...> - 2003-06-25 17:14:08
|
Update of /cvsroot/jrman/drafts/sampleData In directory sc8-pr-cvs1:/tmp/cvs-serv6208/sampleData Modified Files: space.rib bike.rib vehicles.rib DinningRoom.rib Log Message: Implemented pixel filter support. Index: space.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/space.rib,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** space.rib 12 Jun 2003 18:36:01 -0000 1.3 --- space.rib 25 Jun 2003 17:14:05 -0000 1.4 *************** *** 5,9 **** #MakeTexture "tycho.jpg" "tycho.txr" "periodic" "periodic" "x" 1 1 Display "Space.png" "framebuffer" "rgb" ! Format 2000 1500 1 PixelSamples 4 4 Exposure 1 2.2 --- 5,9 ---- #MakeTexture "tycho.jpg" "tycho.txr" "periodic" "periodic" "x" 1 1 Display "Space.png" "framebuffer" "rgb" ! Format 800 600 1 PixelSamples 4 4 Exposure 1 2.2 Index: bike.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/bike.rib,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** bike.rib 7 Jun 2003 18:38:44 -0000 1.5 --- bike.rib 25 Jun 2003 17:14:05 -0000 1.6 *************** *** 1,4 **** Display "bike" "framebuffer" "rgb" ! PixelFilter "box" 1 1 Format 800 600 1 PixelSamples 4 4 --- 1,5 ---- Display "bike" "framebuffer" "rgb" ! PixelFilter "gaussian" 2 2 ! #Option "limits" "bucketsize" [32 32] Format 800 600 1 PixelSamples 4 4 Index: vehicles.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/vehicles.rib,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** vehicles.rib 29 May 2003 18:12:18 -0000 1.3 --- vehicles.rib 25 Jun 2003 17:14:05 -0000 1.4 *************** *** 7,11 **** PixelSamples 4 4 Exposure 1 2.2 ! PixelFilter "box" 1 1 Projection "perspective" "fov" [20] Translate 0 0 100 --- 7,11 ---- PixelSamples 4 4 Exposure 1 2.2 ! PixelFilter "gaussian" 2 2 Projection "perspective" "fov" [20] Translate 0 0 100 Index: DinningRoom.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/DinningRoom.rib,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** DinningRoom.rib 12 Jun 2003 18:36:01 -0000 1.11 --- DinningRoom.rib 25 Jun 2003 17:14:05 -0000 1.12 *************** *** 13,17 **** Format 320 240 1 Projection "perspective" "fov" [40] ! PixelFilter "box" 1 1 Scale 1 -1 1 Translate 0 0 170 --- 13,17 ---- Format 320 240 1 Projection "perspective" "fov" [40] ! PixelFilter "gaussian" 2 2 Scale 1 -1 1 Translate 0 0 170 *************** *** 139,143 **** Format 320 240 1 Projection "perspective" "fov" [40] ! PixelFilter "box" 1 1 Translate 0 0 170 Scale 1 -1 1 --- 139,143 ---- Format 320 240 1 Projection "perspective" "fov" [40] ! PixelFilter "gaussian" 2 2 Translate 0 0 170 Scale 1 -1 1 *************** *** 270,274 **** Format 800 600 1 Projection "perspective" "fov" [40] ! PixelFilter "box" 1 1 Translate 0 0 170 Rotate -15 1 0 0 --- 270,274 ---- Format 800 600 1 Projection "perspective" "fov" [40] ! PixelFilter "gaussian" 2 2 Translate 0 0 170 Rotate -15 1 0 0 |
From: <ma...@us...> - 2003-06-25 17:14:08
|
Update of /cvsroot/jrman/drafts/src/org/jrman/render In directory sc8-pr-cvs1:/tmp/cvs-serv6208/src/org/jrman/render Modified Files: SimpleMicropolygon.java RendererHidden.java Sampler.java ImageStore.java Log Message: Implemented pixel filter support. Index: SimpleMicropolygon.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/SimpleMicropolygon.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SimpleMicropolygon.java 7 Jun 2003 13:25:32 -0000 1.3 --- SimpleMicropolygon.java 25 Jun 2003 17:14:04 -0000 1.4 *************** *** 152,156 **** sampler.getHeight() - 1); for (int row = minRow; row <= maxRow; row++) { - boolean found = false; for (int col = minColumn; col <= maxColumn; col++) { sampleCount++; --- 152,155 ---- *************** *** 163,169 **** if (touched) sampledSampleCount++; - if (found && !touched) - break; - found = touched; } } --- 162,165 ---- Index: RendererHidden.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/RendererHidden.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** RendererHidden.java 12 Jun 2003 18:36:08 -0000 1.33 --- RendererHidden.java 25 Jun 2003 17:14:04 -0000 1.34 *************** *** 41,45 **** import org.jrman.geom.Plane; import org.jrman.geom.Transform; - import org.jrman.maps.MipMap; import org.jrman.options.Display; import org.jrman.options.Filter; --- 41,44 ---- *************** *** 54,57 **** --- 53,58 ---- import org.jrman.util.Calc; import org.jrman.util.Format; + import org.jrman.util.GaussianSamplesFilter; + import org.jrman.util.SamplesFilter; public class RendererHidden extends Renderer { *************** *** 97,100 **** --- 98,111 ---- private long worldParseEnd; + private int hFilterExtra; + + private int vFilterExtra; + + private int hPixelLess; + + private int vPixelLess; + + private SamplesFilter samplesFilter; + public void init(Frame frame, World world) { super.init(frame, world); *************** *** 109,112 **** --- 120,124 ---- createClippingVolume(); createBuckets(); + samplesFilter = new GaussianSamplesFilter(); worldParseStart = System.currentTimeMillis(); } *************** *** 276,283 **** frame.getHorizontalSamplingRate(), frame.getVerticalSamplingRate()); int[] pixels = new int[bucketWidth * bucketHeight]; long start = System.currentTimeMillis(); Point2f rmin = rasterWindow.getMin(); ! for (int row = 0; row < bucketRows; row++) for (int column = 0; column < bucketColumns; column++) { Bucket bucket = getBucket(column, row); --- 288,307 ---- frame.getHorizontalSamplingRate(), frame.getVerticalSamplingRate()); + Filter filter = frame.getFilter(); + samplesFilter.init( + (int) Math.ceil(filter.getHorizontalWidth() * sampler.getPixelWidth()), + (int) Math.ceil(filter.getVerticalWidth() * sampler.getPixelHeight()), + filter.getHorizontalWidth(), + filter.getVerticalWidth()); + float[] samples = + new float[sampler.getWidth() + * bucketColumns + * (sampler.getHeight() + vFilterExtra + vPixelLess * sampler.getPixelHeight()) + * 3]; + float[] filteredSamples = new float[bucketWidth * bucketHeight * 3]; int[] pixels = new int[bucketWidth * bucketHeight]; long start = System.currentTimeMillis(); Point2f rmin = rasterWindow.getMin(); ! for (int row = 0; row < bucketRows; row++) { for (int column = 0; column < bucketColumns; column++) { Bucket bucket = getBucket(column, row); *************** *** 329,348 **** sampler.sampleBucket(bucket); bucket.flush(); ! Color3f[] colors = sampler.getColors(); ! colorsToPixels(colors, pixels); ! Point2f min = rasterWindow.getMin(); imageStore.setPixels( pixels, ! column * bucketWidth + (int) min.x, ! row * bucketHeight + (int) min.y, ! bucketWidth, ! bucketHeight); if (rc != null) rc.repaint( ! column * bucketWidth + (int) min.x, ! row * bucketHeight + (int) min.y, ! bucketWidth, ! bucketHeight); } if (frame.getDisplay().getType() == Display.Type.FILE) try { --- 353,413 ---- sampler.sampleBucket(bucket); bucket.flush(); ! sampler.getColors( ! samples, ! (column * sampler.getWidth() ! + (row == 0 ? 0 : 1) ! * (vFilterExtra + vPixelLess * sampler.getPixelHeight()) ! * bucketColumns ! * sampler.getWidth()) ! * 3, ! bucketColumns * sampler.getWidth(), ! 3, ! 0); ! samplesFilter.doFilter( ! samples, ! (column * sampler.getWidth() ! - (column == 0 ! ? 0 ! : (hFilterExtra + hPixelLess * sampler.getPixelWidth()))) ! * 3, ! bucketColumns * sampler.getWidth(), ! filteredSamples, ! 0, ! bucketWidth, ! bucketWidth - (column == 0 ? hPixelLess : 0), ! bucketHeight - (row == 0 ? vPixelLess : 0), ! sampler.getPixelWidth(), ! sampler.getPixelHeight(), ! 3); ! colorsToPixels(filteredSamples, pixels); imageStore.setPixels( pixels, ! column * bucketWidth - (column == 0 ? 0 : hPixelLess) + (int) rmin.x, ! row * bucketHeight - (row == 0 ? 0 : vPixelLess) + (int) rmin.y, ! bucketWidth - (column == 0 ? hPixelLess : 0), ! bucketHeight - (row == 0 ? vPixelLess : 0), ! bucketWidth); if (rc != null) rc.repaint( ! column * bucketWidth - (column == 0 ? 0 : hPixelLess) + (int) rmin.x, ! row * bucketHeight - (row == 0 ? 0 : vPixelLess) + (int) rmin.y, ! bucketWidth - (column == 0 ? hPixelLess : 0), ! bucketHeight - (row == 0 ? vPixelLess : 0)); } + System + .arraycopy( + samples, + (bucketHeight * sampler.getPixelHeight() + - (row == 0 ? (vFilterExtra + vPixelLess * sampler.getPixelHeight()) : 0)) + * bucketColumns + * sampler.getWidth() + * 3, + samples, + 0, + (vFilterExtra + vPixelLess * sampler.getPixelHeight()) + * bucketColumns + * sampler.getWidth() + * 3); + } if (frame.getDisplay().getType() == Display.Type.FILE) try { *************** *** 404,420 **** } ! private void colorsToPixels(Color3f[] colors, int[] result) { ! int pw = (int) frame.getHorizontalSamplingRate(); ! int ph = (int) frame.getVerticalSamplingRate(); Color3f tmp = new Color3f(); for (int row = 0; row < bucketHeight; row++) for (int col = 0; col < bucketWidth; col++) { ! tmp.set(0f, 0f, 0f); ! for (int r = 0; r < ph; r++) ! for (int c = 0; c < pw; c++) { ! int offset = (row * ph + r) * (bucketWidth * pw) + col * pw + c; ! tmp.add(colors[offset]); ! } ! tmp.scale(1f / (ph * pw)); frame.getExposure().expose(tmp, tmp); Quantizer qt = frame.getColorQuantizer(); --- 469,480 ---- } ! private void colorsToPixels(float[] colors, int[] result) { Color3f tmp = new Color3f(); for (int row = 0; row < bucketHeight; row++) for (int col = 0; col < bucketWidth; col++) { ! int offset = (row * bucketWidth + col) * 3; ! tmp.x = colors[offset++]; ! tmp.y = colors[offset++]; ! tmp.z = colors[offset]; frame.getExposure().expose(tmp, tmp); Quantizer qt = frame.getColorQuantizer(); *************** *** 422,426 **** int green = qt.quantize(tmp.y); int blue = qt.quantize(tmp.z); ! int offset = row * bucketWidth + col; result[offset] = ((255 << 24) | (red << 16) | (green << 8) | blue); } --- 482,486 ---- int green = qt.quantize(tmp.y); int blue = qt.quantize(tmp.z); ! offset = row * bucketWidth + col; result[offset] = ((255 << 24) | (red << 16) | (green << 8) | blue); } *************** *** 470,474 **** --- 530,538 ---- Filter filter = frame.getFilter(); float xw = (filter.getHorizontalWidth() - 1) / 2f; + hFilterExtra = (int) Math.ceil(xw * frame.getHorizontalSamplingRate()); + hPixelLess = (int) Math.ceil((float) hFilterExtra / frame.getHorizontalSamplingRate()); float yw = (filter.getVerticalWidth() - 1) / 2f; + vFilterExtra = (int) Math.ceil(yw * frame.getVerticalSamplingRate()); + vPixelLess = (int) Math.ceil((float) vFilterExtra / frame.getVerticalSamplingRate()); rxmin = (float) Math.floor(rxmin - xw); rxmax = (float) Math.ceil(rxmax + xw); Index: Sampler.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/Sampler.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Sampler.java 12 May 2003 16:46:16 -0000 1.6 --- Sampler.java 25 Jun 2003 17:14:04 -0000 1.7 *************** *** 30,33 **** --- 30,35 ---- private Point2f min = new Point2f(); + + private Color3f tmpColor = new Color3f(); private int width; *************** *** 49,54 **** private SamplePoint[] samplePoints; - private Color3f[] colors; - private MaskElement rootVisibility = new MaskElement(); --- 51,54 ---- *************** *** 89,93 **** pixelHeight = height / bucketHeight; sampleWidth = 1f / hSamples; ! sampleHeight = 1f / hSamples; samplePoints = new SamplePoint[width * height]; for (int row = 0; row < height; row++) --- 89,93 ---- pixelHeight = height / bucketHeight; sampleWidth = 1f / hSamples; ! sampleHeight = 1f / vSamples; samplePoints = new SamplePoint[width * height]; for (int row = 0; row < height; row++) *************** *** 95,101 **** samplePoints[row * width + column] = new SamplePoint(this, column / pixelWidth, row / pixelHeight); - colors = new Color3f[width * height]; - for (int i = 0; i < colors.length; i++) - colors[i] = new Color3f(); pixelsVisibility = new MaskElement[bucketWidth * bucketHeight]; for (int i = 0; i < pixelsVisibility.length; i++) --- 95,98 ---- *************** *** 109,113 **** float x = min.x + sampleWidth * .5f; for (int column = 0; column < width; column++) { ! samplePoints[row * width + column].init(x, y); x += sampleWidth; } --- 106,112 ---- float x = min.x + sampleWidth * .5f; for (int column = 0; column < width; column++) { ! float jx = x + ((float) Math.random() - .5f) * sampleWidth; ! float jy = y + ((float) Math.random() - .5f) * sampleHeight; ! samplePoints[row * width + column].init(jx, jy); x += sampleWidth; } *************** *** 132,139 **** } ! public Color3f[] getColors() { ! for (int i = 0; i < samplePoints.length; i++) ! samplePoints[i].getColor(colors[i]); ! return colors; } --- 131,143 ---- } ! public void getColors(float[] dst, int dstOffset, int rowLength, int bands, int bandOffset) { ! for (int row = 0; row < height; row++) ! for (int col = 0; col < width; col++){ ! samplePoints[row * width + col].getColor(tmpColor); ! int offset = dstOffset + (row * rowLength + col) * bands + bandOffset; ! dst[offset++] = tmpColor.x; ! dst[offset++] = tmpColor.y; ! dst[offset] = tmpColor.z; ! } } Index: ImageStore.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/ImageStore.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ImageStore.java 1 Jun 2003 03:12:57 -0000 1.1 --- ImageStore.java 25 Jun 2003 17:14:04 -0000 1.2 *************** *** 36,40 **** } ! public void setPixels(int[] pixels, int x, int y, int w, int h) { for (int row = 0; row < h; row++) { if (y + row < 0 || y + row >= vSize) --- 36,40 ---- } ! public void setPixels(int[] pixels, int x, int y, int w, int h, int rowLength) { for (int row = 0; row < h; row++) { if (y + row < 0 || y + row >= vSize) *************** *** 43,47 **** if (x + col < 0 || x + col >= hSize) continue; ! int pixel = pixels[row * w + col]; image.setRGB(x + col, y + row, pixel); } --- 43,47 ---- if (x + col < 0 || x + col >= hSize) continue; ! int pixel = pixels[row * rowLength + col]; image.setRGB(x + col, y + row, pixel); } |
From: <ma...@us...> - 2003-06-25 17:14:07
|
Update of /cvsroot/jrman/drafts/src/org/jrman/util In directory sc8-pr-cvs1:/tmp/cvs-serv6208/src/org/jrman/util Added Files: GaussianSamplesFilter.java SamplesFilter.java Log Message: Implemented pixel filter support. --- NEW FILE: GaussianSamplesFilter.java --- /* GaussianSamplesFilter.java Copyright (C) 2003 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.util; public class GaussianSamplesFilter extends SamplesFilter { protected float filterFunc(float x, float y, float xWidth, float yWidth) { x *= 2f / xWidth; y *= 2f / yWidth; return (float) Math.exp(-2f * (x * x + y * y)); } } --- NEW FILE: SamplesFilter.java --- /* SamplesFilter.java Copyright (C) 2003 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.util; public abstract class SamplesFilter { protected int width; protected int height; protected float[] amplitude; protected float amplitudeSum; protected abstract float filterFunc(float x, float y, float xWidth, float yWidth); public void init(int width, int height, float xWidth, float yWidth) { this.width = width; this.height = height; amplitude = new float[width * height]; float xInc = xWidth / width; float yInc = yWidth / height; float y = -yWidth / 2f + yInc / 2f; for (int row = 0; row < height; row++) { float x = -xWidth / 2f + xInc / 2f; for (int column = 0; column < width; column++) { float a = filterFunc(x, y, xWidth, yWidth); amplitude[row * width + column] = a; amplitudeSum += a; x += xInc; } y += yInc; } } public void doFilter( float[] src, int srcOffset, int srcRowLength, float[] dst, int dstOffset, int dstRowLength, int colCount, int rowCount, int horizontalStep, int verticalStep, int bandCount) { for (int row = 0; row < rowCount; row++) for (int col = 0; col < colCount; col++) for (int band = 0; band < bandCount; band++) { float sum = 0f; for (int sampleRow = 0; sampleRow < height; sampleRow++) for (int sampleCol = 0; sampleCol < width; sampleCol++) { int offset = srcOffset + (srcRowLength * (row * verticalStep + sampleRow) + col * horizontalStep + sampleCol) * bandCount + band; int amplitudeOffset = sampleRow * width + sampleCol; sum += src[offset] * amplitude[amplitudeOffset]; } sum /= amplitudeSum; dst[dstOffset + (dstRowLength * row + col) * bandCount + band] = sum; } } } |
From: <ega...@us...> - 2003-06-24 22:34:42
|
Update of /cvsroot/jrman/drafts/javacc In directory sc8-pr-cvs1:/tmp/cvs-serv24456/javacc Added Files: SLParser.jj Log Message: Added javacc SLParser --- NEW FILE: SLParser.jj --- /* SLParser.jj Copyright (C) 2003 Elmer Garduno Hernandez 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. */ options { LOOKAHEAD = 1; JAVA_UNICODE_ESCAPE = true; } PARSER_BEGIN(SLParser) import java.io.FileInputStream; import java.io.IOException; public class SLParser { public static void main(String args[]) throws ParseException, IOException { if (args.length == 0) { SLParser parser = new SLParser(System.in); parser.compilationUnit(); } else if (args.length == 1) { String filename = args[0]; SLParser parser = new SLParser(new FileInputStream(filename)); parser.compilationUnit(); } } } PARSER_END(SLParser) /* WHITE SPACE */ SKIP : { " " | "\t" | "\n" | "\r" | "\f" } /* COMMENTS */ MORE : { "//" : IN_SINGLE_LINE_COMMENT | "/*" : IN_MULTI_LINE_COMMENT } <IN_SINGLE_LINE_COMMENT> SPECIAL_TOKEN : { <SINGLE_LINE_COMMENT: "\n" | "\r" | "\r\n" > : DEFAULT } <IN_MULTI_LINE_COMMENT> SPECIAL_TOKEN : { <MULTI_LINE_COMMENT: "*/" > : DEFAULT } <IN_SINGLE_LINE_COMMENT,IN_MULTI_LINE_COMMENT> MORE : { < ~[] > } /* RESERVED WORDS AND LITERALS */ TOKEN : { < LIGHT: "light" > | < SURFACE: "surface" > | < VOLUME: "volume" > | < DISPLACEMENT: "displacement" > | < IMAGER: "imager" > | < FLOAT: "float" > | < STRING: "string" > | < COLOR: "color" > | < POINT: "point" > | < VECTOR: "vector" > | < NORMAL: "normal" > | < MATRIX: "matrix" > | < VOID: "void" > | < OUTPUT: "output" > | < VARYING: "varying" > | < UNIFORM: "uniform" > | < TEXTURE: "texture" > | < ENVIRONMENT: "environment" > | < SHADOW: "shadow" > | < RETURN: "return" > | < EXTERN: "extern" > } /* LITERALS */ TOKEN : { < INTEGER_LITERAL: <DECIMAL_LITERAL> (["l","L"])? | <HEX_LITERAL> (["l","L"])? | <OCTAL_LITERAL> (["l","L"])? > | < #DECIMAL_LITERAL: ["1"-"9"] (["0"-"9"])* > | < #HEX_LITERAL: "0" ["x","X"] (["0"-"9","a"-"f","A"-"F"])+ > | < #OCTAL_LITERAL: "0" (["0"-"7"])* > | < FLOATING_POINT_LITERAL: (["0"-"9"])+ "." (["0"-"9"])* (<EXPONENT>)? (["f","F","d","D"])? | "." (["0"-"9"])+ (<EXPONENT>)? (["f","F","d","D"])? | (["0"-"9"])+ <EXPONENT> (["f","F","d","D"])? | (["0"-"9"])+ (<EXPONENT>)? ["f","F","d","D"] > | < #EXPONENT: ["e","E"] (["+","-"])? (["0"-"9"])+ > | < CHARACTER_LITERAL: "'" ( (~["'","\\","\n","\r"]) | ("\\" ( ["n","t","b","r","f","\\","'","\""] | ["0"-"7"] ( ["0"-"7"] )? | ["0"-"3"] ["0"-"7"] ["0"-"7"] ) ) ) "'" > | < STRING_LITERAL: "\"" ( (~["\"","\\","\n","\r"]) | ("\\" ( ["n","t","b","r","f","\\","'","\""] | ["0"-"7"] ( ["0"-"7"] )? | ["0"-"3"] ["0"-"7"] ["0"-"7"] ) ) )* "\"" > } /* IDENTIFIERS */ TOKEN : { < IDENTIFIER: <LETTER> (<LETTER>|<DIGIT>)* > | < #LETTER: [ "\u0024", "\u0041"-"\u005a", "\u005f", "\u0061"-"\u007a", "\u00c0"-"\u00d6", "\u00d8"-"\u00f6", "\u00f8"-"\u00ff", "\u0100"-"\u1fff", "\u3040"-"\u318f", "\u3300"-"\u337f", "\u3400"-"\u3d2d", "\u4e00"-"\u9fff", "\uf900"-"\ufaff" ] > | < #DIGIT: [ "\u0030"-"\u0039", "\u0660"-"\u0669", "\u06f0"-"\u06f9", "\u0966"-"\u096f", "\u09e6"-"\u09ef", "\u0a66"-"\u0a6f", "\u0ae6"-"\u0aef", "\u0b66"-"\u0b6f", "\u0be7"-"\u0bef", "\u0c66"-"\u0c6f", "\u0ce6"-"\u0cef", "\u0d66"-"\u0d6f", "\u0e50"-"\u0e59", "\u0ed0"-"\u0ed9", "\u1040"-"\u1049" ] > } /* SEPARATORS */ TOKEN : { < LPAREN: "(" > | < RPAREN: ")" > | < LBRACE: "{" > | < RBRACE: "}" > | < LBRACKET: "[" > | < RBRACKET: "]" > | < SEMICOLON: ";" > | < COMMA: "," > | < DOT: "." > } /* OPERATORS */ TOKEN : { < PLUS: "+" > | < MINUS: "-" > | < STAR: "*" > | < SLASH: "/" > | < EXP: "^" > | < BANG: "!" > | < ASSIGN: "=" > | < HOOK: "?" > | < PLUSASSIGN: "+=" > | < MINUSASSIGN: "-=" > | < STARASSIGN: "*=" > | < SLASHASSIGN: "/=" > | < COLON: ":" > } void compilationUnit(): {} { definitions() <EOF> } void definitions(): {} { (shaderDefinition() | functionDefinition())+ } void shaderDefinition(): {} { shaderType() identifier() "("formals()")" "{"statements()"}" } void functionDefinition(): {} { [type()] identifier() "("formals()")" "{"statements()"}" } void identifier(): {} { <IDENTIFIER> } void shaderType(): {} { <LIGHT> | <SURFACE> | <VOLUME> | <DISPLACEMENT> | <IMAGER> } void type(): {} { <FLOAT> | <STRING> | <COLOR> | <POINT> | <VECTOR> | <NORMAL> | <MATRIX> | <VOID> } void formals(): {} { formalVariableDefinitions() (";" formalVariableDefinitions() )* } void formalVariableDefinitions(): {} { [outputspec()] typespec() defExpressions() } void outputspec(): {} { <OUTPUT> } void typespec(): {} { [detail()] type() } void detail(): {} { <VARYING> | <UNIFORM> } void defExpressions(): {} { [ defExpression() ("," defExpression() )* ] } void defExpression(): {} { identifier() [defInit()] } void defInit(): {} { "=" expression() } void expression(): {} { primary() /* | expression() binop() expression() | "-" expression() | relation() "?" expression() ":" expression() | typecast() expression()*/ } void primary(): {} { number() | stringconstant() /*| texture()*/ /*| identifier() [arrayindex()] | procedurecall()*/ | assignexpression() /*| triple() | sixteentuple()*/ } void number(): {} { <INTEGER_LITERAL> | <FLOATING_POINT_LITERAL> } void stringconstant(): {} { <STRING_LITERAL> } void texture(): {} { textureType() textureFilename() [chanel()] [textureArguments()] } void textureType(): {} { <TEXTURE> | <ENVIRONMENT> | <SHADOW> } void textureFilename(): {} { expression() } void chanel(): {} { "[" expression() "]" } void textureArguments(): {} { expression() ("," expression() )* } void arrayindex(): {} { "["expression()"]" } void procedurecall(): {} { identifier() "(" procArguments() ")" } void procArguments(): {} { [ expression() ("," expression() )* ] } void assignexpression(): {} { identifier() [arrayindex()] asgnop() expression() } void asgnop(): {} { "=" | "*=" | "/=" | "+=" | "-=" } void triple(): {} { "("expression()","expression()","expression()")" } void sixteentuple(): {} { "("expression()","expression()","expression()","expression() ","expression()","expression()","expression()","expression() ","expression()","expression()","expression()","expression() ","expression()","expression()","expression()","expression()")" } void statements(): {} { (statement())+ } void statement(): {} { variableDefinitions() ";" | assignexpression() ";" /*| procedurecall() ";"*/ | <RETURN> expression() ";" } void variableDefinitions(): {} { [externspec()] typespec() defExpressions() ";" } void externspec(): {} { <EXTERN> } |
From: <ega...@us...> - 2003-06-24 22:34:02
|
Update of /cvsroot/jrman/drafts/javacc In directory sc8-pr-cvs1:/tmp/cvs-serv24323/javacc Log Message: Directory /cvsroot/jrman/drafts/javacc added to the repository |
From: <ma...@us...> - 2003-06-12 18:36:43
|
Update of /cvsroot/jrman/drafts/src/org/jrman/parser In directory sc8-pr-cvs1:/tmp/cvs-serv2346/src/org/jrman/parser Modified Files: Parser.java Log Message: Implemented mipmapped textures. Index: Parser.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/Parser.java,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** Parser.java 3 Jun 2003 05:19:08 -0000 1.51 --- Parser.java 12 Jun 2003 18:36:09 -0000 1.52 *************** *** 21,24 **** --- 21,25 ---- import java.io.FileInputStream; + import java.io.IOException; import java.io.InputStreamReader; import java.io.StreamTokenizer; *************** *** 50,53 **** --- 51,55 ---- import org.jrman.geom.PerspectiveTransform; import org.jrman.geom.Transform; + import org.jrman.maps.MipMap; import org.jrman.options.CameraProjection; import org.jrman.options.Display; *************** *** 171,174 **** --- 173,177 ---- } catch (Exception pe) { System.err.println("Error: " + pe); + pe.printStackTrace(); } } *************** *** 1087,1089 **** --- 1090,1112 ---- } + + public void makeTexture( + String picturename, + String texturename, + String swrap, + String twrap, + String filter, + int swidth, + int twidth) { + try { + MipMap.makeMipMap( + picturename, + texturename, + MipMap.Mode.getNamed(swrap), + MipMap.Mode.getNamed(twrap)); + } catch (IOException e) { + throw new IllegalArgumentException("Can't create texture: " + picturename); + } + } + } |
From: <ma...@us...> - 2003-06-12 18:36:42
|
Update of /cvsroot/jrman/drafts/src/org/jrman/grid In directory sc8-pr-cvs1:/tmp/cvs-serv2346/src/org/jrman/grid Modified Files: Color3fGrid.java FloatGrid.java Log Message: Implemented mipmapped textures. Index: Color3fGrid.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/grid/Color3fGrid.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Color3fGrid.java 6 Jun 2003 15:29:27 -0000 1.5 --- Color3fGrid.java 12 Jun 2003 18:36:08 -0000 1.6 *************** *** 21,64 **** import java.awt.image.BufferedImage; - import java.io.File; - import java.util.HashMap; - import java.util.Map; - import javax.imageio.ImageIO; import javax.vecmath.Color3f; ! import org.jrman.util.Calc; public class Color3fGrid extends Tuple3fGrid { - - private static Map textures = new HashMap(); - - private static BufferedImage getTexture(String name) { - BufferedImage texture = (BufferedImage) textures.get(name); - if (texture == null) { - try { - File file = new File(name); - texture = ImageIO.read(file); - textures.put(name, texture); - } catch (Exception e) { - System.err.println("Couldn't load texture " + name + ": " + e.toString()); - } - } - return texture; - } ! private static void getColor(BufferedImage texture, float s, float t, Color3f out) { ! int width = texture.getWidth(); ! int height = texture.getHeight(); ! int x = (int) Calc.clamp(s * width, 0f, width - 1); ! int y = (int) Calc.clamp(t * height, 0f, height -1); ! int argb = texture.getRGB(x, y); ! out.x = ((argb >> 16) & 0xff) / 255f; ! out.y = ((argb >> 8) & 0xff) / 255f; ! out.z = (argb & 0xff) / 255f; ! } ! public static void flush(String name) { ! textures.remove(name); } --- 21,45 ---- import java.awt.image.BufferedImage; import javax.vecmath.Color3f; ! import org.jrman.maps.MipMap; public class Color3fGrid extends Tuple3fGrid { ! private static float[] mmData = new float[4]; ! private static Color3f tmpc = new Color3f(); ! ! private static void getColor( ! MipMap texture, ! float s, ! float t, ! float area, ! Color3f out) { ! texture.getData(s, t, area, mmData); ! out.x = mmData[0]; ! out.y = mmData[1]; ! out.z = mmData[2]; } *************** *** 68,82 **** data[i] = new Color3f(); } ! public void texture(String textureName, FloatGrid s, FloatGrid t) { ! BufferedImage texture = getTexture(textureName); ! Color3f[] cdata = (Color3f[]) data; ! float[] sdata = s.data; ! float[] tdata = t.data; ! for (int i = 0; i < size; i++) { ! float ws = sdata[i] - (float) Math.floor(sdata[i]); ! float wt = tdata[i] - (float) Math.floor(tdata[i]); ! getColor(texture, ws, wt, cdata[i]); ! } } --- 49,73 ---- data[i] = new Color3f(); } ! ! /* ! * texture ! */ ! public void texture(String textureName, FloatGrid s, FloatGrid t) { ! MipMap texture = MipMap.getMipMap(textureName); ! for (int v = 0; v < vSize; v++) ! for (int u = 0; u < uSize; u++) { ! int u1 = u + 1; ! if (u1 == uSize) ! u1 = u - 1; ! int v1 = v + 1; ! if (v1 == vSize) ! v1 = v - 1; ! float area = ! Math.abs(s.get(u1, v1) - s.get(u, v)) ! * Math.abs(t.get(u1, v1) - t.get(u, v)); ! getColor(texture, s.get(u, v), t.get(u, v), area, tmpc); ! set(u, v, tmpc); ! } } Index: FloatGrid.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/grid/FloatGrid.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** FloatGrid.java 6 Jun 2003 15:29:27 -0000 1.11 --- FloatGrid.java 12 Jun 2003 18:36:08 -0000 1.12 *************** *** 21,68 **** import java.awt.image.BufferedImage; - import java.io.File; - import java.util.HashMap; - import java.util.Map; - import javax.imageio.ImageIO; import javax.vecmath.Point3f; import javax.vecmath.Vector3f; import org.jrman.util.Calc; public class FloatGrid extends Grid { ! public float[] data; ! ! private static Map textures = new HashMap(); ! private static BufferedImage getTexture(String name) { ! BufferedImage texture = (BufferedImage) textures.get(name); ! if (texture == null) { ! try { ! File file = new File(name); ! texture = ImageIO.read(file); ! textures.put(name, texture); ! } catch (Exception e) { ! System.err.println("Couldn't load texture " + name + ": " + e.toString()); ! } ! } ! return texture; ! } ! ! private static float getFloat(BufferedImage texture, float s, float t) { ! int width = texture.getWidth(); ! int height = texture.getHeight(); ! int x = (int) Calc.clamp(s * width, 0f, width - 1); ! int y = (int) Calc.clamp(t * height, 0f, height -1); ! int argb = texture.getRGB(x, y); ! float r = ((argb >> 16) & 0xff) / 255f; ! float g= ((argb >> 8) & 0xff) / 255f; ! float b = (argb & 0xff) / 255f; ! return (r + g + b) / 3f; ! } ! public static void flush(String name) { ! textures.remove(name); } --- 21,40 ---- import java.awt.image.BufferedImage; import javax.vecmath.Point3f; import javax.vecmath.Vector3f; + import org.jrman.maps.MipMap; import org.jrman.util.Calc; public class FloatGrid extends Grid { ! private static float[] mmData = new float[4]; ! public float[] data; ! private static float getFloat(MipMap texture, float s, float t, float area) { ! texture.getData(s, t, area, mmData); ! return (mmData[0] + mmData[1] + mmData[2]) / 3f; } *************** *** 70,74 **** data = new float[maxSize]; } ! public float get(int i) { return data[i]; --- 42,46 ---- data = new float[maxSize]; } ! public float get(int i) { return data[i]; *************** *** 1210,1218 **** } ! public void depth( ! Point3fGrid p, ! float near, ! float far, ! BooleanGrid cond) { Point3f[] pdata = (Point3f[]) p.data; for (int i = 0; i < size; i++) --- 1182,1186 ---- } ! public void depth(Point3fGrid p, float near, float far, BooleanGrid cond) { Point3f[] pdata = (Point3f[]) p.data; for (int i = 0; i < size; i++) *************** *** 1220,1224 **** data[i] = Calc.depth(pdata[i], near, far); } ! /* * texture --- 1188,1192 ---- data[i] = Calc.depth(pdata[i], near, far); } ! /* * texture *************** *** 1226,1237 **** public void texture(String textureName, FloatGrid s, FloatGrid t) { ! BufferedImage texture = getTexture(textureName); ! float[] sdata = s.data; ! float[] tdata = t.data; ! for (int i = 0; i < size; i++) { ! float ws = sdata[i] - (float) Math.floor(sdata[i]); ! float wt = tdata[i] - (float) Math.floor(tdata[i]); ! data[i] = getFloat(texture, ws, wt); ! } } --- 1194,1211 ---- public void texture(String textureName, FloatGrid s, FloatGrid t) { ! MipMap texture = MipMap.getMipMap(textureName); ! for (int v = 0; v < vSize; v++) ! for (int u = 0; u < uSize; u++) { ! int u1 = u + 1; ! if (u1 == uSize) ! u1 = u - 1; ! int v1 = v + 1; ! if (v1 == vSize) ! v1 = v - 1; ! float area = ! Math.abs(s.get(u1, v) - s.get(u, v)) ! * Math.abs(t.get(u, v1) - t.get(u, v)); ! set(u, v, getFloat(texture, s.get(u, v), t.get(u, v), area)); ! } } |
From: <ma...@us...> - 2003-06-12 18:36:42
|
Update of /cvsroot/jrman/drafts In directory sc8-pr-cvs1:/tmp/cvs-serv2346 Modified Files: build.xml Log Message: Implemented mipmapped textures. Index: build.xml =================================================================== RCS file: /cvsroot/jrman/drafts/build.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** build.xml 30 May 2003 01:56:30 -0000 1.6 --- build.xml 12 Jun 2003 18:36:09 -0000 1.7 *************** *** 51,58 **** --- 51,61 ---- <include name="bin/jrman.bat"/> <include name="bin/jrman"/> + <include name="bin/mktxr.bat"/> + <include name="bin/mktxr"/> </fileset> </copy> <chmod perm="+x" file="${dist}/bin/jrman"/> + <chmod perm="+x" file="${dist}/bin/mktxr"/> <copy todir="${dist}/src" > |
From: <ma...@us...> - 2003-06-12 18:36:41
|
Update of /cvsroot/jrman/drafts/sampleData In directory sc8-pr-cvs1:/tmp/cvs-serv2346/sampleData Modified Files: jarra2.rib florero.rib space.rib mesa.rib capsules.rib DinningRoom.rib TextureTest.rib dragonhead.rib silla.rib mesa2.rib elephant.rib paraboloid.rib jarra1.rib Log Message: Implemented mipmapped textures. Index: jarra2.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/jarra2.rib,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** jarra2.rib 1 Jun 2003 16:59:49 -0000 1.2 --- jarra2.rib 12 Jun 2003 18:36:01 -0000 1.3 *************** *** 4,8 **** Color [0.5 0.5 1.0] Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] ! Displacement "bumpy" "texturename" "clay.gif" "Km" .1 Attribute "displacementbound" "sphere" .1 TransformBegin --- 4,8 ---- Color [0.5 0.5 1.0] Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] ! Displacement "bumpy" "texturename" "clay.txr" "Km" .1 Attribute "displacementbound" "sphere" .1 TransformBegin Index: florero.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/florero.rib,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** florero.rib 1 Jun 2003 08:34:08 -0000 1.2 --- florero.rib 12 Jun 2003 18:36:01 -0000 1.3 *************** *** 6,10 **** #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] Color .8 .8 .8 ! Surface "paintedplastic" "Ks" 0 "texturename" "gradient.png" TransformBegin Basis "bezier" 3 "bezier" 3 --- 6,10 ---- #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] Color .8 .8 .8 ! Surface "paintedplastic" "Ks" 0 "texturename" "gradient.txr" TransformBegin Basis "bezier" 3 "bezier" 3 *************** *** 483,487 **** #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] Color .7 .7 .7 ! Surface "paintedplastic" "texturename" "marb2.gif" TransformBegin Basis "bezier" 3 "bezier" 3 --- 483,487 ---- #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] Color .7 .7 .7 ! Surface "paintedplastic" "texturename" "marb2.txr" TransformBegin Basis "bezier" 3 "bezier" 3 Index: space.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/space.rib,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** space.rib 7 Jun 2003 18:38:44 -0000 1.2 --- space.rib 12 Jun 2003 18:36:01 -0000 1.3 *************** *** 1,4 **** Display "Space.png" "framebuffer" "rgb" ! Format 800 600 1 PixelSamples 4 4 Exposure 1 2.2 --- 1,9 ---- + #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 2000 1500 1 PixelSamples 4 4 Exposure 1 2.2 *************** *** 19,34 **** AttributeBegin Attribute "displacementbound" "sphere" .1 ! Displacement "bumpy" "texturename" "earth.4096x2048.jpg" "Km" .1 ! Sphere 250 -250 250 360 "texturename" "earth.4096x2048.jpg" AttributeEnd Opacity .4 .4 .4 ! Sphere 253 -253 253 360 "texturename" "earth-clouds.jpg" AttributeEnd AttributeBegin Translate -150 5 -300 Attribute "displacementbound" "sphere" .1 ! Displacement "bumpy" "texturename" "moon.1440x720.1.jpg" "Km" .1 Rotate 90 1 0 0 ! Sphere 80 -80 80 360 "texturename" "moon.1440x720.1.jpg" AttributeEnd TransformEnd --- 24,39 ---- AttributeBegin Attribute "displacementbound" "sphere" .1 ! Displacement "bumpy" "texturename" "earth.txr" "Km" .1 ! Sphere 250 -250 250 360 "texturename" "earth.txr" AttributeEnd Opacity .4 .4 .4 ! Sphere 253 -253 253 360 "texturename" "earth-clouds.txr" AttributeEnd AttributeBegin Translate -150 5 -300 Attribute "displacementbound" "sphere" .1 ! Displacement "bumpy" "texturename" "moon.txr" "Km" .1 Rotate 90 1 0 0 ! Sphere 80 -80 80 360 "texturename" "moon.txr" AttributeEnd TransformEnd *************** *** 40,45 **** Color .6 .6 .6 Attribute "displacementbound" "sphere" .5 ! Displacement "bumpy" "texturename" "mars.2880x1440.jpg" "Km" .5 ! Sphere 300 -300 300 360 "texturename" "mars.2880x1440.jpg" AttributeEnd --- 45,50 ---- Color .6 .6 .6 Attribute "displacementbound" "sphere" .5 ! Displacement "bumpy" "texturename" "mars.txr" "Km" .5 ! Sphere 300 -300 300 360 "texturename" "mars.txr" AttributeEnd *************** *** 47,51 **** Patch "bilinear" "P" [-400 -300 1000 -400 300 1000 400 -300 1000 400 300 100] ! "texturename" "tycho.jpg" AttributeEnd WorldEnd --- 52,56 ---- Patch "bilinear" "P" [-400 -300 1000 -400 300 1000 400 -300 1000 400 300 100] ! "texturename" "tycho.txr" AttributeEnd WorldEnd Index: mesa.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/mesa.rib,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mesa.rib 4 Jun 2003 14:54:57 -0000 1.3 --- mesa.rib 12 Jun 2003 18:36:01 -0000 1.4 *************** *** 489,493 **** #Surface "matte" Declare "rtexturename" "string" ! Surface "reflectivepaintedplastic" "texturename" "marble7.gif" "rtexturename" "TableReflection.png" #Surface "reflectivepaintedplastic" "rtexturename" "TableReflection.png" TransformBegin --- 489,493 ---- #Surface "matte" Declare "rtexturename" "string" ! Surface "reflectivepaintedplastic" "texturename" "marble7.txr" "rtexturename" "TableReflection.txr" #Surface "reflectivepaintedplastic" "rtexturename" "TableReflection.png" TransformBegin *************** *** 561,565 **** #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] #Surface "matte" ! Surface "paintedplastic" "texturename" "marble7.gif" TransformBegin Basis "bezier" 3 "bezier" 3 --- 561,565 ---- #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] #Surface "matte" ! Surface "paintedplastic" "texturename" "marble7.txr" TransformBegin Basis "bezier" 3 "bezier" 3 Index: capsules.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/capsules.rib,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** capsules.rib 1 Jun 2003 08:34:08 -0000 1.11 --- capsules.rib 12 Jun 2003 18:36:01 -0000 1.12 *************** *** 3,7 **** #Display "capsules.tiff" "file" "rgba" PixelFilter "box" 1 1 ! Format 2000 1500 1 PixelSamples 4 4 Exposure 1 2.2 --- 3,7 ---- #Display "capsules.tiff" "file" "rgba" PixelFilter "box" 1 1 ! Format 800 600 1 PixelSamples 4 4 Exposure 1 2.2 Index: DinningRoom.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/DinningRoom.rib,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** DinningRoom.rib 7 Jun 2003 18:38:44 -0000 1.10 --- DinningRoom.rib 12 Jun 2003 18:36:01 -0000 1.11 *************** *** 1,388 **** ! Display "TableReflection.png" "file" "rgba" ! PixelSamples 4 4 ! Exposure .4 1 ! Format 512 384 1 ! Projection "perspective" "fov" [40] ! PixelFilter "box" 1 1 ! Scale 1 -1 1 ! Translate 0 0 170 ! Rotate 15 1 0 0 ! Rotate -40 0 1 0 ! ! WorldBegin ! ShadingRate 20 ! LightSource "ambientlight" 1 "intensity" [0.1] ! LightSource "spotlight" 2 "intensity" [2000] "lightcolor" [1 1 1] "from" [0 100 50] "to" [0 45 98] ! #LightSource "distantlight" 3 "intensity" [1.0] "lightcolor" [0.5 0.2 0.0] "from" [-75 50 -75] "to" [0 0 0] ! #LightSource "distantlight" 4 "intensity" [1.0] "lightcolor" [0.5 0.2 0.0] "from" [75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 3 "intensity" [.2] "lightcolor" [1 1 1] "from" [-75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 4 "intensity" [.2] "lightcolor" [1 1 1] "from" [75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 5 "intensity" [0.5] "lightcolor" [1.0 1.0 1.0] "from" [-50 50 50] "to" [0 0 0] ! LightSource "spotlight" 2 "intensity" [5000] "lightcolor" [1 1 1] "from" [0 100 -50] "to" [0 0 0] ! ! TransformBegin ! AttributeBegin ! #Surface "matte" ! Surface "paintedplastic" "Ks" .1 ! Displacement "bumpy" "texturename" "brick.jpg" "Km" -.3 ! Attribute "displacementbound" "sphere" .3 ! #Color 0.9 0.9 0.9 ! Color .8 .8 .8 ! Translate 0 0 100 ! Scale 2 2 2 ! Patch "bilinear" "P" [-100 -100 0 -100 100 0 100 -100 0 100 100 0] "s" [0 0 8 8] "t" [0 8 0 8] ! AttributeEnd ! TransformEnd ! ! TransformBegin ! AttributeBegin ! #Surface "matte" ! Surface "paintedplastic" "Ks" .1 ! Displacement "bumpy" "texturename" "brick.jpg" "Km" -.3 ! Attribute "displacementbound" "sphere" .3 ! #Color 0.9 0.9 0.9 ! Color .8 .8 .8 ! Translate 100 0 0 ! Scale 2 2 2 ! Patch "bilinear" "P" [0 -100 -100 0 100 -100 0 -100 100 0 100 100] "s" [0 0 8 8] "t" [0 8 0 8] ! AttributeEnd ! TransformEnd ! ! TransformBegin ! AttributeBegin ! Translate 0 30 99 ! Scale 0.75 0.75 0.75 ! ReadArchive "cuadro.rib" ! AttributeEnd ! TransformEnd ! ! TransformBegin ! Translate -40 0 -7 ! Rotate 90 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate -7 0 25 ! Rotate 180 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate 40 0 7 ! Rotate -90 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate 7 0 -25 ! Rotate 0 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! ReadArchive "florero.rib" ! TransformEnd ! ! TransformBegin ! Translate -15 0 0 ! ReadArchive "jarra1.rib" ! TransformEnd ! ! TransformBegin ! Translate 15 0 0 ! ReadArchive "jarra2.rib" ! TransformEnd ! ! TransformBegin ! Translate -50 -25.9 0 ! Rotate -90 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 50 -25.9 0 ! Rotate 90 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 0 -25.9 -35 ! Rotate 180 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 0 -25.9 35 ! Rotate 0 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! WorldEnd ! ! Display "FloorReflection.png" "file" "rgba" ! PixelSamples 4 4 ! Exposure .2 1 ! Format 512 384 1 ! Projection "perspective" "fov" [40] ! PixelFilter "box" 1 1 ! Translate 0 0 170 ! Scale 1 -1 1 ! Rotate 15 1 0 0 ! Translate 0 51.8 0 ! Rotate -40 0 1 0 ! ! WorldBegin ! ShadingRate 20 ! LightSource "ambientlight" 1 "intensity" [0.1] ! LightSource "spotlight" 2 "intensity" [2000] "lightcolor" [1 1 1] "from" [0 100 50] "to" [0 45 98] ! #LightSource "distantlight" 3 "intensity" [1.0] "lightcolor" [0.5 0.2 0.0] "from" [-75 50 -75] "to" [0 0 0] ! #LightSource "distantlight" 4 "intensity" [1.0] "lightcolor" [0.5 0.2 0.0] "from" [75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 3 "intensity" [.2] "lightcolor" [1 1 1] "from" [-75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 4 "intensity" [.2] "lightcolor" [1 1 1] "from" [75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 5 "intensity" [0.5] "lightcolor" [1.0 1.0 1.0] "from" [-50 50 50] "to" [0 0 0] ! LightSource "spotlight" 2 "intensity" [5000] "lightcolor" [1 1 1] "from" [0 100 -50] "to" [0 0 0] ! ! TransformBegin ! AttributeBegin ! #Surface "matte" ! Surface "paintedplastic" "Ks" .1 ! Displacement "bumpy" "texturename" "brick.jpg" "Km" -.3 ! Attribute "displacementbound" "sphere" .3 ! #Color 0.9 0.9 0.9 ! Color .8 .8 .8 ! Translate 0 0 100 ! Scale 2 2 2 ! Patch "bilinear" "P" [-100 -100 0 -100 100 0 100 -100 0 100 100 0] "s" [0 0 8 8] "t" [0 8 0 8] ! AttributeEnd ! TransformEnd ! ! TransformBegin ! AttributeBegin ! #Surface "matte" ! Surface "paintedplastic" "Ks" .1 ! Displacement "bumpy" "texturename" "brick.jpg" "Km" -.3 ! Attribute "displacementbound" "sphere" .3 ! #Color 0.9 0.9 0.9 ! Color .8 .8 .8 ! Translate 100 0 0 ! Scale 2 2 2 ! Patch "bilinear" "P" [0 -100 -100 0 100 -100 0 -100 100 0 100 100] "s" [0 0 8 8] "t" [0 8 0 8] ! AttributeEnd ! TransformEnd ! ! TransformBegin ! AttributeBegin ! Translate 0 30 99 ! Scale 0.75 0.75 0.75 ! ReadArchive "cuadro.rib" ! AttributeEnd ! TransformEnd ! ! TransformBegin ! Translate 0 -25.9 0 ! ReadArchive "mesa2.rib" ! TransformEnd ! ! TransformBegin ! Translate -40 0 -7 ! Rotate 90 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate -7 0 25 ! Rotate 180 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate 40 0 7 ! Rotate -90 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate 7 0 -25 ! Rotate 0 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! ReadArchive "florero.rib" ! TransformEnd ! ! TransformBegin ! Translate -15 0 0 ! ReadArchive "jarra1.rib" ! TransformEnd ! ! TransformBegin ! Translate 15 0 0 ! ReadArchive "jarra2.rib" ! TransformEnd ! ! TransformBegin ! Translate -50 -25.9 0 ! Rotate -90 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 50 -25.9 0 ! Rotate 90 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 0 -25.9 -35 ! Rotate 180 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 0 -25.9 35 ! Rotate 0 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! WorldEnd ! ! #Display "DinningRoom.png" "file" "rgba" ! Display "DinningRoom" "framebuffer" "rgba" ! PixelSamples 4 4 ! Exposure 1 2.2 ! Format 512 384 1 ! Projection "perspective" "fov" [40] ! PixelFilter "box" 1 1 ! Translate 0 0 170 ! Rotate -15 1 0 0 ! Rotate -40 0 1 0 ! ! WorldBegin ! ! LightSource "ambientlight" 1 "intensity" [0.1] ! LightSource "spotlight" 2 "intensity" [2000] "lightcolor" [1 1 1] "from" [0 100 50] "to" [0 45 98] ! #LightSource "distantlight" 3 "intensity" [1.0] "lightcolor" [0.5 0.2 0.0] "from" [-75 50 -75] "to" [0 0 0] ! #LightSource "distantlight" 4 "intensity" [1.0] "lightcolor" [0.5 0.2 0.0] "from" [75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 3 "intensity" [.2] "lightcolor" [1 1 1] "from" [-75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 4 "intensity" [.2] "lightcolor" [1 1 1] "from" [75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 5 "intensity" [0.5] "lightcolor" [1.0 1.0 1.0] "from" [-50 50 50] "to" [0 0 0] ! LightSource "spotlight" 2 "intensity" [5000] "lightcolor" [1 1 1] "from" [0 100 -50] "to" [0 0 0] ! ! TransformBegin ! AttributeBegin ! #Surface "plastic" ! Surface "reflectivepaintedplastic" "texturename" "woo12.jpg" "rtexturename" "FloorReflection.png" ! #Color 0.95 0.95 0.95 ! Color .8 .8 .8 ! Translate 0 -25.9 0 ! Scale 2 2 2 ! Patch "bilinear" "P" [-100 0 -100 -100 0 100 100 0 -100 100 0 100] "s" [0 10 0 10] "t" [0 0 10 10] ! AttributeEnd ! TransformEnd ! ! TransformBegin ! AttributeBegin ! #Surface "matte" ! Surface "paintedplastic" "Ks" .1 ! Displacement "bumpy" "texturename" "brick.jpg" "Km" -.3 ! Attribute "displacementbound" "sphere" .3 ! #Color 0.9 0.9 0.9 ! Color .8 .8 .8 ! Translate 0 0 100 ! Scale 2 2 2 ! Patch "bilinear" "P" [-100 -100 0 -100 100 0 100 -100 0 100 100 0] "s" [0 0 8 8] "t" [0 8 0 8] ! AttributeEnd ! TransformEnd ! ! TransformBegin ! AttributeBegin ! #Surface "matte" ! Surface "paintedplastic" "Ks" .1 ! Displacement "bumpy" "texturename" "brick.jpg" "Km" -.3 ! Attribute "displacementbound" "sphere" .3 ! #Color 0.9 0.9 0.9 ! Color .8 .8 .8 ! Translate 100 0 0 ! Scale 2 2 2 ! Patch "bilinear" "P" [0 -100 -100 0 100 -100 0 -100 100 0 100 100] "s" [0 0 8 8] "t" [0 8 0 8] ! AttributeEnd ! TransformEnd ! ! TransformBegin ! AttributeBegin ! Translate 0 30 99 ! Scale 0.75 0.75 0.75 ! ReadArchive "cuadro.rib" ! AttributeEnd ! TransformEnd ! ! TransformBegin ! Translate 0 -25.9 0 ! ReadArchive "mesa.rib" ! TransformEnd ! ! TransformBegin ! Translate -40 0 -7 ! Rotate 90 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate -7 0 25 ! Rotate 180 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate 40 0 7 ! Rotate -90 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate 7 0 -25 ! Rotate 0 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! ReadArchive "florero.rib" ! TransformEnd ! ! TransformBegin ! Translate -15 0 0 ! ReadArchive "jarra1.rib" ! TransformEnd ! ! TransformBegin ! Translate 15 0 0 ! ReadArchive "jarra2.rib" ! TransformEnd ! ! TransformBegin ! Translate -50 -25.9 0 ! Rotate -90 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 50 -25.9 0 ! Rotate 90 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 0 -25.9 -35 ! Rotate 180 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 0 -25.9 35 ! Rotate 0 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! WorldEnd --- 1,403 ---- ! #MakeTexture "brick.jpg" "brick.txr" "periodic" "periodic" "x" 1 1 ! #MakeTexture "woo12.jpg" "woo12.txr" "periodic" "periodic" "x" 1 1 ! #MakeTexture "rattan.gif" "rattan.txr" "periodic" "periodic" "x" 1 1 ! #MakeTexture "mosaic.gif" "mosaic.txr" "periodic" "periodic" "x" 1 1 ! #MakeTexture "gradient.png" "gradient.txr" "periodic" "periodic" "x" 1 1 ! #MakeTexture "marb2.gif" "marb2.txr" "periodic" "periodic" "x" 1 1 ! #MakeTexture "marble7.gif" "marble7.txr" "periodic" "periodic" "x" 1 1 ! #MakeTexture "clay.gif" "clay.txr" "periodic" "periodic" "x" 1 1 ! ! Display "TableReflection.png" "file" "rgba" ! PixelSamples 4 4 ! Exposure .4 1 ! Format 320 240 1 ! Projection "perspective" "fov" [40] ! PixelFilter "box" 1 1 ! Scale 1 -1 1 ! Translate 0 0 170 ! Rotate 15 1 0 0 ! Rotate -40 0 1 0 ! ! ! WorldBegin ! ShadingRate 20 ! LightSource "ambientlight" 1 "intensity" [0.1] ! LightSource "spotlight" 2 "intensity" [2000] "lightcolor" [1 1 1] "from" [0 100 50] "to" [0 45 98] ! #LightSource "distantlight" 3 "intensity" [1.0] "lightcolor" [0.5 0.2 0.0] "from" [-75 50 -75] "to" [0 0 0] ! #LightSource "distantlight" 4 "intensity" [1.0] "lightcolor" [0.5 0.2 0.0] "from" [75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 3 "intensity" [.2] "lightcolor" [1 1 1] "from" [-75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 4 "intensity" [.2] "lightcolor" [1 1 1] "from" [75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 5 "intensity" [0.5] "lightcolor" [1.0 1.0 1.0] "from" [-50 50 50] "to" [0 0 0] ! LightSource "spotlight" 2 "intensity" [5000] "lightcolor" [1 1 1] "from" [0 100 -50] "to" [0 0 0] ! ! TransformBegin ! AttributeBegin ! #Surface "matte" ! Surface "paintedplastic" "Ks" .1 ! Displacement "bumpy" "texturename" "brick.txr" "Km" -.3 ! Attribute "displacementbound" "sphere" .3 ! #Color 0.9 0.9 0.9 ! Color .8 .8 .8 ! Translate 0 0 100 ! Scale 2 2 2 ! Patch "bilinear" "P" [-100 -100 0 -100 100 0 100 -100 0 100 100 0] "s" [0 0 8 8] "t" [0 8 0 8] ! AttributeEnd ! TransformEnd ! ! TransformBegin ! AttributeBegin ! #Surface "matte" ! Surface "paintedplastic" "Ks" .1 ! Displacement "bumpy" "texturename" "brick.txr" "Km" -.3 ! Attribute "displacementbound" "sphere" .3 ! #Color 0.9 0.9 0.9 ! Color .8 .8 .8 ! Translate 100 0 0 ! Scale 2 2 2 ! Patch "bilinear" "P" [0 -100 -100 0 100 -100 0 -100 100 0 100 100] "s" [0 0 8 8] "t" [0 8 0 8] ! AttributeEnd ! TransformEnd ! ! TransformBegin ! AttributeBegin ! Translate 0 30 99 ! Scale 0.75 0.75 0.75 ! ReadArchive "cuadro.rib" ! AttributeEnd ! TransformEnd ! ! TransformBegin ! Translate -40 0 -7 ! Rotate 90 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate -7 0 25 ! Rotate 180 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate 40 0 7 ! Rotate -90 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate 7 0 -25 ! Rotate 0 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! ReadArchive "florero.rib" ! TransformEnd ! ! TransformBegin ! Translate -15 0 0 ! ReadArchive "jarra1.rib" ! TransformEnd ! ! TransformBegin ! Translate 15 0 0 ! ReadArchive "jarra2.rib" ! TransformEnd ! ! TransformBegin ! Translate -50 -25.9 0 ! Rotate -90 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 50 -25.9 0 ! Rotate 90 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 0 -25.9 -35 ! Rotate 180 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 0 -25.9 35 ! Rotate 0 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! WorldEnd ! ! MakeTexture "TableReflection.png" "TableReflection.txr" ! "periodic" "periodic" "x" 1 1 ! ! Display "FloorReflection.png" "file" "rgba" ! PixelSamples 4 4 ! Exposure .2 1 ! Format 320 240 1 ! Projection "perspective" "fov" [40] ! PixelFilter "box" 1 1 ! Translate 0 0 170 ! Scale 1 -1 1 ! Rotate 15 1 0 0 ! Translate 0 51.8 0 ! Rotate -40 0 1 0 ! ! WorldBegin ! ShadingRate 20 ! LightSource "ambientlight" 1 "intensity" [0.1] ! LightSource "spotlight" 2 "intensity" [2000] "lightcolor" [1 1 1] "from" [0 100 50] "to" [0 45 98] ! #LightSource "distantlight" 3 "intensity" [1.0] "lightcolor" [0.5 0.2 0.0] "from" [-75 50 -75] "to" [0 0 0] ! #LightSource "distantlight" 4 "intensity" [1.0] "lightcolor" [0.5 0.2 0.0] "from" [75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 3 "intensity" [.2] "lightcolor" [1 1 1] "from" [-75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 4 "intensity" [.2] "lightcolor" [1 1 1] "from" [75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 5 "intensity" [0.5] "lightcolor" [1.0 1.0 1.0] "from" [-50 50 50] "to" [0 0 0] ! LightSource "spotlight" 2 "intensity" [5000] "lightcolor" [1 1 1] "from" [0 100 -50] "to" [0 0 0] ! ! TransformBegin ! AttributeBegin ! #Surface "matte" ! Surface "paintedplastic" "Ks" .1 ! Displacement "bumpy" "texturename" "brick.txr" "Km" -.3 ! Attribute "displacementbound" "sphere" .3 ! #Color 0.9 0.9 0.9 ! Color .8 .8 .8 ! Translate 0 0 100 ! Scale 2 2 2 ! Patch "bilinear" "P" [-100 -100 0 -100 100 0 100 -100 0 100 100 0] "s" [0 0 8 8] "t" [0 8 0 8] ! AttributeEnd ! TransformEnd ! ! TransformBegin ! AttributeBegin ! #Surface "matte" ! Surface "paintedplastic" "Ks" .1 ! Displacement "bumpy" "texturename" "brick.txr" "Km" -.3 ! Attribute "displacementbound" "sphere" .3 ! #Color 0.9 0.9 0.9 ! Color .8 .8 .8 ! Translate 100 0 0 ! Scale 2 2 2 ! Patch "bilinear" "P" [0 -100 -100 0 100 -100 0 -100 100 0 100 100] "s" [0 0 8 8] "t" [0 8 0 8] ! AttributeEnd ! TransformEnd ! ! TransformBegin ! AttributeBegin ! Translate 0 30 99 ! Scale 0.75 0.75 0.75 ! ReadArchive "cuadro.rib" ! AttributeEnd ! TransformEnd ! ! TransformBegin ! Translate 0 -25.9 0 ! ReadArchive "mesa2.rib" ! TransformEnd ! ! TransformBegin ! Translate -40 0 -7 ! Rotate 90 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate -7 0 25 ! Rotate 180 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate 40 0 7 ! Rotate -90 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate 7 0 -25 ! Rotate 0 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! ReadArchive "florero.rib" ! TransformEnd ! ! TransformBegin ! Translate -15 0 0 ! ReadArchive "jarra1.rib" ! TransformEnd ! ! TransformBegin ! Translate 15 0 0 ! ReadArchive "jarra2.rib" ! TransformEnd ! ! TransformBegin ! Translate -50 -25.9 0 ! Rotate -90 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 50 -25.9 0 ! Rotate 90 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 0 -25.9 -35 ! Rotate 180 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 0 -25.9 35 ! Rotate 0 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! WorldEnd ! MakeTexture "FloorReflection.png" "FloorReflection.txr" ! "periodic" "periodic" "x" 1 1 ! ! #Display "DinningRoom.png" "file" "rgba" ! Display "DinningRoom" "framebuffer" "rgba" ! PixelSamples 4 4 ! Exposure 1 2.2 ! Format 800 600 1 ! Projection "perspective" "fov" [40] ! PixelFilter "box" 1 1 ! Translate 0 0 170 ! Rotate -15 1 0 0 ! Rotate -40 0 1 0 ! ! WorldBegin ! ! LightSource "ambientlight" 1 "intensity" [0.1] ! LightSource "spotlight" 2 "intensity" [2000] "lightcolor" [1 1 1] "from" [0 100 50] "to" [0 45 98] ! #LightSource "distantlight" 3 "intensity" [1.0] "lightcolor" [0.5 0.2 0.0] "from" [-75 50 -75] "to" [0 0 0] ! #LightSource "distantlight" 4 "intensity" [1.0] "lightcolor" [0.5 0.2 0.0] "from" [75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 3 "intensity" [.2] "lightcolor" [1 1 1] "from" [-75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 4 "intensity" [.2] "lightcolor" [1 1 1] "from" [75 50 -75] "to" [0 0 0] ! LightSource "distantlight" 5 "intensity" [0.5] "lightcolor" [1.0 1.0 1.0] "from" [-50 50 50] "to" [0 0 0] ! LightSource "spotlight" 2 "intensity" [5000] "lightcolor" [1 1 1] "from" [0 100 -50] "to" [0 0 0] ! ! TransformBegin ! AttributeBegin ! Surface "reflectivepaintedplastic" "texturename" "woo12.txr" "rtexturename" "FloorReflection.txr" ! #Surface "plastic" ! #Color 0.95 0.95 0.95 ! Color .8 .8 .8 ! Translate 0 -25.9 0 ! Scale 2 2 2 ! Patch "bilinear" "P" [-100 0 -100 -100 0 100 100 0 -100 100 0 100] "s" [0 10 0 10] "t" [0 0 10 10] ! AttributeEnd ! TransformEnd ! ! TransformBegin ! AttributeBegin ! #Surface "matte" ! Surface "paintedplastic" "Ks" .1 ! Displacement "bumpy" "texturename" "brick.txr" "Km" -.3 ! Attribute "displacementbound" "sphere" .3 ! #Color 0.9 0.9 0.9 ! Color .8 .8 .8 ! Translate 0 0 100 ! Scale 2 2 2 ! Patch "bilinear" "P" [-100 -100 0 -100 100 0 100 -100 0 100 100 0] "s" [0 0 8 8] "t" [0 8 0 8] ! AttributeEnd ! TransformEnd ! ! TransformBegin ! AttributeBegin ! #Surface "matte" ! Surface "paintedplastic" "Ks" .1 ! Displacement "bumpy" "texturename" "brick.txr" "Km" -.3 ! Attribute "displacementbound" "sphere" .3 ! #Color 0.9 0.9 0.9 ! Color .8 .8 .8 ! Translate 100 0 0 ! Scale 2 2 2 ! Patch "bilinear" "P" [0 -100 -100 0 100 -100 0 -100 100 0 100 100] "s" [0 0 8 8] "t" [0 8 0 8] ! AttributeEnd ! TransformEnd ! ! TransformBegin ! AttributeBegin ! Translate 0 30 99 ! Scale 0.75 0.75 0.75 ! ReadArchive "cuadro.rib" ! AttributeEnd ! TransformEnd ! ! TransformBegin ! Translate 0 -25.9 0 ! ReadArchive "mesa.rib" ! TransformEnd ! ! TransformBegin ! Translate -40 0 -7 ! Rotate 90 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate -7 0 25 ! Rotate 180 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate 40 0 7 ! Rotate -90 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! Translate 7 0 -25 ! Rotate 0 0 1 0 ! ReadArchive "dinnerService.rib" ! TransformEnd ! ! TransformBegin ! ReadArchive "florero.rib" ! TransformEnd ! ! TransformBegin ! Translate -15 0 0 ! ReadArchive "jarra1.rib" ! TransformEnd ! ! TransformBegin ! Translate 15 0 0 ! ReadArchive "jarra2.rib" ! TransformEnd ! ! TransformBegin ! Translate -50 -25.9 0 ! Rotate -90 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 50 -25.9 0 ! Rotate 90 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 0 -25.9 -35 ! Rotate 180 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! TransformBegin ! Translate 0 -25.9 35 ! Rotate 0 0 1 0 ! ReadArchive "silla.rib" ! TransformEnd ! ! WorldEnd Index: TextureTest.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/TextureTest.rib,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TextureTest.rib 3 Jun 2003 04:35:28 -0000 1.2 --- TextureTest.rib 12 Jun 2003 18:36:01 -0000 1.3 *************** *** 1,4 **** Option "statistics" "endofframe" 1 - FrameBegin 1 Display "checkerboard.png" "file" "rgb" Format 128 128 1 --- 1,3 ---- *************** *** 11,14 **** --- 10,15 ---- Patch "bilinear" "P" [0 0 1 1 0 1 0 1 1 1 1 1] WorldEnd + MakeTexture "checkerboard.png" "checkerboard.txr" "periodic" "periodic" "x" 1 1 + MakeTexture "mandrill.jpg" "mandril.txr" "periodic" "periodic" "x" 1 1 Format 512 384 1 Display "TextureTest" "framebuffer" "rgb" *************** *** 24,37 **** 1000 -5 0 1000 -5 1000] ! "texturename" "mandrill.jpg" "s" [0 0 300 300] "t" [0 300 0 300] Patch "bilinear" "P" [-1000 5 0 -1000 5 1000 ! 10000 5 0 ! 10000 5 1000] ! "texturename" "checkerboard.png" "s" [0 0 1000 1000] "t" [0 1000 0 1000] WorldEnd - FrameEnd --- 25,37 ---- 1000 -5 0 1000 -5 1000] ! "texturename" "mandrill.txr" "s" [0 0 300 300] "t" [0 300 0 300] Patch "bilinear" "P" [-1000 5 0 -1000 5 1000 ! 1000 5 0 ! 1000 5 1000] ! "texturename" "checkerboard.txr" "s" [0 0 1000 1000] "t" [0 1000 0 1000] WorldEnd Index: dragonhead.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/dragonhead.rib,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** dragonhead.rib 26 May 2003 07:17:23 -0000 1.1 --- dragonhead.rib 12 Jun 2003 18:36:01 -0000 1.2 *************** *** 5,8 **** --- 5,9 ---- # scene definitions + Display "Dragon Head" "framebuffer" "rgb" PixelSamples 4 4 Exposure 1 2.2 Index: silla.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/silla.rib,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** silla.rib 1 Jun 2003 08:34:08 -0000 1.2 --- silla.rib 12 Jun 2003 18:36:02 -0000 1.3 *************** *** 6,10 **** #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] Color .7 .7 .7 ! Surface "paintedplastic" "texturename" "rattan.gif" TransformBegin Basis "bezier" 3 "bezier" 3 --- 6,10 ---- #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] Color .7 .7 .7 ! Surface "paintedplastic" "texturename" "rattan.txr" TransformBegin Basis "bezier" 3 "bezier" 3 *************** *** 68,72 **** #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] Color .7 .7 .7 ! Surface "paintedplastic" "texturename" "rattan.gif" TransformBegin Basis "bezier" 3 "bezier" 3 --- 68,72 ---- #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] Color .7 .7 .7 ! Surface "paintedplastic" "texturename" "rattan.txr" TransformBegin Basis "bezier" 3 "bezier" 3 *************** *** 86,90 **** #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] Color .7 .7 .7 ! Surface "paintedplastic" "texturename" "rattan.gif" TransformBegin Basis "bezier" 3 "bezier" 3 --- 86,90 ---- #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] Color .7 .7 .7 ! Surface "paintedplastic" "texturename" "rattan.txr" TransformBegin Basis "bezier" 3 "bezier" 3 *************** *** 160,164 **** #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] Color .7 .7 .7 ! Surface "paintedplastic" "texturename" "mosaic.gif" TransformBegin Basis "bezier" 3 "bezier" 3 --- 160,164 ---- #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] Color .7 .7 .7 ! Surface "paintedplastic" "texturename" "mosaic.txr" TransformBegin Basis "bezier" 3 "bezier" 3 *************** *** 183,187 **** #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] Color .7 .7 .7 ! Surface "paintedplastic" "texturename" "mosaic.gif" TransformBegin Basis "bezier" 3 "bezier" 3 --- 183,187 ---- #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] Color .7 .7 .7 ! Surface "paintedplastic" "texturename" "mosaic.txr" TransformBegin Basis "bezier" 3 "bezier" 3 Index: mesa2.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/mesa2.rib,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mesa2.rib 5 Jun 2003 03:06:50 -0000 1.1 --- mesa2.rib 12 Jun 2003 18:36:02 -0000 1.2 *************** *** 489,493 **** #Surface "matte" Declare "rtexturename" "string" ! Surface "reflectivepaintedplastic" "texturename" "marble7.gif" #Surface "reflectivepaintedplastic" "rtexturename" "TableReflection.png" TransformBegin --- 489,493 ---- #Surface "matte" Declare "rtexturename" "string" ! Surface "reflectivepaintedplastic" "texturename" "marble7.txr" #Surface "reflectivepaintedplastic" "rtexturename" "TableReflection.png" TransformBegin *************** *** 561,565 **** #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] #Surface "matte" ! Surface "paintedplastic" "texturename" "marble7.gif" TransformBegin Basis "bezier" 3 "bezier" 3 --- 561,565 ---- #Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] #Surface "matte" ! Surface "paintedplastic" "texturename" "marble7.txr" TransformBegin Basis "bezier" 3 "bezier" 3 Index: elephant.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/elephant.rib,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** elephant.rib 29 May 2003 22:45:11 -0000 1.6 --- elephant.rib 12 Jun 2003 18:36:02 -0000 1.7 *************** *** 1,2 **** --- 1,36 ---- + Format 400 300 1 + Display "eleFloorRefl.png" "file" "rgb" + PixelFilter "box" 1 1 + PixelSamples 4 4 + Exposure 1 2.2 + Clipping 40 200 + Projection "perspective" "fov" 5 + Scale 1 -1 1 + Translate 0 0 120 + Rotate 30 1 0 0 + + WorldBegin + LightSource "spotlight" 1 "from" [0 8 -5] "to" [0 0 0] + "lightcolor" [1 0 0] "intensity" 75 + LightSource "spotlight" 2 "from" [-4 8 2] "to" [0 0 0] + "lightcolor" [0 1 0] "intensity" 75 + LightSource "spotlight" 3 "from" [4 8 2] "to" [0 0 0] + "lightcolor" [0 0 1] "intensity" 75 + + AttributeBegin + Displacement "bumptest" + Attribute "displacementbound" "sphere" .03 + Surface "metal" "roughness" 1 + Color .3 .3 .3 + Translate 0 0 -4 + Rotate -120 0 1 0 + Rotate -90 1 0 0 + Scale .2 .2 .2 + ReadArchive "gumbo.rib" + AttributeEnd + WorldEnd + + MakeTexture "eleFloorRefl.png" "eleFloorRefl.txr" "periodic" "periodic" "x" 1 1 + Format 800 600 1 Display "elephant" "framebuffer" "rgb" *************** *** 4,11 **** PixelSamples 4 4 Exposure 1 2.2 ! Clipping 40 80 ! Projection "perspective" "fov" 10 ! Translate 0 0 60 Rotate -30 1 0 0 WorldBegin LightSource "spotlight" 1 "from" [0 8 -5] "to" [0 0 0] --- 38,46 ---- PixelSamples 4 4 Exposure 1 2.2 ! Clipping 40 200 ! Projection "perspective" "fov" 5 ! Translate 0 0 120 Rotate -30 1 0 0 + WorldBegin LightSource "spotlight" 1 "from" [0 8 -5] "to" [0 0 0] *************** *** 16,23 **** "lightcolor" [0 0 1] "intensity" 75 AttributeBegin ! Color 1 1 1 ! Surface "matte" ! Rotate -90 1 0 0 ! Disk 0 50 360 AttributeEnd AttributeBegin --- 51,60 ---- "lightcolor" [0 0 1] "intensity" 75 AttributeBegin ! Color .8 .8 .8 ! Declare "rtexturename" "string" ! Surface "reflectivepaintedplastic" "texturename" "woo12.txr" "rtexturename" "eleFloorRefl.txr" ! Rotate 17 0 1 0 ! Patch "bilinear" "P" [-20 0 -20 20 0 -20 -20 0 20 20 0 20] ! "t" [0 5 0 5] "s" [0 0 5 5] AttributeEnd AttributeBegin Index: paraboloid.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/paraboloid.rib,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** paraboloid.rib 28 May 2003 12:33:39 -0000 1.3 --- paraboloid.rib 12 Jun 2003 18:36:02 -0000 1.4 *************** *** 1,4 **** --- 1,5 ---- Option "statistics" "endofframe" 1 Format 480 360 1 + Display "paraboloid" "framebuffer" "rgb" PixelSamples 4 4 Exposure 1 2.5 Index: jarra1.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/jarra1.rib,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** jarra1.rib 1 Jun 2003 16:59:49 -0000 1.2 --- jarra1.rib 12 Jun 2003 18:36:02 -0000 1.3 *************** *** 4,8 **** Color [0.5 0.5 1.0] Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] ! Displacement "bumpy" "texturename" "clay.gif" "Km" .1 Attribute "displacementbound" "sphere" .1 TransformBegin --- 4,8 ---- Color [0.5 0.5 1.0] Surface "plastic" "Ka" [1] "Kd" [0.8] "Ks" [1] "roughness" [0.05] ! Displacement "bumpy" "texturename" "clay.txr" "Km" .1 Attribute "displacementbound" "sphere" .1 TransformBegin |
From: <ma...@us...> - 2003-06-12 18:36:41
|
Update of /cvsroot/jrman/drafts/src/org/jrman/render In directory sc8-pr-cvs1:/tmp/cvs-serv2346/src/org/jrman/render Modified Files: RendererHidden.java Log Message: Implemented mipmapped textures. Index: RendererHidden.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/RendererHidden.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** RendererHidden.java 7 Jun 2003 18:38:44 -0000 1.32 --- RendererHidden.java 12 Jun 2003 18:36:08 -0000 1.33 *************** *** 41,46 **** import org.jrman.geom.Plane; import org.jrman.geom.Transform; ! import org.jrman.grid.Color3fGrid; ! import org.jrman.grid.FloatGrid; import org.jrman.options.Display; import org.jrman.options.Filter; --- 41,45 ---- import org.jrman.geom.Plane; import org.jrman.geom.Transform; ! import org.jrman.maps.MipMap; import org.jrman.options.Display; import org.jrman.options.Filter; *************** *** 252,256 **** if (frame.getDisplay().getType() == Display.Type.FRAMEBUFFER) { JFrame jf = new JFrame(); ! jf.getRootPane().setDoubleBuffered(false); jf.setTitle(frame.getDisplay().getName()); rc = new RenderCanvas(imageStore); --- 251,255 ---- if (frame.getDisplay().getType() == Display.Type.FRAMEBUFFER) { JFrame jf = new JFrame(); ! // jf.getRootPane().setDoubleBuffered(false); jf.setTitle(frame.getDisplay().getName()); rc = new RenderCanvas(imageStore); *************** *** 352,357 **** File file = new File(frame.getDisplay().getName()); ImageIO.write(imageStore.getImage(), ext, file); - Color3fGrid.flush(name); - FloatGrid.flush(name); } catch (Exception e) { System.err.println("Error writing image file: " + e); --- 351,354 ---- |
From: <ma...@us...> - 2003-06-12 18:36:41
|
Update of /cvsroot/jrman/drafts/jrMan/bin In directory sc8-pr-cvs1:/tmp/cvs-serv2346/jrMan/bin Modified Files: jrman Added Files: mktxr.bat mktxr Log Message: Implemented mipmapped textures. --- NEW FILE: mktxr.bat --- @echo off set CLASSPATH=%JRMAN_HOME%\jar\jrman.jar set MEMORY=192m java -Xms%MEMORY% -Xmx%MEMORY% org.jrman.main.MkTxr %1 %2 %3 %4 --- NEW FILE: mktxr --- export CLASSPATH=$JRMAN_HOME/jar/jrman.jar export MEMORY=192m java -Xms$MEMORY -Xmx$MEMORY org.jrman.main.MkTxr $* Index: jrman =================================================================== RCS file: /cvsroot/jrman/drafts/jrMan/bin/jrman,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** jrman 30 May 2003 01:52:46 -0000 1.1 --- jrman 12 Jun 2003 18:36:07 -0000 1.2 *************** *** 2,4 **** export MEMORY=160m ! java -Xms$MEMORY -Xmx$MEMORY org.jrman.main.JRMan $1 \ No newline at end of file --- 2,4 ---- export MEMORY=160m ! java -Xms$MEMORY -Xmx$MEMORY org.jrman.main.JRMan $* \ No newline at end of file |
From: <ma...@us...> - 2003-06-12 18:36:36
|
Update of /cvsroot/jrman/drafts/src/org/jrman/parser/keywords In directory sc8-pr-cvs1:/tmp/cvs-serv2346/src/org/jrman/parser/keywords Modified Files: KeywordMakeTexture.java Log Message: Implemented mipmapped textures. Index: KeywordMakeTexture.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/parser/keywords/KeywordMakeTexture.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** KeywordMakeTexture.java 7 Apr 2003 08:24:24 -0000 1.2 --- KeywordMakeTexture.java 12 Jun 2003 18:36:03 -0000 1.3 *************** *** 20,23 **** --- 20,25 ---- package org.jrman.parser.keywords; + import java.util.Map; + import org.jrman.parser.Tokenizer; *************** *** 27,51 **** // Expect picture name match(st, TK_STRING); ! // Expect texturename match(st, TK_STRING); ! // Expect s wrap match(st, TK_STRING); ! // Expect t wrap match(st, TK_STRING); ! // Expect filter match(st, TK_STRING); ! // Expect s width match(st, TK_NUMBER); ! // Expect t width match(st, TK_NUMBER); ! // Expect parameter list ! parseParameterList(st); } --- 29,54 ---- // Expect picture name match(st, TK_STRING); ! String picturename = st.sval; // Expect texturename match(st, TK_STRING); ! String texturename = st.sval; // Expect s wrap match(st, TK_STRING); ! String swrap = st.sval; // Expect t wrap match(st, TK_STRING); ! String twrap = st.sval; // Expect filter match(st, TK_STRING); ! String filter = st.sval; // Expect s width match(st, TK_NUMBER); ! int swidth = (int) st.nval; // Expect t width match(st, TK_NUMBER); ! int twidth = (int) st.nval; // Expect parameter list ! Map parameters = parseParameterList(st); ! parser.makeTexture(picturename, texturename, swrap, twrap, filter, swidth, twidth); } |
From: <ma...@us...> - 2003-06-12 18:36:14
|
Update of /cvsroot/jrman/drafts/src/org/jrman/main In directory sc8-pr-cvs1:/tmp/cvs-serv2346/src/org/jrman/main Added Files: MkTxr.java Log Message: Implemented mipmapped textures. --- NEW FILE: MkTxr.java --- /* MkTxr.java Copyright (C) 2003 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.main; import org.jrman.maps.MipMap; public class MkTxr { public static void main(String[] args) { if (args.length != 4) { System.err.println("usage: mktxr imageFile textureFile sWrap tWrap"); System.exit(1); } try { MipMap.makeMipMap( args[0], args[1], MipMap.Mode.getNamed(args[2]), MipMap.Mode.getNamed(args[3])); } catch (Exception e) { System.err.println("Cannot create texture file"); } } } |
From: <ma...@us...> - 2003-06-12 18:36:08
|
Update of /cvsroot/jrman/drafts/src/org/jrman/maps In directory sc8-pr-cvs1:/tmp/cvs-serv2346/src/org/jrman/maps Added Files: MipMap.java Log Message: Implemented mipmapped textures. --- NEW FILE: MipMap.java --- /* MipMap.java Copyright (C) 2003 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.maps; import java.awt.geom.AffineTransform; import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; import java.io.BufferedOutputStream; import java.io.DataOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.channels.FileChannel; import java.util.HashMap; import java.util.Map; import javax.imageio.ImageIO; import org.jrman.util.Calc; public class MipMap { private static float[] d00 = new float[4]; private static float[] d10 = new float[4]; private static float[] d01 = new float[4]; private static float[] d11 = new float[4]; private static float[] ll = new float[4]; private static float[] lh = new float[4]; private static Map map = new HashMap(); private ByteBuffer data; private int size; private int levels; private int[] levelOffsets; private int[] levelSizes; private Mode sMode; private Mode tMode; public static class Mode { public final static Mode BLACK = new Mode(1, "black"); public final static Mode CLAMP = new Mode(2, "clamp"); public final static Mode PERIODIC = new Mode(3, "periodic"); private int code; private String name; private static Map map = new HashMap(); static { map.put("black", BLACK); map.put("clamp", CLAMP); map.put("periodic", PERIODIC); } public static Mode getNamed(String name) { Mode result = (Mode) map.get(name); if (result == null) throw new IllegalArgumentException("No such MipMap mode: " + name); return result; } public static Mode getMode(int code) { if (code == 1) return BLACK; if (code == 2) return CLAMP; if (code == 3) return PERIODIC; throw new IllegalArgumentException("No such MipMap mode code: " + code); } public Mode(int code, String name) { this.code = code; this.name = name; } public int getCode() { return code; } public String getName() { return name; } public String toString() { return name; } } private static byte[] scaleDown(byte[] data, int size) { byte[] result = new byte[data.length / 4]; int halfSize = size / 2; for (int y = 0; y < halfSize; y++) for (int x = 0; x < halfSize; x++) { int halfOffset = (y * halfSize + x) * 4; int r = 0; int g = 0; int b = 0; int a = 0; for (int iy = 0; iy < 2; iy++) for (int ix = 0; ix < 2; ix++) { int offset = ((y * 2 + iy) * size + x * 2 + ix) * 4; r += (data[offset] & 0xff); g += (data[offset + 1] & 0xff); b += (data[offset + 2] & 0xff); a += (data[offset + 3] & 0xff); } result[halfOffset] = (byte) (r / 4); result[halfOffset + 1] = (byte) (g / 4); result[halfOffset + 2] = (byte) (b / 4); result[halfOffset + 3] = (byte) (a / 4); } return result; } public static void makeMipMap( BufferedImage image, String filename, Mode sMode, Mode tMode) throws IOException { int largerSide = Math.max(image.getWidth(), image.getHeight()); int size = 1; while (size < largerSide) size *= 2; FileOutputStream fos = new FileOutputStream(filename); BufferedOutputStream bos = new BufferedOutputStream(fos); DataOutputStream dos = new DataOutputStream(bos); dos.writeInt(size); dos.writeByte(sMode.getCode()); dos.writeByte(tMode.getCode()); BufferedImage squareImage = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB); AffineTransform af = new AffineTransform(); af.scale((float) size / image.getWidth(), (float) size / image.getHeight()); AffineTransformOp afop = new AffineTransformOp(af, AffineTransformOp.TYPE_BILINEAR); afop.filter(image, squareImage); byte[] data = new byte[size * size * 4]; for (int y = 0; y < size; y++) for (int x = 0; x < size; x++) { int offset = (y * size + x) * 4; int argb = squareImage.getRGB(x, y); data[offset] = (byte) (argb >> 16); data[offset + 1] = (byte) (argb >> 8); data[offset + 2] = (byte) argb; data[offset + 3] = (byte) (argb >> 24); } while (size >= 1) { dos.write(data); data = scaleDown(data, size); size /= 2; } dos.close(); flushMipMap(filename); } public static void makeMipMap( String imageFilename, String filename, Mode sMode, Mode tMode) throws IOException { File file = new File(imageFilename); BufferedImage image = ImageIO.read(file); makeMipMap(image, filename, sMode, tMode); } public static MipMap getMipMap(String filename) { MipMap result = (MipMap) map.get(filename); if (result == null) try { result = new MipMap(filename); map.put(filename, result); } catch (Exception e) { System.err.println("Can't load mipmap: " + filename); } return result; } public static void flushMipMap(String filename) { map.remove(filename); } private MipMap(String filename) throws IOException { FileInputStream fis = new FileInputStream(filename); FileChannel fc = fis.getChannel(); data = fc.map(FileChannel.MapMode.READ_ONLY, 0L, fc.size()); size = data.getInt(); sMode = Mode.getMode(data.get()); tMode = Mode.getMode(data.get()); levels = 1; int s = size; while (s > 1) { levels++; s /= 2; } levelOffsets = new int[levels]; levelSizes = new int[levels]; s = size; levelOffsets[0] = 6; levelSizes[0] = s; for (int i = 1; i < levels; i++) { levelOffsets[i] = levelOffsets[i - 1] + s * s * 4; s /= 2; levelSizes[i] = s; } } private float asFloat(int offset) { return (data.get(offset) & 0xff) / 255f; } private void getDataDirect(int s, int t, int level, int levelSize, float[] data) { int offset = levelOffsets[level]; offset += (t * levelSize + s) * 4; data[0] = asFloat(offset++); data[1] = asFloat(offset++); data[2] = asFloat(offset++); data[3] = asFloat(offset); } private void getData( int s, int t, int level, int levelSize, float[] data) { if (s < 0 || s >= levelSize) { if (sMode == Mode.BLACK) { data[0] = data[1] = data[2] = data[3] = 0f; return; } else if (sMode == Mode.CLAMP) s = Calc.clamp(s, 0, levelSize - 1); else if (sMode == Mode.PERIODIC) s &= (levelSize - 1); } if (t < 0 || t >= levelSize) { if (tMode == Mode.BLACK) { data[0] = data[1] = data[2] = data[3] = 0f; return; } else if (tMode == Mode.CLAMP) t = Calc.clamp(t, 0, levelSize - 1); else if (tMode == Mode.PERIODIC) t &= (levelSize - 1); } getDataDirect(s, t, level, levelSize, data); } private void getData(float s, float t, int level, float[] data) { int levelSize = levelSizes[level]; float rs = s * levelSize; int is =(int) Math.floor(rs); rs -= is; float rt = t * levelSize; int it = (int) Math.floor(rt); rt -= it; getData(is, it, level, levelSize, d00); getData(is + 1, it, level, levelSize, d10); getData(is, it + 1, level, levelSize, d01); getData(is + 1, it + 1, level, levelSize, d11); data[0] = Calc.interpolate(d00[0], d10[0], d01[0], d11[0], rs, rt); data[1] = Calc.interpolate(d00[1], d10[1], d01[1], d11[1], rs, rt); data[2] = Calc.interpolate(d00[2], d10[2], d01[2], d11[2], rs, rt); data[3] = Calc.interpolate(d00[3], d10[3], d01[3], d11[3], rs, rt); } private void getData(float s, float t, int level, float interp, float[] data) { getData(s, t, level, ll); getData(s, t, level + 1, lh); data[0] = Calc.interpolate(ll[0], lh[0], interp); data[1] = Calc.interpolate(ll[1], lh[1], interp); data[2] = Calc.interpolate(ll[2], lh[2], interp); data[3] = Calc.interpolate(ll[3], lh[3], interp); } public void getData(float s, float t, float area, float[] data) { float d = (float) Math.sqrt(area); d = Math.min(d, 1f); int id = (int) Math.floor(size * d); boolean singleLevel = (id == 0 || id == size); int level = 0; while (id > 1) { level++; id /= 2; } if (singleLevel) getData(s, t, level, data); else { float a = 1f / levelSizes[level]; float b = 1f / levelSizes[level + 1]; float interp = (d - a) / (b - a); getData(s, t, level, interp, data); } } } |
From: <ma...@us...> - 2003-06-12 18:35:47
|
Update of /cvsroot/jrman/drafts/src/org/jrman/maps In directory sc8-pr-cvs1:/tmp/cvs-serv2293/src/org/jrman/maps Log Message: Directory /cvsroot/jrman/drafts/src/org/jrman/maps added to the repository |
From: <ma...@us...> - 2003-06-07 18:38:48
|
Update of /cvsroot/jrman/drafts/src/org/jrman/render In directory sc8-pr-cvs1:/tmp/cvs-serv3793/src/org/jrman/render Modified Files: RendererHidden.java Log Message: Small changes... Index: RendererHidden.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/RendererHidden.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** RendererHidden.java 7 Jun 2003 13:25:32 -0000 1.31 --- RendererHidden.java 7 Jun 2003 18:38:44 -0000 1.32 *************** *** 103,107 **** Transform cameraToScreen = Global.getTransform("screen"); Transform screenToRaster = Global.getTransform("raster"); - // cameraToRaster = screenToRaster.concat(cameraToScreen); if (cameraToScreen instanceof PerspectiveTransform) cameraToRaster = ((PerspectiveTransform) cameraToScreen).preConcat(screenToRaster); --- 103,106 ---- *************** *** 182,186 **** cameraToRaster.transformPoint(ptmp2, ptmp2); vtmp.sub(ptmp1, ptmp2); ! bounds = bv.toBounds2f(vtmp.length()); } else { bounds = bv.toBounds2f(); --- 181,187 ---- cameraToRaster.transformPoint(ptmp2, ptmp2); vtmp.sub(ptmp1, ptmp2); ! float screenDisplacement = vtmp.length(); ! bounds = bv.toBounds2f(screenDisplacement); ! primitive.setScreenDisplacement(screenDisplacement); } else { bounds = bv.toBounds2f(); *************** *** 204,208 **** if (check && row <= curRow) { float maxY = bounds.getMaxY() - rasterWindow.getMinY(); ! int maxRow = Calc.clamp((int) (maxY / bucketHeight), 0, bucketRows - 1); if (maxRow < curRow) return; --- 205,209 ---- if (check && row <= curRow) { float maxY = bounds.getMaxY() - rasterWindow.getMinY(); ! int maxRow = Calc.clamp((int) Math.ceil(maxY / bucketHeight), 0, bucketRows - 1); if (maxRow < curRow) return; *************** *** 210,214 **** float maxX = bounds.getMaxX() - rasterWindow.getMinX(); int maxColumn = ! Calc.clamp((int) (maxX / bucketWidth), 0, bucketColumns - 1); if (column <= curColumn && curColumn <= maxColumn) { getBucket(curColumn, curRow).addPrimitive(primitive); --- 211,215 ---- float maxX = bounds.getMaxX() - rasterWindow.getMinX(); int maxColumn = ! Calc.clamp((int) Math.ceil(maxX / bucketWidth), 0, bucketColumns - 1); if (column <= curColumn && curColumn <= maxColumn) { getBucket(curColumn, curRow).addPrimitive(primitive); |
From: <ma...@us...> - 2003-06-07 18:38:48
|
Update of /cvsroot/jrman/drafts/sampleData In directory sc8-pr-cvs1:/tmp/cvs-serv3793/sampleData Modified Files: space.rib bike.rib DinningRoom.rib Log Message: Small changes... Index: space.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/space.rib,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** space.rib 3 Jun 2003 04:35:28 -0000 1.1 --- space.rib 7 Jun 2003 18:38:44 -0000 1.2 *************** *** 18,21 **** --- 18,22 ---- Rotate 90 1 0 0 AttributeBegin + Attribute "displacementbound" "sphere" .1 Displacement "bumpy" "texturename" "earth.4096x2048.jpg" "Km" .1 Sphere 250 -250 250 360 "texturename" "earth.4096x2048.jpg" *************** *** 26,29 **** --- 27,31 ---- AttributeBegin Translate -150 5 -300 + Attribute "displacementbound" "sphere" .1 Displacement "bumpy" "texturename" "moon.1440x720.1.jpg" "Km" .1 Rotate 90 1 0 0 *************** *** 37,40 **** --- 39,43 ---- Rotate 90 1 0 0 Color .6 .6 .6 + Attribute "displacementbound" "sphere" .5 Displacement "bumpy" "texturename" "mars.2880x1440.jpg" "Km" .5 Sphere 300 -300 300 360 "texturename" "mars.2880x1440.jpg" Index: bike.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/bike.rib,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** bike.rib 7 Jun 2003 13:25:32 -0000 1.4 --- bike.rib 7 Jun 2003 18:38:44 -0000 1.5 *************** *** 1,4 **** - #Option "statistics" "endofframe" 1 - #Option "limits" "bucketsize" [48 48] Display "bike" "framebuffer" "rgb" PixelFilter "box" 1 1 --- 1,2 ---- Index: DinningRoom.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/DinningRoom.rib,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** DinningRoom.rib 6 Jun 2003 15:29:29 -0000 1.9 --- DinningRoom.rib 7 Jun 2003 18:38:44 -0000 1.10 *************** *** 1,15 **** - Option "statistics" "endofframe" 1 - #Option "limits" "gridsize" 4096 - - Display "TableReflection.png" "file" "rgba" PixelSamples 4 4 ! Exposure .5 1 ! Format 320 240 1 Projection "perspective" "fov" [40] PixelFilter "box" 1 1 Scale 1 -1 1 Translate 0 0 170 ! Rotate 26 1 0 0 Rotate -40 0 1 0 --- 1,11 ---- Display "TableReflection.png" "file" "rgba" PixelSamples 4 4 ! Exposure .4 1 ! Format 512 384 1 Projection "perspective" "fov" [40] PixelFilter "box" 1 1 Scale 1 -1 1 Translate 0 0 170 ! Rotate 15 1 0 0 Rotate -40 0 1 0 *************** *** 128,137 **** PixelSamples 4 4 Exposure .2 1 ! Format 320 240 1 Projection "perspective" "fov" [40] PixelFilter "box" 1 1 Translate 0 0 170 Scale 1 -1 1 ! Rotate 26 1 0 0 Translate 0 51.8 0 Rotate -40 0 1 0 --- 124,133 ---- PixelSamples 4 4 Exposure .2 1 ! Format 512 384 1 Projection "perspective" "fov" [40] PixelFilter "box" 1 1 Translate 0 0 170 Scale 1 -1 1 ! Rotate 15 1 0 0 Translate 0 51.8 0 Rotate -40 0 1 0 *************** *** 261,265 **** PixelFilter "box" 1 1 Translate 0 0 170 ! Rotate -26 1 0 0 Rotate -40 0 1 0 --- 257,261 ---- PixelFilter "box" 1 1 Translate 0 0 170 ! Rotate -15 1 0 0 Rotate -40 0 1 0 |
From: <ma...@us...> - 2003-06-07 18:38:48
|
Update of /cvsroot/jrman/drafts/src/org/jrman/primitive In directory sc8-pr-cvs1:/tmp/cvs-serv3793/src/org/jrman/primitive Modified Files: Primitive.java Log Message: Small changes... Index: Primitive.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/primitive/Primitive.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Primitive.java 29 May 2003 22:45:12 -0000 1.16 --- Primitive.java 7 Jun 2003 18:38:43 -0000 1.17 *************** *** 77,81 **** public float getMinGridSize() { ! return 16f; } --- 77,81 ---- public float getMinGridSize() { ! return 4f; } |
From: <ma...@us...> - 2003-06-07 13:26:06
|
Update of /cvsroot/jrman/drafts/src/org/jrman/render In directory sc8-pr-cvs1:/tmp/cvs-serv13771/src/org/jrman/render Modified Files: SimpleMicropolygon.java RendererHidden.java Log Message: Small changes... Index: SimpleMicropolygon.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/SimpleMicropolygon.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SimpleMicropolygon.java 7 Jun 2003 12:29:32 -0000 1.2 --- SimpleMicropolygon.java 7 Jun 2003 13:25:32 -0000 1.3 *************** *** 143,152 **** int maxColumn = Calc.clamp( ! (int) Math.ceil(mpMaxX / sampler.getSampleWidth()), 0, sampler.getWidth() - 1); int maxRow = Calc.clamp( ! (int) Math.ceil(mpMaxY / sampler.getSampleHeight()), 0, sampler.getHeight() - 1); --- 143,152 ---- int maxColumn = Calc.clamp( ! (int) (mpMaxX / sampler.getSampleWidth()), 0, sampler.getWidth() - 1); int maxRow = Calc.clamp( ! (int) (mpMaxY / sampler.getSampleHeight()), 0, sampler.getHeight() - 1); Index: RendererHidden.java =================================================================== RCS file: /cvsroot/jrman/drafts/src/org/jrman/render/RendererHidden.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** RendererHidden.java 7 Jun 2003 12:29:32 -0000 1.30 --- RendererHidden.java 7 Jun 2003 13:25:32 -0000 1.31 *************** *** 204,208 **** if (check && row <= curRow) { float maxY = bounds.getMaxY() - rasterWindow.getMinY(); ! int maxRow = Calc.clamp((int) Math.ceil(maxY / bucketHeight), 0, bucketRows - 1); if (maxRow < curRow) return; --- 204,208 ---- if (check && row <= curRow) { float maxY = bounds.getMaxY() - rasterWindow.getMinY(); ! int maxRow = Calc.clamp((int) (maxY / bucketHeight), 0, bucketRows - 1); if (maxRow < curRow) return; *************** *** 210,214 **** float maxX = bounds.getMaxX() - rasterWindow.getMinX(); int maxColumn = ! Calc.clamp((int) Math.ceil(maxX / bucketWidth), 0, bucketColumns - 1); if (column <= curColumn && curColumn <= maxColumn) { getBucket(curColumn, curRow).addPrimitive(primitive); --- 210,214 ---- float maxX = bounds.getMaxX() - rasterWindow.getMinX(); int maxColumn = ! Calc.clamp((int) (maxX / bucketWidth), 0, bucketColumns - 1); if (column <= curColumn && curColumn <= maxColumn) { getBucket(curColumn, curRow).addPrimitive(primitive); *************** *** 233,239 **** int minColumn = Calc.clamp((int) (mpMinX / bucketWidth), 0, bucketColumns - 1); int minRow = Calc.clamp((int) (mpMinY / bucketHeight), 0, bucketRows - 1); ! int maxColumn = ! Calc.clamp((int) Math.ceil(mpMaxX / bucketWidth), 0, bucketColumns - 1); ! int maxRow = Calc.clamp((int) Math.ceil(mpMaxY / bucketHeight), 0, bucketRows - 1); for (int col = minColumn; col <= maxColumn; col++) for (int row = minRow; row <= maxRow; row++) --- 233,238 ---- int minColumn = Calc.clamp((int) (mpMinX / bucketWidth), 0, bucketColumns - 1); int minRow = Calc.clamp((int) (mpMinY / bucketHeight), 0, bucketRows - 1); ! int maxColumn = Calc.clamp((int) (mpMaxX / bucketWidth), 0, bucketColumns - 1); ! int maxRow = Calc.clamp((int) (mpMaxY / bucketHeight), 0, bucketRows - 1); for (int col = minColumn; col <= maxColumn; col++) for (int row = minRow; row <= maxRow; row++) |
From: <ma...@us...> - 2003-06-07 13:25:38
|
Update of /cvsroot/jrman/drafts/sampleData In directory sc8-pr-cvs1:/tmp/cvs-serv13771/sampleData Modified Files: bike.rib Log Message: Small changes... Index: bike.rib =================================================================== RCS file: /cvsroot/jrman/drafts/sampleData/bike.rib,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** bike.rib 29 May 2003 18:12:18 -0000 1.3 --- bike.rib 7 Jun 2003 13:25:32 -0000 1.4 *************** *** 1,2 **** --- 1,4 ---- + #Option "statistics" "endofframe" 1 + #Option "limits" "bucketsize" [48 48] Display "bike" "framebuffer" "rgb" PixelFilter "box" 1 1 |