CQ models rendering not usable #383

Closed
opened 2021-06-26 17:02:35 +02:00 by adam-urbanczyk · 8 comments
adam-urbanczyk commented 2021-06-26 17:02:35 +02:00 (Migrated from github.com)

Thanks for all the work on integrating CQ. Sadly, current rendering of models is not really usable - I cannot really see any features/edges:

afbeelding

What would you need from CQ to fix it? Currently VRML and VTKJS (take a look here: https://kitware.github.io/vtk-js/examples/SceneExplorer/index.html?fileURL=https://data.kitware.com/api/v1/file/5878eb978d777f05f44b142a/download) export is supported, it should be easy enough to display those with descent shading. Or would another format be needed?

Thanks for all the work on integrating CQ. Sadly, current rendering of models is not really usable - I cannot really see any features/edges: ![afbeelding](https://user-images.githubusercontent.com/13981538/123517120-a87f6f00-d69f-11eb-85f3-c2f7a2805756.png) What would you need from CQ to fix it? Currently VRML and VTKJS (take a look here: https://kitware.github.io/vtk-js/examples/SceneExplorer/index.html?fileURL=https://data.kitware.com/api/v1/file/5878eb978d777f05f44b142a/download) export is supported, it should be easy enough to display those with descent shading. Or would another format be needed?
Irev-Dev commented 2021-06-26 21:09:17 +02:00 (Migrated from github.com)

Thanks @adam-urbanczyk

This is just bad lighting in the three.js scene. No changes in format is needed.

Thanks @adam-urbanczyk This is just bad lighting in the three.js scene. No changes in format is needed.
Irev-Dev commented 2021-06-26 22:34:02 +02:00 (Migrated from github.com)

I've improve it somewhat with #384
image

But I'll leave this issue open as I'd like to improve it further.

I've improve it somewhat with #384 ![image](https://user-images.githubusercontent.com/29681384/123525057-98a07300-d711-11eb-8bdb-dcd7138fd03a.png) But I'll leave this issue open as I'd like to improve it further.
marcus7070 commented 2021-06-27 07:17:20 +02:00 (Migrated from github.com)

You might be interested in this: 0b7050c020/sphinxcadquery/sphinxcadquerystatic/main.js (L130-L165)

I think you can see that lighting in action here: https://paramak.readthedocs.io/en/main/example_parametric_reactors.html

I'm pretty sure that's an old version of Three.js though.

You might be interested in this: https://github.com/CadQuery/sphinxcadquery/blob/0b7050c0204b8b2c6f7e6912eaee97ca02b9e776/sphinxcadquery/sphinxcadquerystatic/main.js#L130-L165 I think you can see that lighting in action here: https://paramak.readthedocs.io/en/main/example_parametric_reactors.html I'm pretty sure that's an old version of Three.js though.
Irev-Dev commented 2021-08-10 12:52:06 +02:00 (Migrated from github.com)

Once #448 is merged, I was planning on closing this issue, while I hope it continues to improve I think it's much better than it was. Surfaces and edges can easily be identified now.

https://user-images.githubusercontent.com/29681384/128854453-a6960d50-cf06-4cd6-ad83-803acb96855e.mov

Are you happy with the state of it now @adam-urbanczyk @marcus7070 ?

Once #448 is merged, I was planning on closing this issue, while I hope it continues to improve I think it's much better than it was. Surfaces and edges can easily be identified now. https://user-images.githubusercontent.com/29681384/128854453-a6960d50-cf06-4cd6-ad83-803acb96855e.mov Are you happy with the state of it now @adam-urbanczyk @marcus7070 ?
adam-urbanczyk commented 2021-08-10 23:06:48 +02:00 (Migrated from github.com)

LGTM, I'd change the line color though (to eg black)

LGTM, I'd change the line color though (to eg black)
marcus7070 commented 2021-08-11 03:22:43 +02:00 (Migrated from github.com)

It's a great improvement @Irev-Dev. I think your line colours are part of the CadHub theme? In which case they're perfectly legible, no worries.

A minor point: I think most CAD viewers spin the object, not the camera. Sometimes you might get a shadow or reflection that obscures a feature, if you're only able to move the camera then you can't un-obscure. On the other hand, I do think spinning the camera with fixed lights gives a better sense of depth to the scene, but maybe that's just me.

It's a great improvement @Irev-Dev. I think your line colours are part of the CadHub theme? In which case they're perfectly legible, no worries. A minor point: I think most CAD viewers spin the object, not the camera. Sometimes you might get a shadow or reflection that obscures a feature, if you're only able to move the camera then you can't un-obscure. On the other hand, I do think spinning the camera with fixed lights gives a better sense of depth to the scene, but maybe that's just me.
Irev-Dev commented 2021-08-11 10:32:13 +02:00 (Migrated from github.com)

Thanks @adam-urbanczyk, @marcus7070,

Why do you think the lines should be black Adam? The lines are roughly a CadHub theme, but at somepoint I'll probably want to re think the whole design of the 3D viewer so it's likely to change.

Thats a good point Marcus, I might do a bit of both, I tried attaching a light to the camera, and it adds a fair amount of consistency to the lighting.

Thanks @adam-urbanczyk, @marcus7070, Why do you think the lines should be black Adam? The lines are roughly a CadHub theme, but at somepoint I'll probably want to re think the whole design of the 3D viewer so it's likely to change. Thats a good point Marcus, I might do a bit of both, I tried attaching a light to the camera, and it adds a fair amount of consistency to the lighting.
adam-urbanczyk commented 2021-08-11 18:39:06 +02:00 (Migrated from github.com)

I can barely see them with the current color scheme (black was just a contrasting color - maybe not so good given the background).

I can barely see them with the current color scheme (black was just a contrasting color - maybe not so good given the background).
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: h3n3/cadhub#383