Package org.jwildfire.create.tina.render

Examples of org.jwildfire.create.tina.render.RenderedFlame


          FlameRenderer renderer = new FlameRenderer(flame, prefs, false, true);
          renderer.setProgressUpdater(null);
          flame.setSampleDensity(50);
          flame.setSpatialFilterRadius(0.0);
          RenderInfo info = new RenderInfo(imgWidth, imgHeight, RenderMode.PREVIEW);
          RenderedFlame res = renderer.renderFlame(info);
          currThumbnail = new ImageIcon(res.getImage().getBufferedImg());
        }
      }
    }
    catch (Exception ex) {
      currThumbnail = null;
View Full Code Here


          FlameRenderer renderer = new FlameRenderer(flame, Prefs.getPrefs(), false, false);
          renderer.setProgressUpdater(null);
          flame.setSampleDensity(Prefs.getPrefs().getTinaRenderRealtimeQuality() * 6.0);
          flame.setSpatialFilterRadius(0.0);
          RenderedFlame res = renderer.renderFlame(info);
          imgPanel.setImage(res.getImage());
        }
        finally {
          flame.setSpatialFilterRadius(oldSpatialFilterRadius);
          flame.setSampleDensity(oldSampleDensity);
        }
View Full Code Here

            }
            else {
              renderer.setProgressUpdater(renderSequenceProgressUpdater);
              flame.setSampleDensity(prefs.getTinaRenderPreviewQuality());
            }
            RenderedFlame res = renderer.renderFlame(info);
            imgPanel.setImage(res.getImage());
          }
          finally {
            flame.setSpatialFilterRadius(oldSpatialFilterRadius);
            flame.setSampleDensity(oldSampleDensity);
          }
View Full Code Here

        layer.setPalette(palette);
      }
      flame = randGen.postProcessFlame(randGenState, flame);
      // render it  
      flame.setSampleDensity(25);
      RenderedFlame renderedFlame;
      flame.setAntialiasAmount(0.0);

      try {
        FlameRenderer renderer = new FlameRenderer(flame, prefs, false, true);
        renderedFlame = renderer.renderFlame(info);
      }
      finally {
        flame.setAntialiasAmount(prefs.getTinaDefaultAntialiasingAmount());
      }
      if (j == quality.getMaxSamples() - 1) {
        renderedFlame = new FlameRenderer(bestFlame, prefs, false, true).renderFlame(info);
        return new RandomFlameGeneratorSample(bestFlame, renderedFlame.getImage());
      }
      else {
        double fCoverage = calculateCoverage(renderedFlame.getImage(), bgRed, bgGreen, bgBlue, randGen.isUseFilter(randGenState));
        if (fCoverage >= quality.getCoverage()) {
          return new RandomFlameGeneratorSample(flame, renderedFlame.getImage());
        }
        else {
          if (bestFlame == null || fCoverage > bestCoverage) {
            bestFlame = flame;
            bestCoverage = fCoverage;
View Full Code Here

          flame.setHeight(info.getImageHeight());

          Flame renderFlame = new FlamePreparer(prefs).createRenderFlame(flame);
          FlameRenderer renderer = new FlameRenderer(renderFlame, prefs, false, false);
          renderer.setProgressUpdater(null);
          RenderedFlame res = renderer.renderFlame(info);
          SimpleImage img = res.getImage();
          if (pDrawFPS) {
            TextTransformer txt = new TextTransformer();
            txt.setText1("fps: " + Tools.doubleToString(pFPS) + ", time: " + Tools.doubleToString(pFrame / 1000.0) + "s");
            txt.setAntialiasing(false);
            txt.setColor(Color.LIGHT_GRAY);
View Full Code Here

        flame.setWidth(info.getImageWidth());
        flame.setHeight(info.getImageHeight());
        Flame renderFlame = new FlamePreparer(prefs).createRenderFlame(flame);
        FlameRenderer renderer = new FlameRenderer(renderFlame, prefs, false, false);
        renderer.setProgressUpdater(null);
        RenderedFlame res = renderer.renderFlame(info);
        imgPanel.setImage(res.getImage());
      }
      else {
        imgPanel.setImage(new SimpleImage(width, height));
      }
    }
View Full Code Here

      renderFlame.setPixelsPerUnit((wScl + hScl) * 0.5 * renderFlame.getPixelsPerUnit());
      renderFlame.setWidth(pImgWidth);
      renderFlame.setHeight(pImgHeight);
      renderFlame.setSampleDensity(prefs.getTinaRenderPreviewQuality() / 3.0);
      FlameRenderer renderer = new FlameRenderer(renderFlame, prefs, false, true);
      RenderedFlame renderRes = renderer.renderFlame(info);
      return renderRes.getImage();
    }
    return null;
  }
View Full Code Here

        flame.setHeight(info.getImageHeight());

        FlameRenderer renderer = new FlameRenderer(flame, prefs, data.toggleTransparencyButton.isSelected(), false);
        flame.setSampleDensity(prefs.getTinaRenderRealtimeQuality());
        flame.setSpatialFilterRadius(0.0);
        RenderedFlame res = renderer.renderFlame(info);
        imgPanel.setImage(res.getImage());
      }
      else {
        imgPanel.setImage(new SimpleImage(width, height));
      }
    }
View Full Code Here

        }
      }
      if (chooser.showSaveDialog(imageRootPanel) == JFileChooser.APPROVE_OPTION) {
        File file = chooser.getSelectedFile();
        prefs.setLastOutputImageFile(file);
        RenderedFlame res = renderer.finishRenderFlame(displayUpdater.getSampleCount());
        new ImageWriter().saveImage(res.getImage(), file.getAbsolutePath());
        if (res.getHDRImage() != null) {
          new ImageWriter().saveImage(res.getHDRImage(), file.getAbsolutePath() + ".hdr");
        }
        if (res.getHDRIntensityMap() != null) {
          new ImageWriter().saveImage(res.getHDRIntensityMap(), file.getAbsolutePath() + ".intensity.hdr");
        }
        if (prefs.isTinaSaveFlamesWhenImageIsSaved()) {
          new FlameWriter().writeFlame(getCurrFlame(), file.getParentFile().getAbsolutePath() + File.separator + Tools.trimFileExt(file.getName()) + ".flame");
        }
      }
View Full Code Here

              else {
                flame.setSampleDensity(job.getCustomQuality() > 0 ? job.getCustomQuality() : qualityProfile.getQuality());
                FlameRenderer renderer = new FlameRenderer(flame, Prefs.getPrefs(), flame.isBGTransparency(), false);
                renderer.setProgressUpdater(controller.getJobProgressUpdater());
                long t0 = Calendar.getInstance().getTimeInMillis();
                RenderedFlame res = renderer.renderFlame(info);
                long t1 = Calendar.getInstance().getTimeInMillis();
                job.setElapsedSeconds(((double) (t1 - t0) / 1000.0));
                new ImageWriter().saveImage(res.getImage(), primaryFilename);
                if (res.getHDRImage() != null) {
                  new ImageWriter().saveImage(res.getHDRImage(), job.getImageFilename(flame.getStereo3dMode()) + ".hdr");
                }
                if (res.getHDRIntensityMap() != null) {
                  new ImageWriter().saveImage(res.getHDRIntensityMap(), job.getImageFilename(flame.getStereo3dMode()) + ".intensity.hdr");
                }
              }
              job.setFinished(true);
              try {
                {
View Full Code Here

TOP

Related Classes of org.jwildfire.create.tina.render.RenderedFlame

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.