Group Abstract Group Abstract

Message Boards Message Boards

2
|
12.4K Views
|
12 Replies
|
9 Total Likes
View groups...
Share
Share this post:

Rasterizing large Graphics3D with antialiasing

Dear All,

I trying to render a complex Graphics3D scene (roughly 300.000 polygons with different kinds of lights on it). To exemplify my problem I have the following code with just 6 polygons:

SetDirectory[NotebookDirectory[]];
$HistoryLength=1;
gr=Graphics3D[{EdgeForm[],FaceForm[White],Cuboid[]},Background->Black,PlotRange->4,Lighting->"Neutral",Boxed->False,ImageSize->4{1920,1080}];
Export["tmp1.png",Image[gr,ImageSize->1{1920,1080}]]
Export["tmp2.png",Image[gr,ImageSize->2{1920,1080}]]

which just creates a single white cuboid with a black background. If I open tmp1.png I will see a anti-aliased result.

enter image description here

But for tmp2.png i will not get this:

enter image description here

Even by setting the Antialiasing option to Cube by using Style does not work. Or by Using Antialiasing -> True as a directive in the Graphics3D also does not work. I also have tried Rasterize but I'm pretty sure Rasterize[gr,"Image",RasterSize->{w,h}] and Image[gr,ImageSize->{w,h}] are basically the same thing.

POSTED BY: Sander Huisman
12 Replies
Attachments:
POSTED BY: Vitaliy Kaurov

Hi Vitaliy!

That's a very nice idea! I'll try it! I'm trying to output 300 high res images to make a movie. This will take some time and file-management. Thanks a lot for this idea!

If I may ask: Where did you find this info?

2^14 by 2^14 is of course quite a few pixels, so I can't blame Mac I guess...

The software-renderer should overcome this right? or is it still OpenGL?

POSTED BY: Sander Huisman

I successfully applied your technique and it works beautifully. I now creates 100Megapixel stills that were antialiased 4x (so 1.6 GigaPixel stills actually). works very neat! Thanks a bunch!

POSTED BY: Sander Huisman
method = {"HardwareDepthBuffer", "HardwareDepthPeeling", "BSPTree", "Software"};
method = method[[4]]
SetOptions[$FrontEndSession,  RenderingOptions -> {"Graphics3DRenderingEngine" -> method}];
SetOptions[EvaluationNotebook[], RenderingOptions -> {"Graphics3DRenderingEngine" -> method}];
CurrentValue[$FrontEnd, {RenderingOptions, "Graphics3DRenderingEngine"}] = MethodOptions;
CurrentValue[$FrontEndSession, {"Antialiasing"}] = True;
CurrentValue[EvaluationNotebook[], {"Antialiasing"}] = True;
CurrentValue[$FrontEnd, {"Antialiasing"}] = True;

Also setting these kinds of options did not result in High-resolution, antialiased figures.... Any more ideas?

POSTED BY: Sander Huisman

enter image description here

POSTED BY: Simon Cadrin

Hi Simon, this doesn't help me: of course I know that I should use the Rasterize command!

POSTED BY: Sander Huisman

enter image description here

POSTED BY: Simon Cadrin

There is no such equivalent on Mac OS X.

POSTED BY: Sander Huisman

enter image description here

POSTED BY: Simon Cadrin

I know about ImageResolution. But it will be ignored once RasterSize is supplied as an option. Thanks for the suggestion

POSTED BY: Sander Huisman

enter image description here

POSTED BY: Simon Cadrin

Hi Simon,

This setting is of course set to its highest quality. Thanks for the suggestion though!

--Sander

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard