Open synergiator opened 8 years ago
Hi @1605200517! Thanks for chossing XML3D!
You can easily change the scaling of the object using CSS 3D transform properties. For instance, navigate to the example, open the browser console, and run:
document.querySelector("mesh").style.transform = "scale3d(2, 2, 2)"
STL has no per-vertex or per-object colors defined. Some non-standard STL variations exist that support colors. But these are not supported by the STL plug-in.
You can easily vary the object color setting material parameters. Again, in the example, try:
var m = document.querySelector("mesh");
m.innerHTML = "<float3 name='diffuseColor'>0.8 0.0 0.0</float3>"
If you need per-vertex colors, and from saying you want to visualize a spectrum it seems you need per vertex colors, you need to create for instance the XML3D JSON format. Obviously I can't say anything about your try. Maybe you want to post it to the public mailing list: https://mail.cg.uni-saarland.de/mailman/listinfo/xml3d-public
Also feel free to ask at stackoverflow: http://stackoverflow.com/questions/tagged/xml3d
I hope this helps!
thanks! we'll look into it
Phase3 startup report
Our algorithmic processing outputs various 3D views (STL format):
we are testing how and whether XML3D provides the desired functionality.
Our initial approach to convert STL format to the native XML3D as an external resource, didn't work - the colors, the view port and the overall output was completely off.
This might be related to the file format conversion tool, or something that we couldn't figure out - but either way, this was a dead end.
Currently what does seem to partially work is the use of the XML3D STL plugin - we load our STL file. What's missing: Fix the scale of the dispalyed object The colors being displayed are not from the spectrum we use, need to figure this color shift.