Jean-Charles,
Upon export from a 3D modeling package, the LOD modifier is attached to each model
resource in the file (note: it's on the _model_resource_, not the model!). Upon
importing/inserting that W3D file into Director the model resources have the LOD
modifier attached and enabled. For example, immediately after importing a sample file:
put member("knot").model[1]
-- model("Torus Knot01")
put member("knot").model[1].resource.lod.auto
-- 1
put member("knot").model[1].resource.lod.level
-- 97.5694
put member("knot").model[1].resource.lod.bias
-- 100.0
As such, as the model moves towards or away from the camera it will experience polygon
reduction/increase as needed, with no work on your part. This all occurs if you do
nothing but create and export models, then import those into Director.
Let's once again quote the docs:
> "The lod modifier data is generated by 3D
> modeling programs for all models. Setting
> the userData property "sw3d_no_lod = true"
> allows you to specify that the lod modifier
> data and memory be released when streaming
> is complete"
As I said above, all model resources get the LOD modifier upon export. Once you've
loaded this into Director's memory it occupies a certain amount of RAM (depends upon
the geometry size and the presence of the LOD data). This "sw3d_no_lod" parameter is
settable within your modeling package prior to export and is not something you use
inside of Director. Check the exporter documentation for reference (I know it's
explicitly mention in the 3DSMax exporter docs [both v3.1 and v4 docs], but I'm not
sure about other exporters). The intent of this property was to cause Director to
release the LOD data from memory making your Director movie more RAM friendly once the
member was fully loaded (when the member's state finally reaches four
Director/Shockwave would purge the LOD data from memory).
But hold on kids, there's a problem, A.K.A. a bug. Setting this property in 3DS Max
currently has no effect (I don't know about other exporters at the moment), the LOD
data is not purged from memory after loading and so this is all much ado about nothing
until that bug is fixed.
Now, you might be asking yourself: what's the difference between the LOD modifier on
the resource versus being applied on the model? If you apply LOD modifications at the
resource level, then all models using that model resource will be affected. If you
apply LOD modifications at the model level, then only that particular model will be
affected.
So, you ask, "...Do I have to apply the "lod" modifier to every models of my
project?" The answer is no, the LOD modifier is already there on every exported
model's resource waiting for you to use. Just make sure that you properly reference it
via the resource, as I showed above:
member("3D").model("foo").resource.lod.propNameHere
This will work if you want the same changes applied to all models using that resource,
if you want to get control on a model by model basis, then yes, you will need to add
the modifier to the models of concern within your scene.
Does that answer your question? If not then let us know and I'll try again.
Cheers,
Tom
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]