Page 1 of 1

softvolumes in Alcscript

PostPosted: Mon Mar 30, 2009 12:00 pm
by boblishman
OK guys, I know this should be really simple ... but my head is about to explode just thinking this through ... :shock:

I want to confine a sound using a softvolume. I already know how to do this using Alcscript ... EXCEPT that I get confused about COMPLEX soft voumes.

Ok ... to confine the sound to a simple softvolume, I use the following Alcscript for the sound emitter:

softvolalcscript.jpg
softvolalcscript.jpg (26.83 KiB) Viewed 1513 times


where 'SoftVolPuzPlay' is a cylinder mesh (with its normals pointing inwards).


However, I have two soft volume meshes ... both cylinders ... (both with their normals pointing inwards) ... called softvolA and softvolB

However ...I actually want to confine my sound to a COMPLEX soft volume, consisting of softvolB * minus softvolA* (in effect, a donut type shape i.e. the blue cylinder with the brown cylinder removed from it

softvols.jpg
softvols.jpg (38.84 KiB) Viewed 1513 times


so ...my question is:

what is the correct 'shorthand syntax' alcscript for this complex soft volume? (that would go in the red box in the first picture) using these two meshes (softvolA and softvolB) ?

(that is asuming of course, that it is even possible to define my complex softvolume using the two meshes above)

ANY help would be greatly appreciated!

Bob

*EDIT: My original post had A & B the wrong way around ...This is now corrected

Re: softvolumes in Alcscript

PostPosted: Mon Mar 30, 2009 1:16 pm
by Christian Walther
Guess:
Code: Select all
softvolume: I(softvolB, !(softvolA))

(swap A and B to match your text instead of your picture)

B minus A is the same thing as intersection of B and inverse-A.

Side notes: These cylinders have an awful lot of faces. I would imagine that for a sound softvolume half or a quarter of that should be sufficient. The brown cylinder doesn't need end caps, removing them - making the cylinder extend infinitely (which is simpler from the point of view of Plasma - less faces) - makes no difference to the donut shape. And I don't remember if PyPRP does that automatically, but from all the triangles that make up either end cap of the blue cylinder, you could remove all but one. It doesn't matter if your mesh gets holes that way, the faces are automatically expanded as far as needed (they are treated as infinite planes internally, not as confined triangles or quadrilaterals).

Re: softvolumes in Alcscript

PostPosted: Mon Mar 30, 2009 2:13 pm
by boblishman
thanks Christian ... the diagram was just that ...a diagram to explain my question ...the actual meshes are VERY low poly.

Thank you... it would have taken me a LIFETIME to work out that script... :)

(swap A and B to match your text instead of your picture) oops...my bad ... :oops: yes... it should have been the other way around in my text ... now corrected)