|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
If I trace an object. How can I get the colour of the intersection of
the ray and object. As far as I can see trace() only returns the normal.
--
Regards
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 10.09.2017 um 15:13 schrieb Stephen:
> If I trace an object. How can I get the colour of the intersection of
> the ray and object. As far as I can see trace() only returns the normal.
You'll need to know the pigment of the object, and invoke `eval_pigment`
on the intersection point you get...
... and hope that the pigment isn't UV-mapped, nor uses a special
pattern like slope or aoi.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 10/09/2017 14:27, clipka wrote:
> Am 10.09.2017 um 15:13 schrieb Stephen:
>> If I trace an object. How can I get the colour of the intersection of
>> the ray and object. As far as I can see trace() only returns the normal.
>
> You'll need to know the pigment of the object, and invoke `eval_pigment`
> on the intersection point you get...
>
Thanks, I had a blank in my memory.
> ... and hope that the pigment isn't UV-mapped,
Hope is not involved because there is a good chance I would want to do
that. Is it at all possible?
--
Regards
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 10.09.2017 um 16:01 schrieb Stephen:
> On 10/09/2017 14:27, clipka wrote:
>> Am 10.09.2017 um 15:13 schrieb Stephen:
>>> If I trace an object. How can I get the colour of the intersection of
>>> the ray and object. As far as I can see trace() only returns the normal.
>>
>> You'll need to know the pigment of the object, and invoke `eval_pigment`
>> on the intersection point you get...
>>
>
> Thanks, I had a blank in my memory.
>
>> ... and hope that the pigment isn't UV-mapped,
>
> Hope is not involved because there is a good chance I would want to do
> that. Is it at all possible?
No; not with the current versions of POV-Ray. The `trace` function would
have to be extended to report the UV coordinate of the intersection, so
that you could then feed it into `eval_pigment` instead of the 3D
coordinate.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 10/09/2017 16:03, clipka wrote:
>> Hope is not involved because there is a good chance I would want to do
>> that. Is it at all possible?
> No; not with the current versions of POV-Ray. The `trace` function would
> have to be extended to report the UV coordinate of the intersection, so
> that you could then feed it into `eval_pigment` instead of the 3D
> coordinate.
Again, thanks.
In that case for UV mapped models I'll continue to use the slicing
method for creating df3s for meshes.
--
Regards
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
On 10/09/2017 16:03, clipka wrote:
> Am 10.09.2017 um 16:01 schrieb Stephen:
>> On 10/09/2017 14:27, clipka wrote:
>>> Am 10.09.2017 um 15:13 schrieb Stephen:
>>>> If I trace an object. How can I get the colour of the intersection of
>>>> the ray and object. As far as I can see trace() only returns the normal.
>>> You'll need to know the pigment of the object, and invoke `eval_pigment`
>>> on the intersection point you get...
>> Thanks, I had a blank in my memory.
>>> ... and hope that the pigment isn't UV-mapped,
>> Hope is not involved because there is a good chance I would want to do
>> that. Is it at all possible?
> No; not with the current versions of POV-Ray. The `trace` function would
> have to be extended to report the UV coordinate of the intersection, so
> that you could then feed it into `eval_pigment` instead of the 3D
> coordinate.
do I understand this correctly? if I trace some object with a regular
pigment it will work, but the trace will fail if the object's
pigment/colour is "not simple"? seems .. strange.
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 10.09.2017 um 21:22 schrieb jr:
> hi,
>
> On 10/09/2017 16:03, clipka wrote:
>> Am 10.09.2017 um 16:01 schrieb Stephen:
>>> On 10/09/2017 14:27, clipka wrote:
>>>> Am 10.09.2017 um 15:13 schrieb Stephen:
>>>>> If I trace an object. How can I get the colour of the intersection of
>>>>> the ray and object. As far as I can see trace() only returns the normal.
>>>> You'll need to know the pigment of the object, and invoke `eval_pigment`
>>>> on the intersection point you get...
>>> Thanks, I had a blank in my memory.
>>>> ... and hope that the pigment isn't UV-mapped,
>>> Hope is not involved because there is a good chance I would want to do
>>> that. Is it at all possible?
>> No; not with the current versions of POV-Ray. The `trace` function would
>> have to be extended to report the UV coordinate of the intersection, so
>> that you could then feed it into `eval_pigment` instead of the 3D
>> coordinate.
>
> do I understand this correctly? if I trace some object with a regular
> pigment it will work, but the trace will fail if the object's
> pigment/colour is "not simple"? seems .. strange.
No, the `trace` function works perfectly fine for what it was designed
for: It gives you the point in 3D space where a given ray intersects a
given geometric object. In and of itself, it has nothing to do with
pigments whatsoever.
Likewise, the `eval_pigment` function works perfectly fine for what it
was designed for: It gives you the colour of a given pigment for a given
point in 3D space. In and of itself, it has nothing to do with geometry
whatsoever.
And that's where the problem with UV-mapped textures arises: Since
`trace` knows nothing about textures, and `eval_pigment` knows nothing
about geometry, the two can only be combined for good effect if there is
a direct mapping between geometry and pigment via 3D XYZ space. But with
UV-mapping that's not the case, and hence the /combo/ of the two
functions breaks down there.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hi,
On 10/09/2017 20:57, clipka wrote:
> Am 10.09.2017 um 21:22 schrieb jr:
>> do I understand this correctly? if I trace some object with a regular
>> pigment it will work, but the trace will fail if the object's
>> pigment/colour is "not simple"? seems .. strange.
>
> No, the `trace` function works perfectly fine for what it was designed
> for: It gives you the point in 3D space where a given ray intersects a
> given geometric object. In and of itself, it has nothing to do with
> pigments whatsoever.
>
> Likewise, the `eval_pigment` function works perfectly fine for what it
> was designed for: It gives you the colour of a given pigment for a given
> point in 3D space. In and of itself, it has nothing to do with geometry
> whatsoever.
>
> And that's where the problem with UV-mapped textures arises: Since
> `trace` knows nothing about textures, and `eval_pigment` knows nothing
> about geometry, the two can only be combined for good effect if there is
> a direct mapping between geometry and pigment via 3D XYZ space. But with
> UV-mapping that's not the case, and hence the /combo/ of the two
> functions breaks down there.
thanks.
regards, jr.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> And that's where the problem with UV-mapped textures arises: Since
> `trace` knows nothing about textures, and `eval_pigment` knows nothing
> about geometry, the two can only be combined for good effect if there is
> a direct mapping between geometry and pigment via 3D XYZ space. But with
> UV-mapping that's not the case, and hence the /combo/ of the two
> functions breaks down there.
So, the color of a surface on a uv-mapped object is not directly measurable by
the eval_pigment() function? [ ! :O ]
I would never have guessed that.
It must then use a completely different algorithm than the ray-object
intersection used to generate the final scene.
Can you:
1. use trace() to get the point and the normal
2. define a pigment constructed in the plane intersecting that point with the
same normal
( I likely have no idea what I'm talking about here: I'm just confabulating the
possibility that some slice of a function-object-pattern thing might be a
workaround... )
3. then do an eval_pigment() on the plane?
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On 10/09/2017 14:27, clipka wrote:
> Am 10.09.2017 um 15:13 schrieb Stephen:
>> If I trace an object. How can I get the colour of the intersection of
>> the ray and object. As far as I can see trace() only returns the normal.
>
> You'll need to know the pigment of the object, and invoke `eval_pigment`
> on the intersection point you get...
>
Follow up question.
How would you use eval_pigment if you were tracing a CSG?
Is it possible?
--
Regards
Stephen
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |