POV-Ray : Newsgroups : povray.general : trace question : Re: trace question Server Time
26 Apr 2024 08:02:10 EDT (-0400)
  Re: trace question  
From: clipka
Date: 11 Sep 2017 09:38:38
Message: <59b691de$1@news.povray.org>
Am 11.09.2017 um 09:11 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...
>>
> 
> Follow up question.
> 
> How would you use eval_pigment if you were tracing a CSG?
> Is it possible?

Presuming the CSG elements have different textures... no.


So with that in mind, probably the easiest (from a user perspective) way
to solve this whole group of issues would be to provide a function that
not only computes a ray-object intersection, but also does a proper
pigment lookup.

Which has its own issues though; most notably, texture patterns and
layered textures would be a b*tch to deal with, as in the actual render
algorithm they're not handled at the pigment level, but at the "what
does that texture actually look like as seen from this angle" level
(finish level if you will, with highlights and reflections and all).


Post a reply to this message

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