Switching Cam Position Based on Distance to Targeted Object
Re: Switching Cam Position Based on Distance to Targeted Object
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
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
Re: Switching Cam Position Based on Distance to Targeted Object
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
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
Re: Switching Cam Position Based on Distance to Targeted Object
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 ?
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 ?
Re: Switching Cam Position Based on Distance to Targeted Object
Hi, I've made an ICE tree that works, I'll post it later today with some annotations.
Re: Switching Cam Position Based on Distance to Targeted Object
I was going to simplify the tree, but my new version didn't work, and I don't have time to really look over it now.
So I have attached my original compound, which is probably confusing but seems to work.
First, you replace the ICE tree on your camera by this:
For evaluation reasons, we're now doing the calculation on a separate null. So make a new null, add an ICE tree to it, then drag the attached compound in and connect it.
So I have attached my original compound, which is probably confusing but seems to work.
First, you replace the ICE tree on your camera by this:
For evaluation reasons, we're now doing the calculation on a separate null. So make a new null, add an ICE tree to it, then drag the attached compound in and connect it.
- Attachments
-
- Null Distance.xsicompound
- (43.94 KiB) Downloaded 51 times
Re: Switching Cam Position Based on Distance to Targeted Object
the 2nd part with creating a new null and connecting the Null Distance compound I was able to do, but the 1st part I'm not able to create a Get null.NewCamMatrix ... I tried to name the null that way, but it won't let me yet
Re: Switching Cam Position Based on Distance to Targeted Object
You can double click the Get Data node and type it out. "null.NewCamMatrix" means that the attribute "NewCamMatrix" lives on an object called "null"
You can either chain Get Data nodes together and do: "Get null" into "Get .NewCamMatrix" or just put it all into a single Get Data. The attribute "NewCamMatrix" is calculated inside of the compound. The camera's ICE tree just reads this attribute and uses it to set its own matrix.
You can either chain Get Data nodes together and do: "Get null" into "Get .NewCamMatrix" or just put it all into a single Get Data. The attribute "NewCamMatrix" is calculated inside of the compound. The camera's ICE tree just reads this attribute and uses it to set its own matrix.
Re: Switching Cam Position Based on Distance to Targeted Object
bingo that worked. so you're building the logic on a separate null, like a container that holds the logic. I was trying to get the distance slider, but wasn't able to find out how ... once I expand a compound, how can I collapse it back ? I think when the compound was collapsed I could click on it to get the custom slider ?
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: Switching Cam Position Based on Distance to Targeted Object
The "K" marks the spot... ;) (From here)Frank1000 wrote:once I expand a compound, how can I collapse it back ?
Stay safe, sane & healthy!
Re: Switching Cam Position Based on Distance to Targeted Object
I had used the x (K) before, but rt now I don't get it displayed, I tried to select stuff to see it, but didn't come up
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: Switching Cam Position Based on Distance to Targeted Object
(same page)Move the mouse over a compound node, and click the e icon that pops up.
or
Right-click on a compound node (not over a port) and choose Edit Compound.
Stay safe, sane & healthy!
Re: Switching Cam Position Based on Distance to Targeted Object
the only one which has an "e" now is the Set Data one and it is already collapsed. I have this
is it possible to get it back to this ?:
or is that compound gone after I have exploded it once ?
what I'm actually trying to get is the distance slider, but couldn't figure out how yet.
is it possible to get it back to this ?:
or is that compound gone after I have exploded it once ?
what I'm actually trying to get is the distance slider, but couldn't figure out how yet.
- Hirazi Blue
- Administrator
- Posts: 5107
- Joined: 04 Jun 2009, 12:15
Re: Switching Cam Position Based on Distance to Targeted Object
Now I see what our misunderstanding was about:
I meant collapsing as the opposite to editing a compound, while you mean collapsing as the opposite to exploding a compound (which I would call (re)creating it). Strictly speaking you cannot get back to the original compound after exploding it, AFAIK, but you can always create a new compound using the old nodes...
Sorry for the misunderstanding... ;)
PS: why "explode", when you can just as easily "edit"?
I meant collapsing as the opposite to editing a compound, while you mean collapsing as the opposite to exploding a compound (which I would call (re)creating it). Strictly speaking you cannot get back to the original compound after exploding it, AFAIK, but you can always create a new compound using the old nodes...
Sorry for the misunderstanding... ;)
PS: why "explode", when you can just as easily "edit"?
Stay safe, sane & healthy!
Re: Switching Cam Position Based on Distance to Targeted Object
ya gotit, edit instead of explode is the key. I made a new ICE tree and now everything is working good, thx for showing how. I was curious to follow your node logic, but must confess, although I'm quite 3D savvy in XSI, this is really new to me. I understand the concept of scripts, represented by nodes, that can be tied together and their variables and functions can be edited, but oh boy, this takes a while before getting fluent with it.
I wanted to make a distance animation, that in this case starts behind the car, and then moves in front of the car during the course of action, but got stuck at the behind-checkbox. Checking if the distance needs to be a value from negative to positive, while zero is the closest, negative is behind and positive is in-front.
Basically the goal is, now that the scene works good, to create the view- templates (let me call it so) to define view sequences.
Meaning a compound of multiple view-elements of how the object is finally seen: e.g.
1st-element 10sec.: distance animation from behind to in front;
2nd-element 5sec: stay in front of the object;
3rd-element 2 sec: jump to a fixed-watching-position and watching the object from there;
4th-element 6sec: leaving the fixed-watching-position and make animation towards a certain distance again ...
something like that, and combine it into a template, so I can make the different viewing templates and start call them up manually from something like a control-panel during the animation runs. Connecting the templates to number keys on the keyboard for example.
I wanted to make a distance animation, that in this case starts behind the car, and then moves in front of the car during the course of action, but got stuck at the behind-checkbox. Checking if the distance needs to be a value from negative to positive, while zero is the closest, negative is behind and positive is in-front.
Basically the goal is, now that the scene works good, to create the view- templates (let me call it so) to define view sequences.
Meaning a compound of multiple view-elements of how the object is finally seen: e.g.
1st-element 10sec.: distance animation from behind to in front;
2nd-element 5sec: stay in front of the object;
3rd-element 2 sec: jump to a fixed-watching-position and watching the object from there;
4th-element 6sec: leaving the fixed-watching-position and make animation towards a certain distance again ...
something like that, and combine it into a template, so I can make the different viewing templates and start call them up manually from something like a control-panel during the animation runs. Connecting the templates to number keys on the keyboard for example.
Re: Switching Cam Position Based on Distance to Targeted Object
Hi Chris, I’ve watched myself into a lot of the ICE movies now and it’s becoming quite clear to me now how ICE works and how it’s handled.
If you exactly know what you need to achieve and are not just using ready templates, it basically is understanding the algorithm and math of the needed function and to bring it into the language softimage uses here ... don’t know if that is one of the major ones c++ or so, or an own one.
ICE is the GUI to it and comes with a management and a load of “includes” or “snippets” or as it’s called in ICE with “tasks” and “tools”, some lighter, some heavier. So it basically is a gate to the 3D / programming universe.
I went back and built a 1unit to 1meter model, so don’t have to translate some real world values.
Next step for me is to determine the average speed that is being driven (by the cars) at the corresponding speed track location.
In terms of car weight, slipping, acceleration factor (power), deceleration, max. speed, car weight, centrifugal force, and maybe some more ... doesn’t have to be all the way finite elements here, just a few values, so I can determine some useful average speed at the respective location.
That allows me to mathematically determine how close I need to place camera nulls, so the resulting movie stays smooth, and place the nulls automatically.
I thought the best is to start out with a centrifugal force that, in conjunction with the path ahead determines which max. speed can be driven by the car, so the car then accelerates and decelerates accordingly to be as fast as possible but at the same time to stay on the track.
I checked myself through the ICE tasks and tools but wasn’t able to find something centrifugal power or so ... any idea if there is a tool already available ? If no centrifugal force there yet I guess I have to dig 1 level deeper and check how to make one.
If you exactly know what you need to achieve and are not just using ready templates, it basically is understanding the algorithm and math of the needed function and to bring it into the language softimage uses here ... don’t know if that is one of the major ones c++ or so, or an own one.
ICE is the GUI to it and comes with a management and a load of “includes” or “snippets” or as it’s called in ICE with “tasks” and “tools”, some lighter, some heavier. So it basically is a gate to the 3D / programming universe.
I went back and built a 1unit to 1meter model, so don’t have to translate some real world values.
Next step for me is to determine the average speed that is being driven (by the cars) at the corresponding speed track location.
In terms of car weight, slipping, acceleration factor (power), deceleration, max. speed, car weight, centrifugal force, and maybe some more ... doesn’t have to be all the way finite elements here, just a few values, so I can determine some useful average speed at the respective location.
That allows me to mathematically determine how close I need to place camera nulls, so the resulting movie stays smooth, and place the nulls automatically.
I thought the best is to start out with a centrifugal force that, in conjunction with the path ahead determines which max. speed can be driven by the car, so the car then accelerates and decelerates accordingly to be as fast as possible but at the same time to stay on the track.
I checked myself through the ICE tasks and tools but wasn’t able to find something centrifugal power or so ... any idea if there is a tool already available ? If no centrifugal force there yet I guess I have to dig 1 level deeper and check how to make one.
Who is online
Users browsing this forum: No registered users and 60 guests