PDA

View Full Version : NVMeshMender



richardve
04-01-2002, 04:22 AM
I just finished reading one of the new Powerpoint presentations from NVIDIA.. (the one about texturespace on real models)

This presentation mentions something about a new library, NVMeshMender, to fix problems with mirrored textures and some other bad thingies.

However, I can't find this tool anywhere on the NVIDIA site, and neither in the CVS.
Is this library intended for registered developers only or will it also be posted at the public developer site?
Is it actually already available to anyone?

(btw. Ya man, this is an offtopic non-advanced post, but I DO search before posting a msg.. please don't bite if I didn't search good enough.. I don't taste very well)

SirKnight
04-01-2002, 04:39 AM
Ya i have been wondering the same thing. After i read that presentation i was like, i must have that tool! http://www.opengl.org/discussion_boards/ubb/smile.gif I cant find it anywhere so i guess they are still tweaking it.

-SirKnight

cass
04-01-2002, 12:03 PM
Yes, it'll be available "soon".

Thanks -
Cass

richardve
04-01-2002, 06:12 PM
Great!
Thanks!

davepermen
05-26-2002, 01:12 AM
as it is availible, is there some demo prog yet using it? we're having troubles with the meshes, they get quite ****ed up..

Tandyi
05-26-2002, 02:57 AM
http://developer.nvidia.com/view.asp?IO=NVMeshMender

Is this what you guys want, been there for a while!

davepermen
05-26-2002, 03:11 AM
i know this is there, as i told we're using it. i asked for a demo-program showing the usage, but we got the problems under control. good work nvidia, even if the interface is quite... funny.. and the description has a small error in..

Gorg
05-26-2002, 08:18 AM
One things that bugs me about the tool is that uses unsigned int for indices whereas nvtristrip uses unsigned short.

SirKnight
05-29-2002, 02:30 PM
I have a question about NVMeshMender. Now in the comments where it shows the usage, which isn't the best example i have seen but i guess it's better than nothing, they have this:




att.Name_ = "position";

for ( int p = 0; p < number_of_vertices; ++p )
{
att.floatVector_.push_back( myPositions[ p ].x );
att.floatVector_.push_back( myPositions[ p ].y );
att.floatVector_.push_back( myPositions[ p ].z );
}

att.floatVector_.clear();

att.Name_ = "indices";

for ( int i = 0; i < number_of_indices; ++i )
{
att.intVector_.push_back( myIndices[ i ] );
}


Ok, now after the first loop they call clear() on the floatVector_ thingy, wouldnt this just demolish everything in floatVector_ that was just put in? It's been a little while since i have used STL but from what i just read in a book clear()...well clears whats in the 'list' if you will. Then they say att.Name_ = "indices"; after that, well isnt that just overwriting what was just in there which was "position"?

It would be nice if i could see a very simple demo showing it working, im trying to use it in the hope that my per pixel lighting program will work. Im now pretty sure its my tangent space stuff thats not right cuz in the funcs that i draw each of my objects i load in the tangent space matrix stuff into 3 registers then draw, but even if i comment those calls out, the program still looks the same. http://www.opengl.org/discussion_boards/ubb/smile.gif

-SirKnight

SimmerD
05-29-2002, 07:55 PM
Sorry for the poor example. Here is a fixed comment example section.

Here is an example usage scenario :

Say you have positions & indices, and want textures, normals, and tangents.

NVMeshMender aMender;

MVMeshMender::VAVector inputAtts; // this is what you have

MVMeshMender::VAVector outputAtts; // this is what you want

MVMeshMender::VertexAttribute att; // this is my working attribute

att.Name_ = "position";

for ( int p = 0; p < number_of_vertices; ++p )
{
att.floatVector_.push_back( myPositions[ p ].x );
att.floatVector_.push_back( myPositions[ p ].y );
att.floatVector_.push_back( myPositions[ p ].z );
}

inputAtts.push_back( att );

att.floatVector.clear();

att.Name_ = "indices";

for ( int i = 0; i < number_of_indices; ++i )
{
att.intVector_.push_back( myIndices[ i ] );
}

inputAtts.push_back( att );

att.intVector.clear();

att.Name_ = "indices";
outputAtts.push_back( att );

att.Name_ = "tex0";
outputAtts.push_back( att );

att.Name_ = "normal";
outputAtts.push_back( att );

att.Name_ = "tangent";
outputAtts.push_back( att );

// All inputs except for indices are assumed to be sets of 3 floats

// "indices" are assumed to be unsigned ints

// "tex0" is used for the tangent space calculation

// "tex0" is the only coordinate set generated, and the texture matrix applies only to it

// All unknown attribute types, including "tex1", "tex2", "random_attribute", "weights", "bones", etc.
// are simply passed through. They will be duplicated as needed just like positions, normals, etc.

bool bSuccess = aMender.Munge( inputAtts, // these are my positions & indices
outputAtts, // these are the outputs I requested, plus extra stuff generated on my behalf
3.141592654f / 2.5f, // tangent space smooth angle
NULL, // no Texture matrix applied to my tex0 coords
FixTangents, // fix degenerate bases & texture mirroring
FixCylindricalTexGen // handle cylidrically mapped textures via vertex duplication
WeightNormalsByFaceSize // weight vertex normals by the triangle's size
);

if ( !bSuccess ) return false;

SirKnight
05-30-2002, 05:55 AM
Ah that makes more sence now. If i have any more questions about mesh mender ill post. Thanks.

-SirKnight