You're looking for the dot product between the (normalized) vector pointing from particle to camera and the (normalized) vector perpendicular to the sprite.
If the sprite is facing the camera the scalar result will be 1. If it is 90-degrees to the camera the value becomes zero, and then goes to -1 when the sprite is facing away from the camera position.
On Tue, Mar 27, 2012 at 4:07 AM, Rob Chapman <tekano....@gmail.com> wrote: > Hi guys,
> quick trigonometry question, unfortunately its never been my strong point > so any advice would be much appreciated., Ive had a go at trying to get > clouds as sprites working and getting improved results with each test, I'm > finding that a direct sprite grid align to camera does not work so well > when the camera flies into or around the clouds but a randomised > orientation does... but not when the angle is too extreme eg take a look at > this test here http://vimeo.com/39255483 and the sprite grids that are > too obtuse or acute really stand out. Iv'e had a go with an ICE tree that > gives an angle between two vectors (the camera and the y axis of each > particle) but don't seem to get the required results when show values is > turned on. what I'd really like is that as the particle orientation > approaches horizontal angle (to the camera) this gaves a scalar value/angle > that I can then use to control the transparency , effectively fading it out > at extreme angles or limit the orientation between certain values.. > Anybody have an idea how to do this with ICE? hopefully its simple.
On Wed, Mar 28, 2012 at 9:53 AM, Andy Moorer <andymoo...@gmail.com> wrote: > You're looking for the dot product between the (normalized) vector > pointing from particle to camera and the (normalized) vector perpendicular > to the sprite.
> If the sprite is facing the camera the scalar result will be 1. If it is > 90-degrees to the camera the value becomes zero, and then goes to -1 when > the sprite is facing away from the camera position.
> On Tue, Mar 27, 2012 at 4:07 AM, Rob Chapman <tekano....@gmail.com> wrote:
>> Hi guys,
>> quick trigonometry question, unfortunately its never been my strong point >> so any advice would be much appreciated., Ive had a go at trying to get >> clouds as sprites working and getting improved results with each test, I'm >> finding that a direct sprite grid align to camera does not work so well >> when the camera flies into or around the clouds but a randomised >> orientation does... but not when the angle is too extreme eg take a look at >> this test here http://vimeo.com/39255483 and the sprite grids that are >> too obtuse or acute really stand out. Iv'e had a go with an ICE tree that >> gives an angle between two vectors (the camera and the y axis of each >> particle) but don't seem to get the required results when show values is >> turned on. what I'd really like is that as the particle orientation >> approaches horizontal angle (to the camera) this gaves a scalar value/angle >> that I can then use to control the transparency , effectively fading it out >> at extreme angles or limit the orientation between certain values.. >> Anybody have an idea how to do this with ICE? hopefully its simple.
not at all. I usually hack things around with some visual understanding of how things could/should work and a lot of trial and error – it can be helpful to see it spelled out like that.
From: Andy Moorer Sent: Wednesday, March 28, 2012 6:55 PM To: softim...@listproc.autodesk.com Subject: Re: ICE trig maths, camera facing angles
Oops, looks like my reply was old news, never mind nothing to see here move along...
On Wed, Mar 28, 2012 at 9:53 AM, Andy Moorer <andymoo...@gmail.com> wrote:
You're looking for the dot product between the (normalized) vector pointing from particle to camera and the (normalized) vector perpendicular to the sprite.
If the sprite is facing the camera the scalar result will be 1. If it is 90-degrees to the camera the value becomes zero, and then goes to -1 when the sprite is facing away from the camera position.
On Tue, Mar 27, 2012 at 4:07 AM, Rob Chapman <tekano....@gmail.com> wrote:
Hi guys,
quick trigonometry question, unfortunately its never been my strong point so any advice would be much appreciated., Ive had a go at trying to get clouds as sprites working and getting improved results with each test, I'm finding that a direct sprite grid align to camera does not work so well when the camera flies into or around the clouds but a randomised orientation does... but not when the angle is too extreme eg take a look at this test here http://vimeo.com/39255483 and the sprite grids that are too obtuse or acute really stand out. Iv'e had a go with an ICE tree that gives an angle between two vectors (the camera and the y axis of each particle) but don't seem to get the required results when show values is turned on. what I'd really like is that as the particle orientation approaches horizontal angle (to the camera) this gaves a scalar value/angle that I can then use to control the transparency , effectively fading it out at extreme angles or limit the orientation between certain values.. Anybody have an idea how to do this with ICE? hopefully its simple.
I got to understand the cross-product because it involves sticking your fingers out at right angles, so you can actually see in front of you what you want and what you're going to get. Now that's the kind of maths my brain can cope with.
On 28 March 2012 19:01, <pete...@skynet.be> wrote:
> not at all. > I usually hack things around with some visual understanding of how things > could/should work and a lot of trial and error – it can be helpful to see > it spelled out like that.
> I got to understand the cross-product because it involves sticking your > fingers out at right angles, so you can actually see in front of you what > you want and what you're going to get. Now that's the kind of maths my > brain can cope with.
> On 28 March 2012 19:01, <pete...@skynet.be> wrote:
>> not at all. >> I usually hack things around with some visual understanding of how things >> could/should work and a lot of trial and error – it can be helpful to see >> it spelled out like that.
> and since its Friday, here is a render test using this new 'incidence' > mode on the sprites to fade the transparency.
> cheers!
> Rob
> On 29 March 2012 15:12, Chris Marshall <chrismarshal...@gmail.com> wrote:
>> I got to understand the cross-product because it involves sticking your >> fingers out at right angles, so you can actually see in front of you what >> you want and what you're going to get. Now that's the kind of maths my >> brain can cope with.
>> On 28 March 2012 19:01, <pete...@skynet.be> wrote:
>>> not at all. >>> I usually hack things around with some visual understanding of how >>> things could/should work and a lot of trial and error – it can be helpful >>> to see it spelled out like that.