comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: XObjView: Select Object and Opacity Problem
items: Re: XObjView: Select Object and Opacity Problem

XObjView: Select Object and Opacity Problem
type: item
description: Hello, I want to select an object in XObjView and rotate it, but other objects should be fixed. I read in the refguide, that it is possible to add Arrays to XObjView. So I think it should work, but how? Is there a posibility to realize this idea? My first try was with the SELECT_TARGET property but it seems to me that nothing changed in View. An other way I thought about is to create to Models theModel_1 = Obj_New('IDLgrModel') and theModel_2 = Obj_New('IDLgrModel') give them rotate,scale and Translate Options, because I think every Model would need its own zeropint. But when I zoom, in XObjView it always depends on one Point. Any ideas? My second problem deals with the alphachannel. It works, and I can change the opacity. the front view in XObjView (x-y level) is good, but when i rotate my data and have a look at y-z level i have stripes. Could this depend on the alphachannel? Or maybe the slices, because i scaled the stac? Thanks for any help and ideas. Regards Robert
creator: robertschaefer
date: 2004-11-09T10:26:46-00:00

Re: XObjView: Select Object and Opacity Problem
type: item
description: Robert Schaefer writes: > I want to select an object in XObjView and rotate it, > but other objects should be fixed. > I read in the refguide, that it is possible > to add Arrays to XObjView. So I think it should work, > but how? Well, here is an example of how you can get this to work, sorta: ;******************************************************** PRO Example ; Create contour object: oCont = OBJ_NEW('IDLgrContour', DIST(20), N_LEVELS=10) ; Create surface object: oSurf = OBJ_NEW('IDLgrSurface', $ DIST(20),INDGEN(20)+20, INDGEN(20)+20) ; View model: XOBJVIEW, [osurf], Stationary=[ocont] end ;******************************************************** I think you are probably going to have to eventually give up on XObjView though. You are pushing it now almost beyond the breaking point of where it was meant to go. :-) > > An other way I thought about is to create to Models > theModel_1 = Obj_New('IDLgrModel') and theModel_2 = Obj_New('IDLgrModel') > give them rotate,scale and Translate Options, because I think > every Model would need its own zeropint. But when I zoom, in > XObjView it always depends on one Point. I think this is a result of what XObjView was designed to do originally. As I say, I think you are pushing it well beyond this point. > My second problem deals with the alphachannel. > It works, and I can change the opacity. the front > view in XObjView (x-y level) is good, but when > i rotate my data and have a look at y-z level i have > stripes. Could this depend on the alphachannel? > Or maybe the slices, because i scaled the stac? It could depend on a lot of things. One of the problems with object graphics, of course, is that *everything* is possible. It makes the Universe of potential problems rather large as well. :-( A better description of the code might help. And, of course, it always pays to read about the "pimento problem" in the IDL newsgroup archives. :-) Cheers, David -- David W. Fanning, Ph.D. Fanning Software Consulting, Inc. Coyote's Guide to…
creator: David Fanning
date: 2004-11-09T13:35:15-00:00

Re: XObjView: Select Object and Opacity Problem
type: item
description: Robert Schaefer wrote: > I want to select an object in XObjView and rotate it, > but other objects should be fixed. Aside from David's suggestion, I think that you have moved beyond the realm of XOBJVIEW. XOBJVIEW throws everything in a top level model, gets the extents of that model, sets the viewing parameters and draws the scene. There is no way to select and manipulate individual objects/models. You'll have to build your own viewing system. You may want to look at my camera object and some of the demos. I don't have anything that demonstrates picking objects, but maybe you'll get some ideas/inspiration from them. http://www.acoustics.washington.edu/~towler/ The CSS is broken in Firefox and has been for months but you still should be able to navigate and d/l files. I apologize. It will be fixed some day... > My second problem deals with the alphachannel. > It works, and I can change the opacity. the front > view in XObjView (x-y level) is good, but when > i rotate my data and have a look at y-z level i have > stripes. Could this depend on the alphachannel? > Or maybe the slices, because i scaled the stac? This is a problem with rendering order. A weak explanation follows: Assume you have 2 planes orthogonal to the vector [0,0,1]. A semi-transparent one containing the point [0,0,0.5] and the other opaque containing the point [0,0,-0.5]. Also remember that your viewing vector is *always* fixed at [0,0,-1]. When you rotate these two objects 90 deg. it gets difficult to separate the objects properly in terms of rendering order. At 85 deg. the front, semi-transparent object, is still in front of the back object in regards to Z. But at 95 the "front" object's vertices are now more negative in terms of Z than the back object. In between you have a mix, some of the verts of the front object are +z some are -z. It is in this case where you see the banding as IDL renders some of the triangles for the back plane *after* rendering some of the triangles of the front plane. Yo…
creator: Rick Towler
date: 2004-11-09T18:53:49-00:00