Skip to content
This repository has been archived by the owner on May 1, 2019. It is now read-only.

Implement per-object-colours #73

Closed
1 task done
didimitrie opened this issue Nov 6, 2018 · 3 comments
Closed
1 task done

Implement per-object-colours #73

didimitrie opened this issue Nov 6, 2018 · 3 comments

Comments

@didimitrie
Copy link
Member

Step 0:

It's essential for people doing analysis and wanting to view results online. How to implement, I'm thinking more of convention rather than schema-level enforcement:

If an object has a properties.spkcolor property set to a value we can actually parse and use (ie, hex or rgba?) use that to override any other default colours set for by layers, etc.

This should work for any object type (also points, lines, etc.).

@mswaidan
Copy link
Collaborator

mswaidan commented Nov 7, 2018

That strategy seems fine. Can we also expand from just colors to materials? Something like:

properties.spkMaterial = {
  type: diffuse, specular, etc.
  color: rgba OR map
  specular: float OR map
  bump  = map
  etc. }

Obviously we don't want to send a bunch of material maps back and forth for each object / layer. Maybe theres a SpeckleMaterial that is referenced by objects/layers instead? Thoughts?

@didimitrie
Copy link
Member Author

Hm... If any texture info is just a pointer to a resource we can request async, i'm happy. I would not store such things in the db though.

I do believe both would be good, ie can have just a simple colour, or if really keen, a sweet material.

So I would say yes to a SpeckleMaterial of sorts (maybe we'll get inspired by gltf), but one with textures only for version 2.0 (as that's when we're going to add a s3-compat layer, where we can store blobs efficiently), and for 1.0 colour (simple) and material (no textures). Does that make any sense?

@didimitrie
Copy link
Member Author

closed in #78

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

No branches or pull requests

2 participants