xFile's Material Info

Hello,

I want to get and use color data of xfile’s Material {…}, but I can’t find any solution yet.
Does anyone know good method?

XFile node can get TextureFileName of each subsets.
It looks access to xfile’s Material data.

vvvv can get string when save xfile as text format, but I think it’s not a smart:-(

helo mino,

not sure exactly if the material color corresponds to the vertex colors. VertexBuffer (EX9.Geometry Split) gives you access to the Diffuse and Specular colors associated with each vertex. same can be accessed inside a vertexshader via the COLOR0 and COLOR1 semantics.

hi mino,

as i know (may wrong)
if you need correct uv map for your textures, you must do it before, and export to xfile with these textures.
if you need just to apply same color and you see several slices at TextureFileName, follow attached file

minoXfile.ZIP (2.2 kB)

for an example about per-vertex-coloring you may like this:

http://legacy.vvvv.org/tiki-index.php?page=VertexColors+(EX9.Effect)+

hi all,

thanks for advice! so there is no way to access xfile’s Material data, right? attached zip file contain my simple class for understanding xfile and VertexBuffer.

because my goal is get color(include alpha) from binarized xfiles.
I received a large xfile exported using LightWave from CG modeler, it has Material data like:

Material {
     0.501961;0.501961;1.000000;1.000000;;
     51.200001;
     0.800000;0.800000;0.800000;;
     0.000000;0.000000;0.000000;;
    }

So if can’t get these values in vvvv, I tell him convert these values to vertex color or I have to write own vvvv plugin.

testCube.zip (2.5 kB)

hhm,
i don’t your modeler.
if you could assign a texture instead of a color to the Material:

the XFile (EX9.Geometry Load) has a pin TextureFileName

@kalle:
Ah, it sounds simple and good! I’ll try your idea and bo27’s too.

thanks