Quote:



Re: [Plugin] Import von 2. UVMap / Import of 2nd U [Re: William]
#749340 - Mon Apr 30 2007 02:04 PM
Edit post Edit Reply to this post Reply Reply to this post Quote Quick Reply Quick Reply

it means that the python tool won't be needed anymore.

i already have a mesh generation algorithm which works in c now. unfortunately it's brute force and quite slow (~15 seconds for a 20000 polygon mesh) but i don't think it's a big problem since the result can be saved. doing an optimized version in c would be too much work. in python there are data structures which make it easy to make a much faster version even with python being an interpreted language but using an external tool is a bit cumbersome. i think it's nicer to have everything in the plugin.



there will be 3 dll functions:

Code:

dllfunction ent_exportmesh(entity, filename);
dllfunction ent_importmesh(entity, filename);
dllfunction ent_loadseconduvset(entity1, entity2); // this part got done by the python tool previously



Code:

// example 1

// load model with texture uv-set
e1 = ent_create("landscape.mdl", nullvector, 0);
e1.material = mtl_lightmap;

// load model with light map uv-set
e2 = ent_create("landscape_lm.mdl", nullvector, 0);

// generate and assign a new mesh with both uv-sets
ent_loadseconduvset(e1, e2);
ent_remove(e2);

// save mesh with both uv-sets for faster reuse
ent_exportmesh(e1, "landscape_lm.mesh");





What would the work flow be for a model already placed in WED, with an action assigned to it? Would it be like this(considering all your lighting meshes have been properly merged)?

my.material = mat_light;
ent_importmesh(my, "landscape_lm.mesh");

Is ent_importmesh basically just like ent_morph? Instead, just changing the existing mesh with the 2uvset one?

P.S - I like the idea of not using python, by doing everything in the plugin, it will indeed be much faster. Ability to save the merged mesh is also very good!


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/