POV-Ray : Newsgroups : povray.beta-test.binaries : Radiosity POV 3.6 vs. 3.7 vs. MCPov : Re: Got it!: Server Time
18 May 2024 15:58:01 EDT (-0400)
  Re: Got it!:  
From: clipka
Date: 19 Jan 2009 10:30:00
Message: <web.49749c6527a78bab9b482c50@news.povray.org>
Ive <"ive### [at] lilysoftorg"> wrote:
> #declare T_Floor = texture {
>    checker
>    texture {T_FloorWhite_simple}, texture {T_FloorWhite_simple}
>    rotate x*90
>    rotate y*45
>    scale 117.2/2
>    translate <-20.0, 0, 0>
> }

Ta-ding!

You know what? That stupid Trace::ComputeLightedTexture() code passes the wrong
co-ordinates to the radiosity code!

Instead of "world co-ordinates" it actually passes the co-ordinates with the
texture translations applied. Incredibly stupid error. And a one-liner to fix.
In file "trace.cpp", locate the line reading:

radiosity.ComputeAmbient(ray, *ipoint, rawnormal, layNormal, ambCol, weight *
max_Radiosity_Contribution, ticket);

replace with:

radiosity.ComputeAmbient(ray, Vector3d(isect.IPoint), rawnormal, layNormal,
ambCol, weight * max_Radiosity_Contribution, ticket);


This actually gets both the "balcony.pov" and "object_pattern.pov" scenes
perfectly back to 3.6 look.


Thanks for your help! Your scene and experiments provided essential input for
fixing this issue.


Post a reply to this message

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