Hi,
This might not be related to ICE at all, but is there a way to import models (.emdl) dynamically depending on a distance or visibility to a camera? The trick is to not have them in the scene but referenced, keeping it very light. A situation could be a low resolution building that switches to a high resolution model as the camera approaches then is off loaded when its out out sight of the camera. Can you control the active resolution of a referenced model with a ice attribute or a keyed parameter?
Thanks.
Max
using ICE to control level of detail of referenced models
-
maxcrow
- Posts: 12
- Joined: 18 May 2012, 12:44
-
NNois
- Posts: 754
- Joined: 09 Jun 2009, 18:33
Re: using ICE to control level of detail of referenced models
you could definitly do that, at least with my non scripting knowledge i think it's doable ;-)
- importing your models in referenced mode, not automaticaly
-then controlling visibility switch of the polymeshs in ice by the distance to the camera.
Your ICE tree would simply get the camera, the object position, then calculate the distance and use a case node to drive the visibilities
if your mesh points are moving but not the srt you cand do that too with "get set average" on the point positions.
this is using imported referenced models, so the scene is light, but contain your meshs
Alternatively you could replace ref models by MentalRay Archives/Standins this is ultra lightweight but i think it's more complicated to know the position of the polygons...
- importing your models in referenced mode, not automaticaly
-then controlling visibility switch of the polymeshs in ice by the distance to the camera.
Your ICE tree would simply get the camera, the object position, then calculate the distance and use a case node to drive the visibilities
if your mesh points are moving but not the srt you cand do that too with "get set average" on the point positions.
this is using imported referenced models, so the scene is light, but contain your meshs
Alternatively you could replace ref models by MentalRay Archives/Standins this is ultra lightweight but i think it's more complicated to know the position of the polygons...
-
maxcrow
- Posts: 12
- Joined: 18 May 2012, 12:44
Re: using ICE to control level of detail of referenced models
Ah, I was having problems with that, get average is the key to the boolean value for the render viz. Thanks.
-
NNois
- Posts: 754
- Joined: 09 Jun 2009, 18:33
Re: using ICE to control level of detail of referenced models
All the "set" node transform per point values to a per object context (get set average, build array from set etc...)
So il you get pointposition you get the pointposition of one point at a time and in a loop for all point, with that you can't calculate an average SRT position...
But if you get pointposition -> get set average -> you get One position vector
Or more detailled and comprehensible get pointposition -> build array from set -> get array average ... do the same
Alternatively you could calculate the point nearrest from the camera, with a setup a little more compliquated
So il you get pointposition you get the pointposition of one point at a time and in a loop for all point, with that you can't calculate an average SRT position...
But if you get pointposition -> get set average -> you get One position vector
Or more detailled and comprehensible get pointposition -> build array from set -> get array average ... do the same
Alternatively you could calculate the point nearrest from the camera, with a setup a little more compliquated