POV-Ray : Newsgroups : povray.general : any hidden line rendering api? Server Time
29 Jul 2024 20:14:12 EDT (-0400)
  any hidden line rendering api? (Message 11 to 20 of 20)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: bart
Subject: Re: any hidden line rendering api?
Date: 23 Dec 2010 09:53:22
Message: <4d136262$1@news.povray.org>
On 12/23/2010 09:01 AM, optima wrote:
> Thank you for all the answers,
>
> Bart didn' include the path to his suggestion,
The link was included, but for some reason it does not show up in a web 
interface. Try this one: http://tinyurl.com/2v26464
or google for "edgeFinder.pov for MegaPOV".
It produces outlines similar to your example.


Post a reply to this message

From: Warp
Subject: Re: any hidden line rendering api?
Date: 23 Dec 2010 10:21:59
Message: <4d136917@news.povray.org>
optima <jes### [at] yahoocom> wrote:
> I dont understand how other kitchen design applications do it. Cause all
> interior design apps I saw have different viewing modes. One of them is
> hiddenlines(at least 20-20 calls it that, it may have other names too).

> http://www.kitchendesigned.com/tmp/textured_render.jpg

> http://www.kitchendesigned.com/tmp/hidden_line_render.jpg

  I'm wondering if the term you are seeking is "wireframe", which is
a common concept in modelers, many renderers and computer graphics APIs
(such as OpenGL and DirectX). In other words, just render the polygon edges
(or certain polygon edges in some cases) rather than full-blown shaded
polygons.

  POV-Ray doesn't support wireframe rendering because of mainly two reasons:
It can only be done feasibly to objects consisting of polygons, and wireframe
rendering is a completely independent and separate drawing method from
raytracing. POV-Ray only supports raytracing.

-- 
                                                          - Warp


Post a reply to this message

From: Stephen
Subject: Re: any hidden line rendering api?
Date: 23 Dec 2010 12:31:33
Message: <4d138775$1@news.povray.org>
On 23/12/2010 2:43 PM, optima wrote:
> clipka<ano### [at] anonymousorg>  wrote:
>> It will not capture sharp edges though, such as the outline of a box.
>
> It must especially capture the edges of a box, because mostly it will be used to
> outline the edges of a kitchen design which is basically made of boxes
> representing cabinets.

IIRC Moray has a WireFramer plugin which "allows you to turn the 
wireframe of a primitive object to a solid wireframe representation made 
of cylinders and spheres. "

But you would have to recreate your work in Moray which only works with 
Pov Ver 3.5.

There is a macro in the povray distrabution that might give you an idea 
or two. It is bounding.pov (...POV-Ray\v3.7\scenes\language\ bounding.pov)

-- 
Regards
     Stephen


Post a reply to this message

From: clipka
Subject: Re: any hidden line rendering api?
Date: 23 Dec 2010 12:56:05
Message: <4d138d35$1@news.povray.org>
Am 23.12.2010 15:43, schrieb optima:

> I dont understand how other kitchen design applications do it. Cause all
> interior design apps I saw have different viewing modes. One of them is
> hiddenlines(at least 20-20 calls it that, it may have other names too).

Such applications normally use triangle meshes as the underlying 
geometric representation, and (at least in hidden lines mode) rendering 
algorithms totally different from raytracing, akin to those used in 
computer games.

To do it with raytracing, you'd have to...

(1) store some more information in the image buffer in addition to the 
computed colours, namely the distance to the object at a given pixel, 
and the surface normal at that point;

(2) after rendering, postprocess the image buffer to find sudden changes 
in (a) depth (indicating the outline of an object), (b) surface normals 
(indicating a non-outline edge of an object), and/or (c) color 
(indicating the boundary between two materials; this one is actually 
optional; note that it could also indicate the outline of a shadow, so 
you'd probably want to use flat shading for such a scene).


Post a reply to this message

From: optima
Subject: Re: any hidden line rendering api?
Date: 23 Dec 2010 17:50:01
Message: <web.4d13d0b49f4bc9d4804e8730@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
>
> Such applications normally use triangle meshes as the underlying
> geometric representation, and (at least in hidden lines mode) rendering
> algorithms totally different from raytracing, akin to those used in
> computer games.

I also use meshes(if by saying triangle mesh you mean models exported from
3dsmax ) yes they make up 99% of my models in a scene only walls are drawn by
povray macro.
>
> To do it with raytracing, you'd have to...
I dont necessarily have to use povray to accomplish this goal, povray is already
doing the heavy lifting by producing beautiful 3d textured images.
I just need a way to produce simple(?) hidden lines of models as depicted in
some images I posted.

I gather this is no easy task in any environment, maybe except for autocad
applications. I mean my 3d needs are based on and provided for by povray and
xna.
If I based my 3d rendering needs on autocad based (maybe dwg files) it would be
a whole lot easier to accomplish the hidden line rendering objective.

As I realize other applications I was talking about are almost all of them are
based on autocad like (or similar to autocad, definitely)rendering techniques.

I am not about to give up povray and xna for this hidden line stuff, on the
contrary I might give up on hidden lines to keep povray and xna. But I think
autocad based drawing is somewhat more friendly to hidden line rendering.

thank you very much


Post a reply to this message

From: Darren New
Subject: Re: any hidden line rendering api?
Date: 23 Dec 2010 18:25:42
Message: <4d13da76$1@news.povray.org>
optima wrote:
> contrary I might give up on hidden lines to keep povray and xna. But I think

What's wrong with the XNA-based technique I described?

-- 
Darren New, San Diego CA, USA (PST)
   Serving Suggestion:
     "Don't serve this any more. It's awful."


Post a reply to this message

From: Alain
Subject: Re: any hidden line rendering api?
Date: 23 Dec 2010 19:15:05
Message: <4d13e609$1@news.povray.org>

> clipka<ano### [at] anonymousorg>  wrote:
>>
>> Such applications normally use triangle meshes as the underlying
>> geometric representation, and (at least in hidden lines mode) rendering
>> algorithms totally different from raytracing, akin to those used in
>> computer games.
>
> I also use meshes(if by saying triangle mesh you mean models exported from
> 3dsmax ) yes they make up 99% of my models in a scene only walls are drawn by
> povray macro.
>>
>> To do it with raytracing, you'd have to...
> I dont necessarily have to use povray to accomplish this goal, povray is already
> doing the heavy lifting by producing beautiful 3d textured images.
> I just need a way to produce simple(?) hidden lines of models as depicted in
> some images I posted.
>
> I gather this is no easy task in any environment, maybe except for autocad
> applications. I mean my 3d needs are based on and provided for by povray and
> xna.
> If I based my 3d rendering needs on autocad based (maybe dwg files) it would be
> a whole lot easier to accomplish the hidden line rendering objective.
>
> As I realize other applications I was talking about are almost all of them are
> based on autocad like (or similar to autocad, definitely)rendering techniques.
>
> I am not about to give up povray and xna for this hidden line stuff, on the
> contrary I might give up on hidden lines to keep povray and xna. But I think
> autocad based drawing is somewhat more friendly to hidden line rendering.
>
> thank you very much
>
>

If you are only interested is seeing the shape of the objects, with 
colouration, you can use +q0 on the command line.
This is the quality setting at it's lowest value.

This gives an image using only full ambient illumination ignoring all 
normals, reflections, light and shadows. Everything have flat shades.

But, it will not highlight the edges of your objects.


Alain


Post a reply to this message

From: clipka
Subject: Re: any hidden line rendering api?
Date: 23 Dec 2010 20:06:45
Message: <4d13f225$1@news.povray.org>
Am 23.12.2010 23:44, schrieb optima:

> I dont necessarily have to use povray to accomplish this goal, povray is already
> doing the heavy lifting by producing beautiful 3d textured images.
> I just need a way to produce simple(?) hidden lines of models as depicted in
> some images I posted.

Then maybe you're better off asking for this in a XNA forum?

I have no idea what tools XNA provides in this respect; but if I had to 
design an outlining algorithm, I'd proceed as follows:

(1) For each triangle of the mesh, determine the three adjacent triangles.

(2) Draw all the triangles in Z-order (or using a Z-buffer) as follows:

- draw the triangle itself in plain white

- for each of the three edges, examining the neighbor triangle

- if any neighbor triangle is missing, draw the respective edge in plain 
black (this draws the "rim" of non-closed meshes)

- if the dot product of the viewing direction and the surface normal of 
a neighbor triangle has a different sign than the same value for the 
current triangle, draw the respective edge in plain black (this draws 
the outline of the mesh)

- if the dot product of the neighbor triangle's and current triangle's 
normalized suface normals is below a certain threshold, draw the 
respective edge in plain black or grey (this draws sharp edges)

This would normally require a mix of triangle-based and wireframe-based 
rendering; in case XNA doesn't provide such a mode, you could work 
around by implementing a pixel shader that colors the pixels depending 
on the distance to the edge(s) that need to have a line drawn. You might 
need to do the triangle examination beforehand though, and mark the 
respective vertices, too, to avoid artifacts near the vertices.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: any hidden line rendering api?
Date: 27 Dec 2010 17:51:13
Message: <4d191861@news.povray.org>
optima wrote:

> I wonder what do I need to do to get renderings like this from povray?

on smoothly curved surface such as this you might
try using an aoi pattern (giving black when the surface
is viewed at a very shallow angle only).

If you have meshes you can try PovEdge:

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

But in most cases, you will actually need to model
the edges as geometry (e.g. use thin cylinder/torus).


Post a reply to this message

From: Christian Froeschlin
Subject: Re: any hidden line rendering api?
Date: 27 Dec 2010 17:54:54
Message: <4d19193e@news.povray.org>
Christian Froeschlin wrote:

> stuff that wasn't new at all

I'd better remember to scroll down before replying ;)


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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