[Radiance-general] artifact while rendering glass in tmesh solved?

Iebele Abel iabel at iebele.nl
Sun Feb 19 06:25:07 PST 2012


Hi Greg,

Changing the file rt/glass.c as you described below fixed the artifact.
Again, thanks a lot for your help.

But now suppose I would not have changed rt/glass.c Your remark that a
texture applied to an infinitely thin layer of glass should perturb
transmitted rays (and in effect an applied texture will smooth the
triangulation) did me think of using a BRTD material instead of glass.
Maybe it is a stupid thought, but would it be possible to model glass using
BRTD in such way that the transmitted component remains unaffected while
the reflected component is smoothed by a texture?

My best,

Iebele




>
>
> 2012/2/3 Greg Ward <gregoryjward at gmail.com>:
> > Hi Iebele,
> >
> > Just so this answer doesn't get lost like Francesco's, I'm taking us
> back online to discuss this.  Thanks for sharing your model and results.
> >
> > The problem occurs because of a hack I introduced into the glass
> material type, about which I had completely forgotten.  It was my answer to
> the question, "Should a texture applied to an infinitely thin layer of
> glass perturb transmitted rays?"  I decided it should, because in most
> cases, a texture is applied to introduce some effect to the surface.
> >
> > The problem here is that the texture is being applied to correct the
> effects of triangulation, thus smoothing rather than roughening the
> surface.  Without a texture, the transmitted component would be unaffected,
> but the reflected component would show your model's tessellation.  There
> are three possible solutions.
> >
> > The first possible solution is to give your car windows real thickness
> and use a dielectric material rather than glass.  You would need to be
> careful that your surface normals were directed outwards for the outer
> layer and inwards for the inner layer.
> >
> > The second possible solution is to turn off surface normal smooth just
> for the window layer.  This will as I said show up the tessellation of your
> reflections, but it would fix the transmission.
> >
> > The third possible solution is to re-hack the source file rt/glass.c.
>  At line 114, simplify:
> >
> >                        if (!(r->crtype & SHADOW) && hastexture) {
> >                                VSUM(p.rdir, r->rdir, r->pert,
> 2.*(1.-rindex));
> >                                if (normalize(p.rdir) == 0.0) {
> >                                        objerror(m, WARNING, "bad
> perturbation");
> >                                        VCOPY(p.rdir, r->rdir);
> >                                }
> >                        } else {
> >                                VCOPY(p.rdir, r->rdir);
> >                                transtest = 2;
> >                        }
> >
> > to read:
> >
> >                        VCOPY(p.rdir, r->rdir);
> >                        transtest = 2;
> >
> > This should fix the problem without having to change your model.  Of
> course, the problem will come back the next time you update Radiance,
> unless folks convince me that my hack was ill-conceived to begin with.  I'm
> open to the possibility.
> >
> > Cheers,
> > -Greg
> >
> >> From: Iebele Abel <iabel at iebele.nl>
> >> Date: February 2, 2012 11:38:28 AM PST
> >>
> >> Hi group,
> >>
> >> Can the artifact which occurs when rendering glass in a tmesh
> >> (obj2tmesh) be solved? This artifact has already been described in the
> >> following thread, but it does't seems to be followed up by an answer.
> >> Any help would be appreciated.
> >>
> >>
> http://www.radiance-online.org/pipermail/radiance-general/2005-June/002777.html
> >>
> >> Thanks,
> >>
> >> Iebele
> >
> > _______________________________________________
> > Radiance-general mailing list
> > Radiance-general at radiance-online.org
> > http://www.radiance-online.org/mailman/listinfo/radiance-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20120219/2b77dc37/attachment.html>


More information about the Radiance-general mailing list