POV-Ray : Newsgroups : povray.general : Colour from single trace : Re: Colour from single trace Server Time
28 Apr 2024 21:12:18 EDT (-0400)
  Re: Colour from single trace  
From: Le Forgeron
Date: 31 Dec 2018 06:44:23
Message: <5c2a0117$1@news.povray.org>
Le 15/11/2018 à 19:38, clipka a écrit :
> Am 15.11.2018 um 18:33 schrieb Le_Forgeron:
> 
>> Now, let's fight about trace_uv_map or any better spelling or wording.
> 
> Since you cannot compute an UV coordinate without computing an
> intersection, I would lean towards designing this as an extension to the
> existing `trace` function, via yet another optional parameter after the
> normal variable. That way we can avoid double work when the user wants
> both the intersection point's location and the UV coordinates.
> 
> Also, if for some reason we need to implement it as a separate function,
> I would prefer `trace_uv`. We don't have the `map` appendix in any other
> UV mapping related stuff (e.g. it is `uv_vectors`, not
> `uv_map_vectors`), so adding it here would be inconsistent.

You can have the best of both world, now, at >
https://github.com/LeForgeron/povray/commit/cea994f8e69375f9de809bea5df241f1a269f702

(same branch as before):
* added uv-vector as optional parameter of trace(), after normal
* changed trace_uvmap to trace_uv, for the ones which only wants uv data
and do not care about intersection & normal.


Post a reply to this message


Attachments:
Download 'traceuv.pov.txt' (1 KB)

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