ladybug-tools / spider

:spider_web: 3D interactive analysis in your browser mostly written around the Three.js JavaScript library
http://www.ladybug.tools/spider
44 stars 15 forks source link

Pollination API Viewers R4.1 #155

Open theo-armour opened 5 years ago

theo-armour commented 5 years ago

@ladybug-tools/spiders

Pollination API Viewers

image

R3

Demo: model pollination viewer

Source

Demo: model face-by-face viewer

Source

mostaphaRoudsari commented 5 years ago

@theo-armour thanks for the update! We dropped the Pollination model in favor of face-by-face model. The final sample file has a new place. This will always follow the latest version of the schema: https://github.com/pollination/model-service/blob/master/app/models/samples/model.py

Now that we only have one schema we can concentrate on a single viewer. I will give you a more complex model in the coming weeks. A single room is not really fun! :)

Also when I clicked on the window it gave me an undefined output.

theo-armour commented 5 years ago

@mostaphaRoudsari

R3.1.0 model face-by-face viewer

mostaphaRoudsari commented 5 years ago

Beautiful! Thank you for the quick update! looks great.

How do you like the new schema? Does it closer to what you have been looking for? Any suggestions?

If I may suggest the next step it should probably be removing the aperture from the parent wall.

theo-armour commented 5 years ago

@mostaphaRoudsari

Adding the x,y and z to the vertices slows things down, because first they have to be taken out to create a numeric array prior to transforming coordinates into a Three.js vector3.

Having each face with all its attributes and vertices as a single collection is a good thing. Ditto having apertures as separate groups of vertices.

Saving as a .PY file, I hope is a temporary thing. .PY files are not one of the standard files type that browsers are permitted to open via a URL.

Naming things can get to be quite tricky. Is there a document that sets out the conventions you plan to use?

Other than that, looks fine. Do you ever plan to add construction information - for use with energy analysis? If so, how would that be added?

Apertures as holes in faces is a tricky thing. I have to remember how to conjugate my quaternions and so on. We will get there.

mostaphaRoudsari commented 5 years ago

@theo-armour,

Adding the x,y and z to the vertices slows things down, because first they have to be taken out to create a numeric array prior to transforming coordinates into a Three.js vector3.

I removed them originally but an array doesn't work well with our database structure as well as data validation. Unfortunately we have to keep them as x, y, z knowing it causes an overhead for visualization!

Having each face with all its attributes and vertices as a single collection is a good thing. Ditto having apertures as separate groups of vertices.

🎉

Saving as a .PY file, I hope is a temporary thing. .PY files are not one of the standard files type that browsers are permitted to open via a URL.

Yes. We can save them as JSON file if that makes it easier for you. At least for the model. cc: @AntoineDao

Naming things can get to be quite tricky. Is there a document that sets out the conventions you plan to use?

If you mean naming for models. We will only have one model type so it will be called model!

Other than that, looks fine. Do you ever plan to add construction information - for use with energy analysis? If so, how would that be added?

Yes. That will be added later and will be another property for each Pollination Face. Now we have rad_modifier and we will have energy_construction.

Apertures as holes in faces is a tricky thing. I have to remember how to conjugate my quaternions and so on. We will get there.

I hear you. You have done it once before. We will get there as you said.

theo-armour commented 5 years ago

@mostaphaRoudsari

R4.0.0

image

Demo: pollination model viewer

Source

image

Being a weekend and time for taking things easy, I cheated and reduced the spec to quads. ;- )


Yes. We can save them as JSON file if that makes it easier for you. At least for the model. cc: @AntoineDao

I figured out how to get and hack the .PY file. If you are trying to create a launguage independent industry standard then real JSON would be good.

If you mean naming for models. We will only have one model type so it will be called model!

I am wondering for definitions and uses of words in the file. For example what types and face types might be available.

mostaphaRoudsari commented 5 years ago

This looks great. The fact that the opacity is set based on transmittance values is so fancy.

I am wondering for definitions and uses of words in the file. For example what types and face types might be available.

Yes. The schema is documented here so you can see all the possible items for each JSON field.

https://pollination.cloud/api/#operation/create_model

image

theo-armour commented 5 years ago

@mostaphaRoudsari @chriswmackey @AntoineDao

pollination model viewer R4.1.0

Source

image