POV-Ray : Newsgroups : povray.advanced-users : Retrieving RGB from UV-mapped mesh? Server Time
27 Dec 2024 16:58:09 EST (-0500)
  Retrieving RGB from UV-mapped mesh? (Message 1 to 6 of 6)  
From: Tim Nikias
Subject: Retrieving RGB from UV-mapped mesh?
Date: 28 Jan 2005 11:07:58
Message: <41fa635e$1@news.povray.org>
If my question were: "How can I get the RGB value at a certain location of
an object?" I'd knew the answer: turn the used pigment-pattern into a
function, enter the desired location, and voila! (Okay, maybe the
technicalities are a little wrong, but that's basically what you do).

But what do you do when you have a UV-mapped mesh? I can get the position on
the mesh, no problem, but how can I properly access the UV-pigment? The mesh
is from outside POV-Ray, otherwise there'd have been possibilities to code
such a functionality into the mesh-generating macro...

If it isn't possible, I guess I *could* come up with a method of rendering
the object in a close-up, focussing on the desired location, and retrieve
the RGB from a function-turned image-map, all automatically done in a
pre-render using POV-Ray. However, this isn't very feasible for thousands of
samples to checked...

Any other ideas?

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Tim McMurdo
Subject: Re: Retrieving RGB from UV-mapped mesh?
Date: 29 Jan 2005 10:55:01
Message: <web.41fbb1ba71a8cd6e93bf990@news.povray.org>
Tim,

I don't know the answer to your question. But...I know that when you ask a
question like this, something quite interesting is in the works. Good luck
and I look forward to seeing what new innovations you are coming up with.

Tim


Post a reply to this message

From: Tim Nikias
Subject: Re: Retrieving RGB from UV-mapped mesh?
Date: 29 Jan 2005 13:10:10
Message: <41fbd182@news.povray.org>
> I don't know the answer to your question. But...I know that when you ask a
> question like this, something quite interesting is in the works. Good luck
> and I look forward to seeing what new innovations you are coming up with.

:-) That's a nice statement, thank you!

Seriously though, as it seems that this reverse-uv-mapping isn't possible, I
can use the technique only for non-uv-mapped textures. Not too big of a
problem though.

Regards,
Tim

-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

From: Shay
Subject: Re: Retrieving RGB from UV-mapped mesh?
Date: 31 Jan 2005 11:49:12
Message: <41fe6188$1@news.povray.org>
Tim Nikias wrote:
> 
> Any other ideas?

How large is the mesh? If you knew which triangle you hit, then you 
could just interpolate between that corner's uv vectors. I'm guessing 
the mesh is too big to accomplish this in reasonable time.

  -Shay


Post a reply to this message

From: Jim Charter
Subject: Re: Retrieving RGB from UV-mapped mesh?
Date: 31 Jan 2005 13:00:02
Message: <41fe7222$1@news.povray.org>
Shay wrote:
> Tim Nikias wrote:
> 
>>
>> Any other ideas?
> 
> 
> How large is the mesh? If you knew which triangle you hit, then you 
> could just interpolate between that corner's uv vectors. I'm guessing 
> the mesh is too big to accomplish this in reasonable time.
> 
>  -Shay
Not only is this what you could do, it is the only thing you can do ifaik


Post a reply to this message

From: Tim Nikias
Subject: Re: Retrieving RGB from UV-mapped mesh?
Date: 31 Jan 2005 13:35:56
Message: <41fe7a8c$1@news.povray.org>
> > How large is the mesh? If you knew which triangle you hit, then you
> > could just interpolate between that corner's uv vectors. I'm guessing
> > the mesh is too big to accomplish this in reasonable time.
>
> Not only is this what you could do, it is the only thing you can do ifaik

Well, that's a little too much work for POV-internal parsing, eh? Especially
with a multi-thousand-triangle mesh... But thanks anyway!

Regards,
Tim
-- 
"Tim Nikias v2.0"
Homepage: <http://www.nolights.de>


Post a reply to this message

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