0

I am attempting to use the JavaFx 3D API to render 3D shapes using a MeshView. One of the issues I have run across is that on iOS, the Shape does not fill in the MeshView completely. As shown in the first image, the outline of the whole image is there, but the image only renders partially and leaves the outline lines alone. The second image is the same code running on Desktop, rendering accurately. The rendering on Android does render correctly, only iOS seems to have that issue. Also, I have noticed that neither Android nor iOS have the DrawMode.LINE option when rendering meshviews. The desktop render uses DrawMode.LINE, while mobile renders only seem to use DrawMode.FILL. Is there any way to fix my rendering problem on iOS and enable DrawMode.LINE rendering for both of the mobile platforms?

Mobile Render

Desktop Render

José Pereda
  • 44,311
  • 7
  • 104
  • 132
Aniket Joshi
  • 115
  • 1
  • 8
  • Can you post the required code to reproduce your first issue (or a link to a gist)? – José Pereda Apr 26 '17 at 09:08
  • I'm not exactly sure what code to post because it works on Desktop and Android but doesn't on iOS – Aniket Joshi Apr 26 '17 at 11:16
  • Without any code I won't be able to help you. Can you post a minimal example that reproduces the issue? – José Pereda Apr 26 '17 at 11:18
  • https://github.com/anktjsh/Gluon3D I uploaded the minimal 3D code here – Aniket Joshi Apr 26 '17 at 12:24
  • There is an issue with the image you create for the material. Just replace the meshView material for now with this `meshView.setMaterial(new PhongMaterial(Color.RED));` and try again. That is working fine for me. – José Pereda Apr 26 '17 at 16:07
  • Thank you very much! That fixed the issue! – Aniket Joshi Apr 26 '17 at 19:19
  • 1
    Have you checked [FXyz](https://github.com/FXyz/FXyz)? This library will easily allow you creating surface plots, and colorize then with density functions, that don't require big texture images. So far it is not very mobile friendly (heavy use of Streams), though. – José Pereda Apr 26 '17 at 19:24
  • I notice that on mobile, the DrawMode.LINE option still does not work, only DrawMode.FILL persists while desktop still displays the different between the two modes – Aniket Joshi Apr 27 '17 at 02:42

0 Answers0