It is currently 19 Jun 2013, 00:30

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject: Re: Switching Cam Position Based on Distance to Targeted Object
PostPosted: 13 Nov 2011, 02:10 
Offline

Joined: 16 Oct 2011, 14:13
Posts: 162
if I want to move ahead or behind the cone, how is this to be achieved ? I basically want to set the distance to keep to the cone ... distinguishing between ahead of the cone and running after the cone.

Image


Top
 Profile  
 
 Post subject: Re: Switching Cam Position Based on Distance to Targeted Object
PostPosted: 13 Nov 2011, 02:30 
Offline

Joined: 22 Mar 2010, 18:43
Posts: 391
Frank1000 wrote:
did implement it but cam still pointing to interest and not oriented by null orientation ... do I need to apply the positioning to the cam-root rather than to the cam itself ... so interest is dependent to cam ?

If you don't want to use the camera interest, you'd typically delete it. The camera's rotation is constrained by the interest, so setting its rotation has no effect as long as that constraint exists.

Frank1000 wrote:
if I want to move ahead or behind the cone, how is this to be achieved ? I basically want to set the distance to keep to the cone ... distinguishing between ahead of the cone and running after the cone.

Instead of getting the Array Minimum, you would have to find the value that's closest to what you want. Let's say the distance values are 10, 20 and 30. You want the camera to be at a distance of 27. You would then have to find the value 30, because that's closest to your desired value of 27.
Instead of directly hooking the Distance Between Node into the Array Minimum, you would first SUBTRACT a scalar value (e.g. 27), then do an ABSOLUTE VALUE, then hook that into the Array Minimum.


Top
 Profile  
 
 Post subject: Re: Switching Cam Position Based on Distance to Targeted Object
PostPosted: 13 Nov 2011, 20:13 
Offline

Joined: 16 Oct 2011, 14:13
Posts: 162
ok, interest del works nice. now to the minimum array, I opened it but don't know how and where to subtract the scalar value :

Image


Top
 Profile  
 
 Post subject: Re: Switching Cam Position Based on Distance to Targeted Object
PostPosted: 13 Nov 2011, 21:12 
Offline

Joined: 22 Mar 2010, 18:43
Posts: 391
You don't have to open the node. You can put the subtract outside, between the Distance Between and the Array Minimum.

Think about the data we're looking at (and simply right click any of the pipes to visualize that data in the viewport):
The Distance Between outputs an array of distance values. One distance for every position null. So let's say these are the values that flow out of the Distance Between: 10.3 | 18.9 | 13.4 | 7.7
You now want to find a camera position that has a distance of about 11. So you subtract 11 from the data we looked at above. You will get: -0.7 | 7.9 | 2.4 | -3.3
Now you do an Absolute value, so you get: 0.7 | 7.9 | 2.4 | 3.3
The result of that plugs into the Array Minimum, which will figure out that 0.7 is the smallest value, and that it is found at index 0. The rest of the tree behaves as always.


Top
 Profile  
 
 Post subject: Re: Switching Cam Position Based on Distance to Targeted Object
PostPosted: 14 Nov 2011, 00:39 
Offline

Joined: 16 Oct 2011, 14:13
Posts: 162
thx, did "subtract" and "absolute value" which works fine now, only thing is that the cam still jumps back and forth in front or behind the targeted cone, depending on which distance is closer at that time ... how is this solved that I can determine whether I want to be in front or behind the target ?

Image
Image


Top
 Profile  
 
 Post subject: Re: Switching Cam Position Based on Distance to Targeted Object
PostPosted: 14 Nov 2011, 02:27 
Offline

Joined: 22 Mar 2010, 18:43
Posts: 391
What exactly are you trying to do? It looks like you're working with a second curve and many different nulls now.
There is no way to define what's "in front" or "behind". For each cone-null pair you have two positions in 3d space which let you determine a distance vector.

If you want the camera to be positioned on the exterior curve, it would make more sense to directly sample the curve at various positions instead of using nulls. This way you could determine what's in front and what's behind, because from any given point on the curve you can only move in two possible directions.


Top
 Profile  
 
 Post subject: Re: Switching Cam Position Based on Distance to Targeted Object
PostPosted: 14 Nov 2011, 12:47 
Offline

Joined: 16 Oct 2011, 14:13
Posts: 162
ya exactly, I have a 2nd curve around the cone path that I used for duplicating by animation the nulls. I'm working on this study simulating to accompany a moving object, lets say a speed car, with camera poles placed around the speed track. Each pole then has multiple cams looking towards different angles so the spectator can choose which distance he likes to follow the object, while the function would determine the closest matching pole and angle automatically ... in terms of fetching the corresponding cam on a 25 frames (or else) per second.
I'm trying to narrow down the necessary circumstances of placing cam-poles to achieve useful results, in terms of object stability in the resulting movies.
You remember "The Matrix" camera effect, where the spectator could move around a still or slowmo in real time ... this is similar, but this time used for following. I'm checking what the least amount of cam poles would be to achieve ok results.
Question would be if it makes sense to give the object 3 positions, adding 3 nulls to it like a triangle, so the info is given what is the front and what is the back of the object, even if it is spinning. Probably in conjunction of using the numbering of the poles, so that the forward and backward direction of the fetch-pic-cam on the cam-pole sequence is determined. Otherwise if the object starts spinning, the cam would jump around again, but should stay calm at the distance defined by the spectator earlier.

http://files.2he.com/Cam_02_06.scn


Top
 Profile  
 
 Post subject: Re: Switching Cam Position Based on Distance to Targeted Object
PostPosted: 14 Nov 2011, 14:16 
Offline

Joined: 22 Mar 2010, 18:43
Posts: 391
Well, you could use the outer curve to determine what's in front and what's behind. I can build a tree later, but the theory would be something like this:

1) Get the cone's closest location on the outer curve. Let's say this is at curve U 0.7
2) Do the same math with the Subtract and absolute value that we did before
3) Instead of just finding the minimum in array, we would now also check whether that null's closest location on the outer curve is greater than or less than U 0.7


Top
 Profile  
 
 Post subject: Re: Switching Cam Position Based on Distance to Targeted Object
PostPosted: 15 Nov 2011, 04:46 
Offline

Joined: 16 Oct 2011, 14:13
Posts: 162
so you mean using the passage already left behind on the 2nd curve, sounds good.

1) U being the % of the cuves length ... is there a certain function for this you have in mind ?
3) Another "if greater than" function to be added ? So needs to determine if to use the current calculated nearest value or uses the next calculated value if first value was with 2nd curve smaller than example 0.7. Do we then have to place the last valid value as variable that gets refreshed per cycle ?


Top
 Profile  
 
 Post subject: Re: Switching Cam Position Based on Distance to Targeted Object
PostPosted: 15 Nov 2011, 14:20 
Offline

Joined: 22 Mar 2010, 18:43
Posts: 391
Hi, I've made an ICE tree that works, I'll post it later today with some annotations.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group