Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have the following function:

normalSpheres = 
 Table[Sphere[RandomVariate[NormalDistribution[0, 10], 3], .2], {500}];

Manipulate[
 Graphics3D[normalSpheres, Background -> Black, ViewAngle -> 1, 
  ViewVector -> {{50 Sin[t], 50 Cos[t], 0}, {0, 0, 0}}, 
  ImageSize -> Large], {t, 0, 2 Pi}]

enter image description here

I want to imbue this with a feeling of depth though. The best way I can think of is by creating a blur effect for each Sphere that increases the further away the object is from the ViewPoint (or ViewVector[[1]] in this case).

Does anybody have any tips on how I could achieve this?

P.S. sorry if the GIF makes anyone dizzy...

Keyword: depth of field

share|improve this question
1  
It's hard to do blurring of any sort — depth of field, motion blur, etc. — in the traditional hardware rendering pipeline, which is what I believe Mathematica uses for its 3D graphics. To depict fuzzy, blurry things (like smoke and fire) in games one typically uses sprites, i.e. predefined 2D images with transparency that are inserted into the 3D scene. One could try the same thing here by precomputing images of 3D spheres with varying amounts of blur. But that's more work than I'm willing to attempt right now :) –  Rahul Narain May 16 at 4:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.