POV-Ray : Newsgroups : povray.general : Not grokking mesh camera Server Time
1 Mar 2024 16:47:55 EST (-0500)
  Not grokking mesh camera (Message 11 to 17 of 17)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Bald Eagle
Subject: Re: Not grokking mesh camera
Date: 5 May 2023 18:50:00
Message: <web.6455876669f793731f9dae3025979125@news.povray.org>
Josh English <Jos### [at] joshuarenglishcom> wrote:
> But bezier patches? That's a cruel challenge.

Not even remotely.

> I don't know how to
> convert a patch to a mesh in the first place. That's why I used them: to
> let POV-Ray do the hard work.

Mr. English, my dear Sir, TOK and I have done all of the hard work, and you may
generate a mesh of triangles from any Bezier patch that you wish.

You're not even subject to the u and v step limits for rendering the patch,
since you'll be custom generating the mesh in SDL.

Here ya go:


Post a reply to this message


Attachments:
Download 'beziertrianglemesh.pov.txt' (11 KB)

From: jr
Subject: Re: Not grokking mesh camera
Date: 6 May 2023 06:25:00
Message: <web.64562a9869f7937358c093306cde94f1@news.povray.org>
hi,

Josh English <Jos### [at] joshuarenglishcom> wrote:
> ...
> I found the mistake that is causing the skewed image. ...

thank you (very much).  this has set me on yet-another-unexpected-detour :-)


> Live and learn.
> Well ... live.

+1


regards, jr.


Post a reply to this message

From: jr
Subject: Re: Not grokking mesh camera
Date: 7 May 2023 08:15:00
Message: <web.645795fb69f7937358c093306cde94f1@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> ...
> this has set me on yet-another-unexpected-detour :-)

first WIP, with the 'z' components of the triangle corners "jiggled", a little.


regards, jr.


Post a reply to this message


Attachments:
Download 'mc_wip.png' (296 KB)

Preview of image 'mc_wip.png'
mc_wip.png


 

From: Bald Eagle
Subject: Re: Not grokking mesh camera
Date: 7 May 2023 11:30:00
Message: <web.6457c38169f793731f9dae3025979125@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> "jr" <cre### [at] gmailcom> wrote:
> > ...
> > this has set me on yet-another-unexpected-detour :-)
>
> first WIP, with the 'z' components of the triangle corners "jiggled", a little.
>
>
> regards, jr.

That's pretty cool.

I like the "blurred" effect that it gives.  I wonder if there's any way to fill
in some the graininess in the first pass, or maybe a custom convolution kernel
could be used for a second pass to "correct" the rgb 0 pixels that --- I guess
missed hitting anything in the scene.

What if you jiggle not every pixel randomly, but every row as a whole?

I can imagine that one could apply sine waves and other curves to the mesh and
get a sort of fun-house mirror effect ... maybe.

As I understand it, you can layer / sum mesh cameras?  Some interesting
experiments to be done there, I'm sure.

- BE


Post a reply to this message

From: Josh English
Subject: Re: Not grokking mesh camera
Date: 8 May 2023 01:52:21
Message: <64588e15$1@news.povray.org>
On 5/7/2023 8:28 AM, Bald Eagle wrote:

> 
> As I understand it, you can layer / sum mesh cameras?  Some interesting
> experiments to be done there, I'm sure.
> 
> - BE
> 

Exactly. I just posted an image of my desert towers with a cheesy effect 
that took 4 hours to render, which is for me a long time.

The mesh_camera can fire many rays for each pixel, one ray per defined 
mesh, and add them together.

And since you probably have a defined mesh, you can include it in the 
scene file itself with a texture and it will effect every pixel. It's 
kind of like screen.inc magic but with any projection type, even the 
whacked out things mesh_cameras can do.

I'm still trying to solve a few problems and then I have to figure out 
how to post my tutorial on what I've learned.

Josh


Post a reply to this message

From: jr
Subject: Re: Not grokking mesh camera
Date: 8 May 2023 08:55:00
Message: <web.6458f0b969f7937358c093306cde94f1@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> ...
> What if you jiggle not every pixel randomly, but every row as a whole?
> I can imagine that one could apply sine waves and other curves to the mesh and
> get a sort of fun-house mirror effect ... maybe.

yes.  as written, that is starting with stuff copied + modified from the
distribution mesh_cam scene/inc, there isn't really a good way of picking a
subset (of triangles) to treat separately.  (will put together an email, later
or tomorrow)


> As I understand it, you can layer / sum mesh cameras?  Some interesting
> experiments to be done there, I'm sure.

yes, and agree, interesting stuff ahead.


regards, jr.


Post a reply to this message

From: Josh English
Subject: Re: Not grokking mesh camera
Date: 8 May 2023 11:29:44
Message: <64591568$1@news.povray.org>
On 5/8/2023 5:53 AM, jr wrote:
> hi,
> 
> "Bald Eagle" <cre### [at] netscapenet> wrote:
>> ...

> yes.  as written, that is starting with stuff copied + modified from the
> distribution mesh_cam scene/inc, there isn't really a good way of picking a
> subset (of triangles) to treat separately.  (will put together an email, later
> or tomorrow)
> 
> 

Actually, I've been playing with that, too, but the image is not so 
great because I'm a crappy modeller. This technique is based of Jaime's 
macros. I've been directly calculation the location of each spline out 
of stubbornness. Jaime relies on the trace function, which means you can 
filter the triangles with an object. I think his method using trace is 
superior to mine. I had to reinvent some wheels to get to a point of 
understanding, though.

In the attached image the sky and clouds and "grass" are all fairly 
normal (the "grass" is a plane at y=0), but the attempt at a starry 
water scene is actually sitting at y=-20.

Cheers.


Post a reply to this message


Attachments:
Download 'portal_test.png' (153 KB)

Preview of image 'portal_test.png'
portal_test.png


 

<<< Previous 10 Messages Goto Initial 10 Messages

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