Re: mesh clipping [message #31872] |
Tue, 27 August 2002 09:46  |
Rick Towler
Messages: 821 Registered: August 1998
|
Senior Member |
|
|
"lyubo" <lzagorch@cs.wright.edu> wrote
> In general, can I draw a plane in IDL which will cover the front part of
the
> mesh without clipping it, or is there any other way of doing that?
Sort of. You can set up your view such that it clips your mesh, and then
adjust the eye property until you are viewing it from the deired distance
(or you can adjust the viewplane rectangle, or you can use my camera and
simply adjust the zoom). You may not see what you are expecting depending
on the way your mesh was drawn though.
As for the other way, if you are going to be slicing your mesh up
interactivly *and* your hardware can render your full mesh quickly consider
using an alpha channel to "hide" parts of your mesh instead of removing
them. This should be significantly faster.
As I hinted to above, the order in which the mesh is rendered is very
important when clipping with the view or using alpha blending. You must
draw the mesh starting with your -z verts and draw torwards +z. Google this
group for "Pimento Problems" for the full explanation.
The trick will be setting up your texture_coords...
> Also, why IDLgrVolume is so slow?
Most likely your graphics adapter isn't designed to accelerate the rendering
of volumes.
-Rick
|
|
|
Re: mesh clipping [message #31892 is a reply to message #31872] |
Mon, 26 August 2002 16:01   |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
lyubo,
"lyubo" <lzagorch@cs.wright.edu> wrote in message
news:akbask$qgr$1@mercury.wright.edu...
>
> I have three planes and a mesh. The mesh represents an object which I
want
> to cut with the planes and show either of the remaining parts ( like
> thecutting planes of IDLgrVolume).
If I understand you correctly, you want to apply three general clipping
planes to a mesh and show what is left after the three cuts. (that's
what IDLgrVolume does, for any number of planes you might wish)
> To do that I clip the mesh to all of the planesand
> take the union of the remaining meshes, but it takes a lot of time to
> mergethem.
This part confuses me a little. I would suggest to start with the whole
mesh, clip with one plane, then clip the resulting mesh with the second
plane, then clip that resulting mesh with the third plane. It looks to
me more like an *intersection* of three sub-spaces than a *union*, but
it can be done sequentially like this, rather than combining separate
results.
Perhaps I've misunderstood, but I hope this helps.
Cheers,
--
-Dick
Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
|
|
|
Re: mesh clipping [message #31966 is a reply to message #31872] |
Wed, 28 August 2002 05:35  |
lyubo
Messages: 34 Registered: March 2002
|
Member |
|
|
Rick, you were right. I really want to slice the mesh up interactively
and that's why I was trying to clip it to a plane. I guess alpha blending
will be faster but the question that I have here is how can I use alpha
blending with a mesh? I thought that I can apply alpha blending only to
texture mapped polygons, by using an alpha image as texture. With
the mesh I don't have any texture. I will try to find examples on the net,
I just wanted to thank you for your reply.
As far as my graphics adapter, I use Nvidia GeForce3 on a P4 2.0GHz
dual processor with 512Mb Ram platform. Which graphic adapters
support rendering of volumes?
Thanks,
Lyubo
|
|
|