3d,javafx,javafx-2,javafx-8,javafx-3d

As @jdub1581 says, in JavaFX there's no straight way to get boolean operations with 3D primitive shapes. That doesn't mean those operations can't be performed, given you know or you provide the mesh info. While F(X)yz library has many complex 3D shapes, where the mesh info is fully provided, it...

For the first part, related to JavaFX 3D, I suggest you have a look at the FXyz library. You will find a extense library of custom shapes like: Cone, Pyramid, SegmentedSphere, Spheroid, Torus, SegmentedTorus, Prism, Spring, CurvedSpring, Frustum, Icosahedron, Knot,... Also, have a look at the sampler application, where you...

Your approach is almost correct, but you are failing at updating the info of the faces array. With every volume section you add, you add new vertices to the final mesh, so the vertices indices on the face array should be shifted accordingly. For that, keep a counter of the...

Since you are embedding the Text node in a styled border pane, and rendering both in the scene, setting also the cache for the border pane really helps. borderPane.setCache(true); You will go from this: to this: Also, you can set this hint, to improve resolution. borderPane.setCacheHint(CacheHint.SCALE_AND_ROTATE); ...

javafx,3d,transparency,transparent,javafx-3d

Transparency in JavaFX 3D shapes has been a long time request... until recently: Since JDK8u60 early access release b14, transparency is enabled in 3D shapes. You can add color with transparency as diffuse color, like in this answer. Also you can add images with some transparency level on every pixel,...

As you have mentioned, there two possible approachs for 3D dragging: Pure drag & drop, like you propose unprojecting directions, like in this question. For drag and drop events, we can detect a drag event on the 3D shape, when the event starts and finishes. The trick here is, instead...

java,javafx-8,javafx-3d,stl-format

As you are already using an STL importer from this site, you will find in the same web a 3D model browser you can use to preview your models before importing them to your JavaFX application. If they can't be imported with this browser, the problem may be related to...

java,javafx,3d,quaternions,javafx-3d

There's a reason why all those tutorials point to rotational matrices: in 3D you can't perform simultaneous rotations one by one, you need to perform them at once. Since JavaFX only uses one angle and one axis, you have to provide the way to convert three rotations over three axes...

Problem This shape consists of 6 single shapes. The four triangles all meet in point A. And a rectangle at the bottom, because they are triangles you need two triangles for creating a rectangle. The following picture shows the topview of that shape. As you can see, we have 5...

java,javafx,javafx-8,lighting,javafx-3d

I'am not a solid profi on JavaFX 3D, but I'll try to answer. JavaFX 3D needs light to be able to show a perspective view. If you switch light off, your Subscene renders to black. There are only two Lights in JavaFX, an AmbientLight and a PointLight. Both can be...

swing,opengl,javafx,jogl,javafx-3d

If you are looking for some JavaFX 3D resources that may help you decide whether its already mature or not, these are available, among others: 3DViewer here from the OpenFJX project. InteractiveMesh importers and browser. F(X)yz, a new JavaFX 3D library that provides additional primitives, composite objects, controls and data...

java,javafx,javafx-8,mesh,javafx-3d

One easy solution to make your subscene resize with its parent is just binding its dimensions to those of the parent. For instance: private SubScene createScene3D(Group group) { SubScene scene3d = new SubScene(group, VIEWPORT_SIZE, VIEWPORT_SIZE, true, SceneAntialiasing.BALANCED); scene3d.widthProperty().bind(((AnchorPane)meshGroup.getParent()).widthProperty()); scene3d.heightProperty().bind(((AnchorPane)meshGroup.getParent()).heightProperty()); scene3d.setFill(Color.WHITE); scene3d.setCamera(this.camera);...

3d,javafx,intersection,javafx-3d

As @jdub1581 suggests, a ray is just a geometric vector, so in order to find a list of triangles intersected by this vector we need to solve problems of the kind 'line intersects plane' and 'line intersects plane within the triangle borders'. Let's assume we have a TriangleMesh, and we...

I researched and found a very awesome site with the relevant information: http://paulbourke.net/geometry/transformationprojection/ The relevant part was the Coordinate System Transformation, in particular the equations for converting between cartesian and spherical coordinates. double x = r * Math.sin(angle1) * Math.cos(angle2); double y = r * Math.sin(angle1) * Math.sin(angle2); double z...

This is not a bug. A PointLight is a Node. Node javadoc states: "If a program adds a child node to a Parent (including Group, Region, etc) and that node is already a child of a different Parent or the root of a Scene, the node is automatically (and silently)...

java,javafx,3d-engine,javafx-3d

To answer your questions: Can i use it for render a lot of 3D cube, models and animation without lose performance? This has for many people (I think) been a question ... and while there is no clear cut answer, there are ways to make it work. For example I...

As @mohsenmadi has pointed out, the diffuse color doesn't allow you using other than one single color. But you can have different colors on the sphere by using an image as a diffuse map. Based on your first image, I've created this texture image (called diffuse.jpg, and placed under the...

java,javafx,javafx-8,javafx-3d

The answer is yes, you can create a photosphere in JavaFX. As for the how, there's an easy solution based on a sphere from the 3D API, but we can implement an improved solution, with a custom mesh. Let's start by using a regular sphere. We just need a 360º...

java,javafx,javafx-8,javafx-3d,csg

The easiest way to combine a javafx.scene.shape.Mesh object with a CSG one, providing you have a TriangleMesh is converting the triangular faces to polygons (eu.mihosoft.vrl.v3d.Polygon). Once you have a CSG object you can perform the regular operations on it, and then you can export it back to a MeshView for...

The problem with Box, as you may have already noticed, is that if you apply an image as diffuse map, it will be applied equally to all its 6 faces. If you have a look at FXyz project, there's an implementation of a similar 3D shape, CuboidMesh. Having full access...

3d,mouse,javafx-8,raycasting,javafx-3d

As @jdub1581 points out, the Camera is the key to bind mouse movement with your 3D objets on the scene. For starterts, we know about public API PickResult, that allows us to select a 3D object with the mouse, based on some ray tracing techniques performed from the camera position....