I have a mesh in .ply file that gives me the vertex colours as painted in Blender. It gives me these as an int in rgb format…ie… 255 255 0
however when I plug this into vertexcolour DX11 node i get this on the layout pin.
Specified argument was out of the range of valid values.
Parameter name: sizeInBytes
and a 0 on the layout valid pin
I have tried converting them to float 3 in the range 0-1 and float4 but I still get the same error.
What and where should these values be to make Vcol work from the mesh?
plyreader.7z (125.3 KB)
just reloaded patch and now I get a slightly different error saying …
Geometry is missing semantics: COLOR
Ok, so after lots of googling for DX11 clues, scratching my (now balding) head, and banging it firmly on the walls of my (imaginary) padded cell, I discovered that Im doing it all wrong…well, nearly.
As usual the answer was right in front of me in the form of the girlpower examples in DX11 packs.
I think I need to look at structured buffers and add the semantic COLOR from the input elements.
Off for more headbanging…and scratching.
when you import vertex colors, there is input in your shader like:
you have to add:
color : COLOR; in there, then it will use color as input
allright in your case it’s different, you have to add dynamicbuffer color, you have to add SV_VertexID
hacked you quick example
plyreader.zip (158.3 KB)
Ahh, thankyou @antokhio I was just looking at this node
will look at your example now, because Im going in round in circles a bit with DX11…
Wow, yes, thats exactly it.
Thankyou so much…
I like the scalar trick you did too, I just had a map node in there… Ive not come across that node you used before in 10 years!
I dont know if I would have got there though without your help, so… Thankyou very much so much time saved as Ive been looking at this for a few days now.
I can now use this for my further projects.
in this line in your (layer) shader
the bool in line 6?
is the bool just a check to see if we have data?
and this line makes the color index to SV_VertexID ?
output.color = color[input.iv];
Thanks again you’ve made my day.
<bool color=true;>; this is pipeline notation (hidden semantics defined in dx11-vvvv build), saying that it expects to be a color, not sure you need it in case of dynamicbuffer
SV_VertexID is a semantics, you can read more here
Since buffer is an array, you have to provide index so output = color[input.iv]; equals to this vertex color = this buffer slice
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.