7 Replies Latest reply on Apr 3, 2007 4:04 AM by duckets

    w3d mesh has wrong numer of points

    Level 7
      Hi all

      When i create a simple object in Lightwave and export it as a w3d, the
      number of faces and vertices in Director do not match the number of points
      and polygons in Lightwave. Even when i create a simple tripled cube with 12
      polygons and 8 points in LW i can get anything from 10 to 12 faces and 8 to
      24 vertices in Director - for the life of me i can't get a one to one match
      which i need to manipulate the object correctly.

      The object has only a single surface and i've tried it as quads, tripled and
      tried it with merged points and without but no luck - believe me i've tried
      creating around 100 different objects in the last 2 days to nail this one.
      The odd thing is the object looks fine in Director, but when i check for the
      existence of points i know must be there (otherwise it wouldn't look right)
      by going thru the vertexList and checking the positions, they don't exist!

      So, has anybody come across this issue and ever found a solution. Also, if
      there's anybody out there who uses Max or Maya and knows for a fact that
      objects are exported accurately from these programs then please let us know.

      Cheers
      Paul


        • 1. Re: w3d mesh has wrong numer of points
          Level 7
          Hi there,

          I work with Lightwave8 for w3D content and found exactly the same problem a
          couple of years back. Sadly I have not found a reason, or a solution. I just
          wanted to say you're not going insane. (unless we both are of course).

          A partial work around is to either generate the mesh to manipulate using
          lingo yourself (if it is simple geometry), or apply weight mapped bones in
          lightwave to the points you need to move, and move the bones directly using
          lingo.

          Cheers

          Richard Smith
          www.funpods.com


          • 2. Re: w3d mesh has wrong numer of points
            Level 7
            Thanks for the info Richard... i was starting to doubt my sanity!

            Both your workaround suggetsions may work for what i'm doing - i'm also
            curious to know if other programs such as Max and Maya have the same problem
            when exported to w3d.

            Cheers
            Paul

            "Richard" <donotuse@funpods.com> wrote in message
            news:esm8ht$b3k$1@forums.macromedia.com...
            > Hi there,
            >
            > I work with Lightwave8 for w3D content and found exactly the same problem
            > a couple of years back. Sadly I have not found a reason, or a solution. I
            > just wanted to say you're not going insane. (unless we both are of
            > course).
            >
            > A partial work around is to either generate the mesh to manipulate using
            > lingo yourself (if it is simple geometry), or apply weight mapped bones
            > in lightwave to the points you need to move, and move the bones directly
            > using lingo.
            >
            > Cheers
            >
            > Richard Smith
            > www.funpods.com
            >


            • 3. Re: w3d mesh has wrong numer of points
              PpHammer
              Hi,

              We use Max here and unfortenately we experience the same problems. The models look normal, but the amount of vertices just differs with the amount in 3ds max. Even up to a point that a model has more vertices than it could/should actually have. For example a standard triangulated teapot in 3ds max has 1024 polygons. If each polygon has a unique set of vertices (3 per polygon) I should have 3072 vertices. However, in DIrector it sometimes comes up with over 3200 vertices. No idea how... The way you've unwrapped your model also seems to be a factor of different vertex counts.

              Polycount seems to behave rather strange as well. If the model you export (3ds max) is an "editable mesh" different polycounts occur. When the model is an "editable poly" the amount of polygons are the same. I just tested this with two standard teapots in 3ds max.

              Don't forget to turn of LOD of the models, if you haven't done so already. These settings can adjust polycount, as well as having a 3d member open on stage or only ("closed") in your cast.

              I did manage to export models with exactly the same amount of vertices and polygons in 3dsmax and Director. In 3ds max I triangulate all models and break all vertices. Each face/polygon than has an unique set of vertices. When exporting the amount of polygons/vertices are the same. However, it is not recommended using this technique a lot. It creates larger datasets for your models (more vertices than you'd actually need) and you lose "smoothing" so everything will look flatshaded. We only break models when they will be using lightmaps. This way we can make sure the amount is the same and results can be predictable.

              These are my findings a bit. Don't know if they are of any help. If anybody else has any inof/tips on this it might be a good idea to share it. I don't think it can be fixed, but with more info we could actually make it more predictable or even work around it.

              Cheers
              Pieter
              • 4. Re: w3d mesh has wrong numer of points
                Level 7
                Thanks for the info Pieter... it's handy to know that Max behaves much the
                same.

                I'm sure someone must have solved this problem at some point as I would have
                thought dynamically manipulating vertices in a mesh imported from an
                external program would be an occasional requirement. However, for my project
                I think I will go down the route of creating the mesh in Director as it's
                fairly simple and that way I know the vertices are exactly where I need
                them.

                Cheers
                Paul


                • 5. Re: w3d mesh has wrong numer of points
                  ensamblador
                  I have discover that the number of vertices depends of the sorting or arranging in the texture coordinates system (also known UVW map). You know a vertex can be breaked so it can be in 2 places of the texture at the same time. For the CAD software (LW, 3DSMAX) it is still one vertex. For the exporter they are two.

                  The solution is to play around with meshDeform modifier. Access vertexlist, texturecorrdinatelist, etc. see help.
                  • 6. Re: w3d mesh has wrong numer of points
                    Level 7
                    For me the issue is that the object can have different number of vertices
                    reported each time you export it, seemingly at random, even if no changes
                    have been made to the object or UVW map.

                    Thanks for the info though.

                    Richard Smith


                    • 7. Re: w3d mesh has wrong numer of points
                      duckets Level 1
                      There's a couple of things which can cause the vertex count to vary:

                      1) models *are* affected by LOD even if the modifier isn't applied. The modifier simply allows you to modify the LOD settings. From the director help page regarding "lod (modifier)":

                      "All such models use detail reduction whether or not the lod modifier is attached. Attaching the modifier allows you to control the properties of detail reduction."

                      To remove the effect of lod, it is necessary to *add* the lod modifier, then set the settings like this:

                      myModel.lod.auto = false
                      myModel.lod.level = 100

                      You may also find you need a frame update with the w3d on stage for these settings to 'take'.


                      2) If you are using custom UV coordinates, and your particular mapping means that a given vertex may be used by a number of faces, each of which has different uv coordinates, the vertex may have to be included a number of times, once for each different set of UV coordinates that are required by each face that makes use of it. Eg, one vertex (corner) of a cube is used by 3 faces of that cube. If each face has unique UV coordinates, then that vertex will be included 3 times, once for each set of UV coords for each face.

                      hope this helps!

                      - Ben