Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion problems for scales and color format stl to 3dxml? #4

Open
synergiator opened this issue Dec 1, 2015 · 2 comments
Open

Comments

@synergiator
Copy link

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.

@ksons
Copy link

ksons commented Dec 1, 2015

Hi @1605200517! Thanks for chossing XML3D!

Scaling

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)"

Colors

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!

@gadinaor
Copy link

gadinaor commented Dec 1, 2015

thanks! we'll look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants