Creating new view types for Radiance (Greg Ward)

Hi Greg,

Many thanks for that. The view type I am testing is equirectangular
(so I've called it VT_EQR). So far I have modified the following:

common/image.c: setview, viewray and viewloc

common/view.h: Macro for new view type.

util/rad.c: specview

util/rpiece.c: same as for VT_ANG

The compilation looked generally ok with makeall, but there is an
error in my modification of ray.c:
    rad.c: In function ‘specview’:
    rad.c:1224:7: error: ‘VT_EQR’ undeclared (first use in this function)
It is strange because I could not see any of the other types declared there.
Despite the error, rpict seemed to be working, but other programs were
missing (pfilt and pcond at least). I think they were also missing
even before changing ray.c, is that possible?
I've made a quick test and the new projection type seems to work. I've
attached the results, but I'm not sure if they can be accessed from
the mailing list. I've rendered a horizontal squared view (-vh 120 -vv
120) for the following two scenarios and different view types (VT_PER,
VT_ANG, VT_CYL and VT_EQR):

1- From the centre of a checked sphere (meridians and parallels).

2- From the centre of a box with checked walls.

So far it seems to work!, but I haven't tested all options (vo, va,
vs, vl...). Is there a standard test to check view types?

Cheers,

Victor Lopez-Rioboo Gil

···

---------------------------------------------------------

Hi Victor,

You are working in the right place. Besides adding a macro for your
view type to view.h, you need to implement the correct operations and
checks in viewray() and viewloc() in image.c. For full support, you
should also look at util/rad.c and insert your view type in some
switch statements therein. Similarly, there is some code you need to
write to split up your view for rpiece in util/rpiece.c.

Can you be more specific when you say that your compilation is not
working? Do you get compile errors, or is something going wrong at
run-time?

Out of curiosity, what type are you adding?

Cheers,
-Greg

* From: goodriver laurus <rioboo at gmail.com <http://www.radiance-online.org/mailman/listinfo/radiance-general>>

*>* Date: October 28, 2016 12:08:09 AM PDT
*> >* Dear all,
*> >* I would like to try a new view type for Radiance. So far I have
included the new type in image.c and included a reference in view.h.
However, the compilation is still not working for rpict. I wonder if
that could be due to the modifications I've made (I have already
corrected a couple of small errors) or because I would need to modify
also other files. Basically, what I am asking is what files should be
considered in order to include an alternative view type for rpict and
vwrays.
*> >* Many thanks,
*> >* Victor Lopez-Rioboo Gil*