I tried to use Glow to create a neon light effect on a torus object. The result shown on the left of the picture below looks quite different from the real one on the right. Is there a way to obtain a better result?

(* Assuming the .obj file located in the root of c: *)
model =  Import["c:\\torus.obj"] ;
 Graphics3D[{Glow[Cyan], First[model ] }, Boxed -> False ,
 Background -> Black

enter image description here


This rasters the image first and then applies a convolution to the 2d image. At the end, the result is combined whith the image rendered with "Glow":

model = Import["../torus.obj"];
hColor = RGBColor[0.2, 0.5, 1];
img = Graphics3D[{hColor, Opacity[0.5], EdgeForm[hColor], 
   First[model][[2 ;; -1]]}, Boxed -> False, Background -> Black];
img0 = Graphics3D[{Glow[Cyan], Opacity[0.9], First[model]}, 
   Boxed -> False, Background -> Black];
cv = Table[
ImageMultiply[ImageConvolve[img, GaussianMatrix[{r, r/3}]], 
r/15], {r, {10, 50, 150}}];
ImageAdd[img0, ImageAdd[cv]]

enter image description here

You might have to play a bit with the parameters to get the desired result.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.