Greetings, all. I'm slowly delving my way into object graphics, and I'm
having some pretty serious problems with my lighting. Specifically, I
have a set of polygons representing an isosurface of a solid. I generated
them using shade_volume. In direct graphics, I used them as input to
polyshade, like this:
shade_volume, new, .5,vert,poly, /low
shade_volume, new, 1,lvert,lpoly, /low
scale3, xrange=[0,xr], yrange=[0,yr], zrange=[0,zr],ax=xa,az=za
tv,bytscl(polyshade(vert,poly,/t3d))+bytscl(polyshade(lvert, lpoly,/t3d))
I didn't specify any lighting. When I try to get a decent display of the
polygons using object graphics like this:
shade_volume, full, .5,vert,poly, /low
mypol = OBJ_NEW('IDLgrPolygon', vert, polygons = poly)
mypol -> SetProperty, XCOORD_CONV=[-1.0, 1.0/170.0]
mypol -> SetProperty, YCOORD_CONV=[-1.0, 1.0/79.0]
mypol -> SetProperty, ZCOORD_CONV=[-1.0, 1.0/49.0]
mywindow = OBJ_NEW('IDLgrWindow', DIMENSIONS=[340,158])
myview = OBJ_NEW('IDLgrView', VIEWPLANE_RECT=[-1,-1,1,1], ZCLIP=[1,-1])
mymodel = OBJ_NEW('IDLgrModel')
myview -> Add, mymodel
mymodel -> Add, mypol
mywindow -> Draw, myview
The view completely lacks definition. When I add lights, very small
sections light up, but I can't seem to position the lights to illuminate
the whole object. How can I reproduce the lighting model used by
polyshade in direct graphics, or at least get enough intensity out of
light objects to suit my purposes?
K-Bye,
STEVE! (chetelat@csee.usf.edu)(steve@moffitt.usf.edu)
|