using ICE to control level of detail of referenced models

Discussions about SOFTIMAGEs© Interactive Creative Environment©
maxcrow
Posts: 12
Joined: 18 May 2012, 12:44

using ICE to control level of detail of referenced models

Post by maxcrow » 03 Dec 2013, 00:04

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

NNois
Posts: 754
Joined: 09 Jun 2009, 18:33

Re: using ICE to control level of detail of referenced models

Post by NNois » 03 Dec 2013, 00:42

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...

maxcrow
Posts: 12
Joined: 18 May 2012, 12:44

Re: using ICE to control level of detail of referenced models

Post by maxcrow » 03 Dec 2013, 01:09

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

Post by NNois » 03 Dec 2013, 08:02

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