POV-Ray : Newsgroups : povray.general : Could Pov-Ray render these dark edge lines? Server Time
29 Jul 2024 06:28:38 EDT (-0400)
  Could Pov-Ray render these dark edge lines? (Message 1 to 6 of 6)  
From: edgestone
Subject: Could Pov-Ray render these dark edge lines?
Date: 21 Jan 2013 08:35:01
Message: <web.50fd4378abf411826e0f84410@news.povray.org>
In solidworks and some other 3D software, the edge lines (normally in the color
of black) of an assembly can be shown to give clear boundary of parts. I
appreciate any help on if Pov-ray could render these dark edge lines, and how.

Sorry I am not allowed to post a picture to make questions more straightforward.

Thanks a lot.

YF


Post a reply to this message

From: clipka
Subject: Re: Could Pov-Ray render these dark edge lines?
Date: 21 Jan 2013 09:07:35
Message: <50fd4ba7$1@news.povray.org>
Am 21.01.2013 14:32, schrieb edgestone:
> In solidworks and some other 3D software, the edge lines (normally in the color
> of black) of an assembly can be shown to give clear boundary of parts. I
> appreciate any help on if Pov-ray could render these dark edge lines, and how.

It's not supported out of the box, but this is how I'd tackle it:

- Render the assembly with a transparent background.

- Convert the transparency channel into a black-and-white image (black 
assembly, white background)

- Overlay multiple slightly translated copies of the BW image, (A) in 
multiplicative mode (giving you a slightly larger black-on-white 
silhouette of the assembly) and (B) in additive mode (giving you a 
slightly smaller black-on-white silhouette).

- Invert the image from (B) (giving you a slightly smaller 
white-on-black silhouette).

- Overlay the images (A) and (B) in additive mode (giving you a 
black-on-white outline of the assembly).

- Overlay the resulting image with the original assembly render, in 
multiplicative mode (giving you a black-outlined image of the assembly).


Post a reply to this message

From: scott
Subject: Re: Could Pov-Ray render these dark edge lines?
Date: 21 Jan 2013 09:27:47
Message: <50fd5063$1@news.povray.org>
> In solidworks and some other 3D software, the edge lines (normally in the color
> of black) of an assembly can be shown to give clear boundary of parts. I
> appreciate any help on if Pov-ray could render these dark edge lines, and how.
>
> Sorry I am not allowed to post a picture to make questions more straightforward.

Are you talking about objects created in POV, or ones you have exported 
from other 3D software? IIRC one of the command-line converters I used 
to convert to POV (maybe slp2pov.exe?) had the option of generating 
cylinders and spheres along the edges of a configurable diameter. This 
looked really good for renders of technical objects.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Could Pov-Ray render these dark edge lines?
Date: 22 Jan 2013 12:36:45
Message: <50fece2d$1@news.povray.org>
Generally this is easy for a scanline render working on polygons
but tricky with raytraced CSG. If you have (or can generate) a mesh
you could try

http://tuabiht.chez-alice.fr/PovEdge_Site/PovEdge.html

Also, for smoothly curved objects you can highlight their
outer contours using the aoi pattern.


Post a reply to this message

From: Samuel Benge
Subject: Re: Could Pov-Ray render these dark edge lines?
Date: 22 Jan 2013 14:30:01
Message: <web.50fee856c4eac8c2d92b408d0@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
>
> Also, for smoothly curved objects you can highlight their
> outer contours using the aoi pattern.

That might work in theory, but in practice it usually looks terrible.

Here's something I've used that works fairly well for outlining an object:

#declare MyObj =
 union{
  box{-1, 1 scale <1, .2, .2>}
  box{-1, 1 scale <.2, 1, .2>}
  box{-1, 1 scale <.2, .2, 1>}
 }

#declare NPts = 32; // number of "samples"
#declare Rad = .04; // outline thickness

// the object rendered normally
object{MyObj pigment{rgb 1}}

// the object's outline
merge{
 // the Golden Spiral laid out onto a sphere
 #local Inc = pi * (3 - sqrt(5));
 #local Off = 2 / NPts;
 #for(K, 0, NPts-1)
  #local Y = K * Off - 1 + (Off / 2);
  #local R = sqrt(1 - Y*Y);
  #local Phi = K * Inc;
  object{
   MyObj
   translate <cos(Phi)*R, Y, sin(Phi)*R>*Rad
  }
 #end
 texture{pigment{rgbt 1}}
 // the color of the outline
 interior_texture{
  pigment{rgb z/4}
  finish{ambient 1 diffuse 0}
 }
 no_shadow
}

There will be artifacts which may or may not be eliminated by choosing points
throughout a sphere, not just on the surface of one.

Speaking of which... if one of you math geniuses out there could produce a means
for distributing points /within/ a sphere using the Golden Spiral, that would
help a lot (it would help make a great proximity pattern).

Sam


Post a reply to this message

From: scott
Subject: Re: Could Pov-Ray render these dark edge lines?
Date: 12 Feb 2013 07:36:26
Message: <511a374a$1@news.povray.org>
> Are you talking about objects created in POV, or ones you have exported
> from other 3D software? IIRC one of the command-line converters I used
> to convert to POV (maybe slp2pov.exe?) had the option of generating
> cylinders and spheres along the edges of a configurable diameter. This
> looked really good for renders of technical objects.

I found it, it was vrml2pov, one of the command line options makes it 
create cylinders/spheres in pov of a specified radius to highlight the 
edges.

It will allow you to get results like this:

http://www.griffinds.jp/products/Drop3D/img/SmartPhonesmall.jpg


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.