Hi,
For my application, I’m building custom mesh with vertex colors, that I will eventually animate (both geometry and colors). At some point in my program, I access those buffer to fill some data structure, then I do the opposite operation after some computation. And I’m getting this:
http://www.pasteall.org/pic/show.php?id=31402
I’m pretty sure that the problem is not in my code (the data looks good within the debugger), so I probably do something wrong in the JME part. Since the result is very typical, maybe some of you recognize the problem ?
Related question, how can I visualize the content of a Direct Buffer while debugging ?
What is it supposed to look like?
I’m not sure what the problem is… that looks like vertex coloring to me
Can you provide a rough idea of what it should look like?
@bato said:Related question, how can I visualize the content of a Direct Buffer while debugging ?
Define visualize. Printing to a console is the quick and easy way of doing things. Depending on what you want to visualize you might be able to create boxes for each point (this wouldn't work so much for a color buffer) and put them in the scene.
What it should looks like, is natural color of a face. These face is made from a 3D scan, so you get the idea.
By visualize, I mean visualize the content of the buffer, see the value stored in. I can manually print it, but maybe there is a better solution …
Can you show us how you are changing the color buffer?
What’s odd to me is how uniform it is. It seems to be a position buffer put into the color buffer… since red changes with x, green changes with y, and blue changes with z… but I can’t figure out why they are all maxed out. Maybe the shader is clamping them between one and zero.
But that’s my guess. Somehow you’ve pushed positions into the color buffer. What units are you using for your position buffer?
What’s odd to me is how uniform it is. It seems to be a position buffer put into the color buffer… since red changes with x, green changes with y, and blue changes with z…
Ho my .... It's exactly that, in the middle of all these matrix, buffers, mesh and all, a small "colors" replaced by "vertices", and everything goes boom ...
Thanks a lot !