POV-Ray : Newsgroups : povray.general : Mesh rendering artifacts Server Time
2 May 2024 07:20:08 EDT (-0400)
  Mesh rendering artifacts (Message 31 to 40 of 63)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: jr
Subject: Re: Mesh rendering artifacts
Date: 31 Jan 2023 07:05:00
Message: <web.63d90348249f0076fbdc16836cde94f1@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> ...
> I truly do need to sit down and work with Emacs, Vim, awk, etc and figure out
> how to do all the "word processing" tricks.

if your after-tax earnings allow :-), there's O'Reilly's excellent 'sed & awk',
by Dougherty & Robbins.


regards, jr.


Post a reply to this message

From: Bald Eagle
Subject: Re: Mesh rendering artifacts
Date: 31 Jan 2023 07:10:00
Message: <web.63d9049d249f00761f9dae3025979125@news.povray.org>
"yesbird" <nomail@nomail> wrote:

> You are the wizard - what a beauty those normals !


Setting D to zero and dividing the camera location by 4 to zoom in, the normals
all look the same.

Copying the data into Open Office, I see clusters of 3 and 6 in the smaller
normal vectors, so it looks like they're numerically the same as well.

Harder to tell with the colors.  I'd maybe need to restructure the array
definitions to look at them numerically, but you could just zoom in and compare
them by eye to make sure there's no serious anomalies.

That's all I have time for at the moment - speculation.   ;)


- BE


Post a reply to this message

From: Bald Eagle
Subject: Re: Mesh rendering artifacts
Date: 31 Jan 2023 20:15:00
Message: <web.63d9bc08249f00761f9dae3025979125@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:

> if your after-tax earnings allow :-), there's O'Reilly's excellent 'sed & awk',
> by Dougherty & Robbins.

Aye, hopefully the after tax earnings keep me afloat while our fraudulently
(s)elected president spends us into radioactive oblivion and races ahead into
hyperinflation.
Just went small-scale food shopping, and the prices on some things are
completely ridiculous.

But if I get that, then I will have at least TWO computer books!  :D

> regards, jr.

Same,

- BE


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Mesh rendering artifacts
Date: 31 Jan 2023 20:45:00
Message: <web.63d9c3b2249f00767ba9dec389db30a9@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> TOK,
>
> He posted his scene here :
>
http://news.povray.org/povray.general/attachment/%3Cweb.63d236cb249f00761ffa55cd10800fb2%40news.povray.org%3E/surface
3.
> pov.txt

Yes, I saw that. Thank you.


> I'm not sure how the data is generated from MatLab in order to be exported to
> triangles for POV-Ray, but I'm thinking that it might be better to export the
> geometry for the mesh separately, and then run a macro in POV-Ray to calculate
> the normals and color interpolation - or use the gradient y pigment.

Yes, that may be a possible way to go. But could it not be that some
would want to verify that their Matlab code generates ok normals and
colors ?


> I'm guessing that the normals are probably ok (?) and it's just the hard-coded
> colors getting interpolated that throws it all off.
>
> I'd have to dig through it all to see - but after I just did some more sorting
> macro stuff to handle the function timing (other thread), maybe I could try to
> sort the triangle vertices into a grid so that they can be put into a 2D array
> and then reprocessed.
>
> Purely as a sorting macro exercise for myself, which might prove useful to
> someone else int he future.

Are you thinking of sorting and collecting all the vertices into
a list of unique vertices ?

If so, it would be an interesting challenge to simultaneously
rearrange the colors and the normal vectors so that they are ordered
correspondingly (or respectively ?) in their own lists.

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Mesh rendering artifacts
Date: 31 Jan 2023 21:30:00
Message: <web.63d9ce18249f00767ba9dec389db30a9@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
>
> > Hi
>
> Hi yourself.
>
> > Have you not yet met Emacs?
> >
> >   ;-)
>
> Nope.   I was raised in the American Public Education System, where we're
> supposed to be just smart enough to read the names of the puppets that they
> nominate every cycle, and not smart enough to undo the shackles and escape the
> matrix.  As such, I still have certain  -  disabilities.
>
> > See the attached zip-file.
> >
> > --
> > Tor Olav
>
> I had a feeling that Mr. Wizard would appear, with something out of his bag of
> tricks.  :D

Hehe - I don't feel like a wizard. But during the years I have
become familiar with a few magic wands, like for example Emacs.


> I truly do need to sit down and work with Emacs, Vim, awk, etc and figure out
> how to do all the "word processing" tricks.

You can teach Emacs a lot of tricks with keyboard macros and
scripts. And you can even rearrange your keyboard to work the
way you like, e.g. by binding scripts to keys.

And then you can program Emacs in lisp. But have not looked
into that (yet).

So I recommend joining the Church of Emacs!

I really don't like vi and vim.
- They are the work of The Evil One ;-)

On several occasions I've found sed and awk/gawk useful.


> Thanks for being right there with a ready-made array example.

No problem.

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Mesh rendering artifacts
Date: 31 Jan 2023 21:55:00
Message: <web.63d9d42b249f0076383c879289db30a9@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> hi,
>
> "Bald Eagle" <cre### [at] netscapenet> wrote:
> > ...
> > I truly do need to sit down and work with Emacs, Vim, awk, etc and figure out
> > how to do all the "word processing" tricks.
>
> if your after-tax earnings allow :-), there's O'Reilly's excellent 'sed & awk',
> by Dougherty & Robbins.

I once spent several months using gawk to process logs from the
Linux kernel on an embedded CPU board to find out what was causing
an intermittent problem with an Ethernet port while it was booting.
(The Ethernet port did not show up in about one of hundred boots.)

Some months later I started learning Python and found that it
provides much better text processing tools than awk (although
some of them are similar) and was much easier to use for such
tasks.

So now I very much regret that I didn't look into Python earlier.
If I had not been so stubborn sticking to C, Pascal, Basic,
assembly and Excel, I would have saved a LOT of time in the past.

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Mesh rendering artifacts
Date: 31 Jan 2023 22:20:00
Message: <web.63d9da1d249f0076383c879289db30a9@news.povray.org>
"yesbird" <nomail@nomail> wrote:
> Hi, Tor.
> >
> > Have you not yet met Emacs?
> >
> >   ;-)
>
> Already no, I leaved it about 10 years ago. )

What ?
Didn't you want to be saved ?
You can still join the congregation...


> > See the attached zip-file.
> You are the wizard - what a beauty those normals !
> Thanks a lot - this is another piece of code for embedding.

You're welcome.

Instead of #declaring a vertex, normal and color on each line,
like this:

#declare I = I + 1;
#declare VV[I][0] = <3.43, 7.67, 1.83>;
#declare NN[I][0] = <0.32, 0.72, 0.62>;
#declare VV[I][1] = <3.76, 7.67, 1.63>;
#declare NN[I][1] = <0.36, 0.74, 0.56>;
#declare VV[I][2] = <3.76, 8.00, 1.13>;
#declare NN[I][2] = <0.37, 0.78, 0.51>;
#declare Colors[I][0] = <0.43, 1.00, 0.00>;
#declare Colors[I][1] = <0.48, 1.00, 0.00>;
#declare Colors[I][2] = <0.62, 1.00, 0.00>;
....

I think it would be better if your Matlab code created the arrays
containing the vectors directly, like this:

#declare VV =
    array[N][3] {
        { <3.43, 7.67, 1.83>, <3.76, 7.67, 1.63>, <3.76, 8.00, 1.13> },
        ...
    }
;
#declare NN =
    array[N][3] {
        { <0.32, 0.72, 0.62>, <0.36, 0.74, 0.56>, <0.37, 0.78, 0.51> },
        ...
    }
;
#declare Colors =
    array[N][3] {
        { <0.43, 1.00, 0.00>, <0.48, 1.00, 0.00>, <0.62, 1.00, 0.00> },
        ...
    }
;

--
Tor Olav
http://subcube.com
https://github.com/t-o-k


Post a reply to this message

From: jr
Subject: Re: Mesh rendering artifacts
Date: 1 Feb 2023 01:20:00
Message: <web.63da03c0249f0076fbdc16836cde94f1@news.povray.org>
hi,

"Bald Eagle" <cre### [at] netscapenet> wrote:
> ...
> Just went small-scale food shopping, and the prices on some things are
> completely ridiculous.

yes, same this side of pond.  _and_ the packages contain less product.


> But if I get that, then I will have at least TWO computer books!  :D

that would be good.  you could read one while the other still props up the
kitchen table ;-).


regards, jr.


Post a reply to this message

From: jr
Subject: Re: Mesh rendering artifacts
Date: 1 Feb 2023 01:20:00
Message: <web.63da03c9249f0076fbdc16836cde94f1@news.povray.org>
hi,

"Tor Olav Kristensen" <tor### [at] TOBEREMOVEDgmailcom> wrote:
> ...
> So now I very much regret that I didn't look into Python earlier.

if BE had mentioned 'Tcl', I would have recommended that.  he did mention 'vim',
but I didn't want to get into the .. religious arguments ;-).

re Python, does "sed -e 's#^I# #g' -i *.py" still work for newer versions of the
language ?!  :-)


regards, jr.


Post a reply to this message

From: yesbird
Subject: Re: Mesh rendering artifacts
Date: 1 Feb 2023 02:25:00
Message: <web.63da12ae249f00765f3e868110800fb2@news.povray.org>
> What ?
> Didn't you want to be saved ?
> You can still join the congregation...

O, thanks, but egrep, sed, awk, sort and python are taking care about my soul.
Before python era perl also did that, but now he is gone ...

> I think it would be better if your Matlab code created the arrays
> containing the vectors directly, like this:
>
> #declare VV =
>     array[N][3] {
>         { <3.43, 7.67, 1.83>, <3.76, 7.67, 1.63>, <3.76, 8.00, 1.13> },
>         ...
>     }
> ;

Exactly ! This is much more compact and readable, thanks again.
Now I am going to study POV magic, especially macros, more seriously.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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