Saturday, 1st September, 2007

Your vertex count isn’t the same in 3ds max and in Virtools? Is Virtools buggy?

The short answer is: no!

The long answer is:  3ds max hides complexity. Before per-pixel handling via programmable pixel-shaders became available on consumer gfx cards, shading components across the triangle were mainly calculated by interpolating the value between the three vertices. A triangle is flat and thus you can interpolate in a linear/straight way. For example the vertex colors and normals.

Now, if you have a mesh inside 3ds max - let's say a cube in it's default state. It has 6 smoothing groups, because there are hard edges between each face. How many normals do you need for each corner vertex? Each corner has 3 faces - each of them pointing to another direction and having "hard" seams at it's borders.

We need 3 normals for all 8 corners … that's 24 vertices. Ok, now convert it to an 'editable poly', go into the face sub-level and hit CTRL+a to select all faces. Hit "clear all" and then smoothing group "1" in order to assign a single smoothing group to all faces. Export this one and load it into Virtools. And?

Oh, it ain't 24 anymore but not 8 neither? Yes! That's because there are not only normals stored in the vertices but also UV coordinates and color/material information. In 3ds max do then the following:

  • add the "UV Unwrap" modifier to the cube
  • go into face sub-level mode
  • select all
  • open the "Edit…" dialog
  • select Mapping -> Unfold Mapping ('walk to closest face') -> Ok
  • You now have a cross-like UV layout
  • go into vertex sub-level mode
  • select through each vertex and notice that sometimes another one is highlighted in blue
  • right click and select "target weld" form the context menu
  • now weld each vertex to it's "blue partner" in case it has one

Import the smoothed cube that has no UV seams into Virtools … … … what does the mesh setup say? 8 vertices, finally !!!

Cool

I hope this little tutorial has shed some light on the topic therefore you should now be able to understand better why there might be differences in vertex count between Virtools and 3ds max.

Bookmark and Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Technorati
  • Digg
  • Reddit
  • Google Bookmarks
  • YahooMyWeb
  • Live-MSN
  • Facebook

2 Comments »

  1. A very clear and comprehensive explanation, thanks.

    Comment by Patrick Hogenboom — Saturday, 1st September, 2007 @ 10:11

  2.  I do the same thing using deep exploration. I'm using maya but it's the same problem. I import the maya file in Deep exploration then save it as a VRML in settings I turn everything of. Same result.

    Comment by Ewoud — Thursday, 6th September, 2007 @ 11:18

RSS feed for comments on this post. | TrackBack URI

Leave a comment

XHTML ( You can use these tags): <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .

Bookmark and Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Technorati
  • Digg
  • Reddit
  • Google Bookmarks
  • YahooMyWeb
  • Live-MSN
  • Facebook