collada "just vertex" example model?/multi-lane struct question

gtoledo3's picture

Kinda OT:

Does anyone have a collada model example that they can share, that has only vertex info present; no normal, uv, tex coords, etc? Is that supported? Before I try to put one together, I figured I would ask.

Also, does anyone have any thoughts on the most direct/performant way to strip a given lane out of a multi-lane structure, "in QC"? So, if it was a float4 of coord data, to strip out the "w" lane, or the x, y, or z, etc., and output float3? I admittedly haven't given it much thought yet... wondering if anyone has crossed that bridge before.

gtoledo3's picture
Re: collada "just vertex" example model?/multi-lane struct ...

Also, does QC actually pay attention to the lighting/shader info, and FOV info in a dae file, or does that get ignored? For example, I've seen phong and lambert shaders evoked inside of the file (which sort of surprises me).

dust's picture
Re: collada "just vertex" example model?/multi-lane struct ...

you could assign your float4 to a float3 sort of like this. where size is your global size and input is your global const float4 vector that you want to strip w from.

int  tid = get_global_id(0);
int size = get_global_size(0);
 
float3 temp = (float3)(0.f);
output[tid] = temp;
 
for( int i = 0; i < size; i++)
{
 
output[i].x = input[i].x;
output[i].y = input[i].y;
output[i].z = input[i].z; 
 
 
} 

here is a box model. it is easiest to open in text and delete the uv's and normals. there is just some cam info translation and the mesh verts in the dae file.

PreviewAttachmentSize
box.zip1.54 KB

gtoledo3's picture
Re: collada "just vertex" example model?/multi-lane struct ...

I wasn't sure if it was "sane" to just delete out the uv/normal info, even if it worked. I'm also curious what "stride" is supposed to indicate. The file format is pretty simplistic overall.

Thanks for the note on the float4-float3 conversion... totally obvious! I should have realized that one from stuff I've done before - it's exactly like something I was doing with color struct awhile back. So one doesn't "strip out" the w, as much as only pass the other stuff... makes sense.

dust's picture
Re: collada "just vertex" example model?/multi-lane struct ...

i wasn't sure what the w was really at first. my teacher explained it to me as sort of perspective type of weighting which makes sense. to me i would say stride must be the vector dimensions like stride 3 would mean float3 XYZ, but i'm just guessing, i'm sure vade would know.

cybero's picture
Re: collada "just vertex" example model?/multi-lane struct ...

MeshLab is our friend :-) [IMHO].

Find attached a .zip, contains one simple 10*10 grid with vertices and normals and one with vertices and no normals.

PreviewAttachmentSize
simpleverticesgrids.zip3.72 KB

gtoledo3's picture
Re: collada "just vertex" example model?/multi-lane struct ...

Cool... I suspected meshlab might do that, b/c I remember exporting and having no normals at some point. Thanks!

gtoledo3's picture
Re: collada "just vertex" example model?/multi-lane struct ...

I think that makes sense on the stride thing. I'll look at some more files and double-check.

cybero's picture
Re: collada "just vertex" example model?/multi-lane struct ...

As it happens MeshLab has been updated today to v1.30, the source code is also available for download, if one wants to compile at source.

gtoledo3's picture
Re: collada "just vertex" example model?/multi-lane struct ...

Oh, the source is available! That app is nice.

The built in smoothing algorithm is cool... I've had some good results running low poly models into it, using the smoothing tool, and exporting. There are tons of great functions in it.

Between that, Blender, and Sketchup and it's mound of plugins, there are some seriously robust free modeling tools out there right now. I like Meshlab a lot, b/c it seems like everything is placed right where I would imagine myself looking for it (for whatever reason). I get stuff done quick with it.