Questions tagged [javafx-3d]

The JavaFX 3D graphics APIs provide a general purpose three-dimensional graphics library for the JavaFX platform.

1
vote
0answers
19 views

Problem with adding multiple triangle meshes to a scene in javafx

I hope someone can help me with this problem. I am using javafx and triangle mesh to construct a sphere-like object out of triangles (like a football). The different tiles of the shape are ...
-1
votes
0answers
29 views

Javafx calling action event to back to the same state

how to back to same state to call action event from the other controller public void Staff(MouseEvent event) throws IOException { Staff(); } public void Staff() throws IOException { ...
2
votes
1answer
96 views

How to get 2D coordinates on window for 3D object in javafx

In javafx if we have 2D HUD (made of Pane and then out of it we create SubScene object for 2D Hud) and 3D SubScene and inside 3D scene we have some object with coordinates (x,y,z) - how can we get 2D ...
2
votes
1answer
51 views

What is the most practical way to create coordinate grid with JavaFX 3D?

I would like to create a 3D demo application with JavaFX to visualize movements of points in 3D space and first I need to set up a coordinate grid for visual reference. Unfortunately, I was not able ...
1
vote
0answers
49 views

Node drifts of after 3D rotation in JavaFx

I get the x- and y-orientation from an RFID-Tag and want to animate the movement in a JavaFX application. It's my first java project so I'm sorry if there are stupid mistakes. I rotate an box-node in ...
-1
votes
1answer
71 views

JavaFX 3D - Scene Camera Issues, SubScene Errors, and MeshViews not Visible

I will try to be as brief as possible while providing enough info so that someone might be able to help point me in the right direction. I am trying to add a 3D scene to the center or a borderpane ...
0
votes
1answer
40 views

JavaFX - MeshViews not visible on screen

I am trying to add a group contains several MeshViews that were read from a file to the center of a borderlayout. I am using a FXML file to define the layout. I have given the center AnchorPane an ...
0
votes
1answer
39 views

JavaFX - How to add array of MeshViews to group or scene

Update: I updated my code to loop through the list of meshviews and add each to the group using group.getChildren.add(meshview[i]) but still does not show up on screen. Thanks. I am trying to add ...
0
votes
0answers
49 views

How can I put text or lines on a box in JavaFX 3D?

I've seen the ability to make a CuboidMesh with another library, and specify what goes on each side of a box, but that doesn't quite fit my needs. I need to be able to put different text on different ...
-1
votes
1answer
42 views

add label line javafx

I am looking to add a text of my scale and add arrows in the corner of my line in javafx. thank you.
1
vote
0answers
51 views

Improving Transparency & Lighting in JavaFx 3d shapes

In JavaFx if transparency is applied to a shape, it doesn't gives proper transparency effect, until there is any other shape behind it. for example, this sphere has some transparency but it appears ...
1
vote
1answer
54 views

JavaFX animation/View 3d with panes

I've been working in JavaFX for the first time to try to make an app which I can use to demonstrate a simple animation with button controls. To do this I've used a BoarderPane for the primary stage, ...
3
votes
1answer
43 views

Apply gradient to sphere object with JavaFX

I'm working in JavaFX for a class, and I'm trying to apply a gradient to a sphere, but (obviously), I can't figure out how to do it. I'm stuck because I know that a sphere is an object, and so it ...
4
votes
0answers
60 views

Box Scaling in JavaFX 3D improperly reflects light

My goal is to reproduce a gif in JavaFX. Everything is great, except for when changing so many box heights at once, it slows the machine down. I have decided to remedy this by scaling by the y axis ...
1
vote
2answers
61 views

How to correctly obtain screen coordinates of 3D shape after rotation

I need to be able to select a number of shapes in my 3d model by drawing a rectangular region, and all shapes that lie in that region are selected. I can draw the region and select the nodes for if ...
1
vote
0answers
46 views

Why are these JavaFX TriangleMesh rendering with dark shadow artifacts?

Solved The solution related to smoothing groups. Within the loadFixedSphereMeshView() method, I added: ... after points array int faceSmoothingGroups[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; ... before ...
0
votes
0answers
34 views

How to rotate svg in javafx by some RPM

Rotate an SVG image in javafx in RPM A SVG image is used in javafx using appendsvgpath() , now want to rotate that SVG by some RPM.
0
votes
2answers
35 views

JavaFX 3d and toolbar

I face some weird behavior after adding 3d content to my JavaFX application which contains a toolbar. I created a small project that replicates this problem. In the main application, I use SubScene ...
1
vote
0answers
43 views

Issue with point lights when on mobile

it seems to me that PointLight do not light the scene properly when running an app on Android. Event though this was coded using Gluon Mobile, it seems to me that this is a javafxport or JavaFX 3D ...
1
vote
0answers
56 views

Javafx rotating a group with PersepectiveCamera as child rotates camera about its own axes, and not the group node's

Here is my code for my Group which has 3d rotates on it: import javafx.scene.Group; import javafx.scene.transform.Rotate; public class Camera3D extends Group { ControllableCamera camera; ...
1
vote
0answers
100 views

JavaFX get Euler angle from Transform

I'm trying to make some sort of 3D editor, and I'm trying to make an "orbit" tool, much like the one in Blender. Now I'd like to know what the angle is. I used the code provided by José Pereda that ...
2
votes
1answer
140 views

Why does a 3d model render differently in a SubScene than in Scene

Rendered with flag set to true, camera set to the subscene, and then rotated: Xylophone rendered in SubScene: Xylophone rendered in Scene: Using Oracle's Xylophone 3D example, I have encountered a ...
1
vote
1answer
125 views

Use 2D Text into 3D scenes in JavaFX results in blurry texts

I'm trying to display various Text objects inside a 3D scene The problem is that when i zoom close to the text it looks very blurry. Here's a screenshot from my app Question: how can i improve the ...
2
votes
1answer
128 views

javafx shape3d texturing: Don't strectch the image

I'm working now with javafx to build a maze and I want the walls to be textured with some seamless texture (that can be repeated). The maze is randomly generated so I don't know the size of any walls. ...
2
votes
1answer
205 views

JavaFX Rotating Camera Around a Pivot

Last year I posted a similar question, but due to it not being very descriptive and overall a mess I decided to rewrite it completely. I am making a simple 3D editor in JavaFX that has a camera ...
3
votes
2answers
142 views

javafx - How to apply yaw, pitch and roll deltas (not euler) to a node in respect to the nodes rotation axes instead of the scene rotation axes?

Please bear with my long question, I am trying to make it as clear as possible. (As found in another question.) In the example below, all rotate buttons are a test replacement for the gyro values ...
1
vote
1answer
56 views

Absolute scaling of SubScene in JavaFx 3D

I'm looking to model actual distances say measured in centimeters. So the following SubScene containing a simple rectangle has width & height associated with my model distance in cm. The code ...
3
votes
1answer
123 views

Showing texts over the face of a Box based on the visible area on zooming in/out

I have a sample 3D application (built by taking reference from the Javafx sample 3DViewer) which has a table created by laying out Boxes and Panes: The table is centered wrt (0,0,0) coordinates and ...
3
votes
1answer
245 views

How to add text to each face of a box [JavaFX]

I create a box which I can rotate and what will do ~some action~ when clicked. The problem I'm having is display text on all the faces of this box, for example; 1 on the front, 2 on the top, 3 on the ...
1
vote
0answers
63 views

Javafx - change shape RotateTransition start point

I am trying to rotate multiple spheres around one object in the center and the challenge I am facing now is how to put different start points (maybe angle?) for the shapes so that they all don't start ...
2
votes
1answer
164 views

javafx 3D Box, translation displayed is not what is expected

I'm currently working on a project and I should display 3D boxes on a Pane and I'm using javafx 3D for that. First I draw a big box, called container in my project and create a camera. Then with ...
2
votes
1answer
108 views

Javafx: applying image to meshview not working

I am trying to apply the image to my meshview cube with phongmaterial but only the black cube with no colour is showing up on the screen. It used to work with the Box and a cube, but now its not ...
1
vote
0answers
120 views

FXyz3D: How to get started

I have downloaded the FXyz3D package, and got that colourful spiral in no time by copying the code from the GitHub page, but ... what else can I do with this package, which looks interesting? There ...
6
votes
2answers
125 views

How to animate a spinning top?

It's Hanukkah and I'm trying to animate a spinning top (dreidel): I can get it to spin on its own axis. Here is my code: import static javafx.scene.paint.Color.*; import javafx.animation.KeyFrame; ...
5
votes
1answer
197 views

JavaFX 3D Colouring faces … again

I studied this question, but I still don't get it. The shortest possible code below shows a Pyramid totally grey, whereas I try to give the 6 triangles making up the pyramid different colors. So ... ...
2
votes
1answer
180 views

Memory leaks when removing objects in JavaFX 3D

I have written an N-Body-simulation JavaFX-program which displays the simulated bodies as spheres. Unfortunately I'm struggling with memory leaks. I figured out that the memory allocated for the ...
2
votes
1answer
177 views

Javafx Quadrilateral Mesh

I need to display a quadrilateral mesh in javafx each mesh face having 4 points i have tried some triangle mesh examples from fxyz library, but not sure how does it work for quadrilaterals, Can ...
0
votes
1answer
67 views

Need to arrange node evenly all over the area

I have the following code which iterates through my models list and than creates nodes in the area final AtomicDouble x = new AtomicDouble(0.0); final AtomicDouble y = new ...
2
votes
0answers
109 views

JAVA FX 3D Light

Hi I'm trying to make the sun moon and earth. I came out and they are moving around each other in 3 planes. I have problems with light. When the moon comes to the ground, it does not darken and when ...
1
vote
1answer
110 views

Javafx imported 3d model incorrectly displayed

I am playing around with the 3d model importers from interactivemesh.org in Javafx. The import of the models in a scene works without error. However, the models are being displayed in a weird way. ...
2
votes
2answers
353 views

javafx 3d coloring each vertex in triangle mesh with specific color

Iam working on a triangle mesh for which i need to color each vertext with a specific color. I followed the example provided here Using texture for triangle mesh without having to read/write an ...
0
votes
0answers
14 views

Desktop application 3d functionality for shirt

I want to build a desktop application/software in which I want user to design his/her customized shirt ..please help me in choosing best and easy tool for the same and guide me in proceeding
1
vote
1answer
141 views

InvocationTargetException caused by NullPointer in basic javafx application

I'm trying to follow this javafx 3d tutorial, however I get the following error (I cleared up several earlier errors by installing 32bit gtk2 packages and libraries), however this issue doesn't seem ...
1
vote
1answer
416 views

Static 2D text over 3D scene in javafx java

My goal is to overlay 2D text over a 3d scene in javafx as seen in Using a subscene is not a valid choice as I want the 3d model to be able to take up the entire space on the screen. I tried adding ...
0
votes
1answer
250 views

aligning video to center in javafx

I am trying to create a simple video player using javafx in Intellij. In this program the minimum height and width of screen is set according to video at runtime but when I maximise the screen, the ...
0
votes
1answer
279 views

How to create LEGEND (text in chart border) in JavaFX

How add text in pane border in JavaFX like this:
0
votes
0answers
28 views

JavaFX Scene Builder launch issue [duplicate]

I've been using Scene Builder for some time, but I can't launch it for the last few days. Nothing happens when I click on launch icon. I also can't launch it through NetBeans. I reinstalled it several ...
2
votes
0answers
192 views

How convert a java mesh object to MeshView

I develop a java application to generate a 3D object as a .obj file. I would like to visualize this object in a viewer3D of my application before exporting it but I only have a java object containing ...
1
vote
1answer
310 views

Box 3D JavaFX Rotate

I have two Boxes (Group), and when I rotate, the image displays like this: Display Boxes Rotate Boxes When rotating, the Box (JANELA_MEIO_BOX) is distorted: public class Demo1 extends Application {...
0
votes
2answers
113 views

TestFX How to understand the color of an item?

I am trying to get a rectangle's background color. I tried to find a way but i couldnt. Isnt there a method makes all this easy? Any help would be appriciated