Switching Cam Position Based on Distance to Targeted Object
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.
Re: Switching Cam Position Based on Distance to Targeted Object
oh found it, syflex.gravity
Re: Switching Cam Position Based on Distance to Targeted Object
There is a lot of documentation out there on these things. If you search Google for "game car physics" or similar you will find many results because these types of algorithms are used all the time in game programming.Frank1000 wrote: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.
A good series of articles is this one, Physics of Racing by Brian Beckman:
http://phors.locost7.info/contents.htm
I had started working on an ICE car simulator of sorts, but never got around to letting the car make turns because the formulas started to confuse me a bit:
http://vimeo.com/28309792
If you want the camera to smoothly follow the car, I think it would be preferrable to use some kind of pose constraining or parenting (either regular or through ICE) than to let the camera jump from null to null.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.
Re: Switching Cam Position Based on Distance to Targeted Object
great resources ! I'm wondering if someone ever built a working auto race ICE compound already.
Who is online
Users browsing this forum: No registered users and 36 guests