Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eavp-dev] EAVP ready to go

Havard,

Always glad to help!

1) EAVP currently lacks classes for creating shaded polygons, only being able to render them as outlines between vertices. This would be good functionality for EAVP, so if you wouldn't mind submitting a ticket on our github, I'll get started on creating an IView for Faces that renders them as polygons.

We're looking into different file formats for geometry and meshing over the summer in an attempt to get EAVP working with a wide variety of them, so I'll take a look at Wavefront as well.

2) Currently not. It would be trivial for me to add functions that let you set the material used on the vertices, but it sounds like you're wanting to do this for a shaded polygon instead, so be sure to include these features on the ticket.

3) If you want to use only the data structures, then it would be simple to write your own BasicCameraController using TopDownCameraController as a model, that zooms in along the y axis and lets you scroll around the x/z plane. If you're intending to use the default mesh editor implementation, then yes, the easiest way is to convert the coordinates you use yourself. 

4) FXMeshViewer's setAxisVisible() function will let you turn the axis cross off, but not the plane. Since FXMeshViewer is part of our default mesh viewer implementation, and the plane is used for all the user interactivity of adding and moving vertices, we don't have the capability to remove it in the class as it's critical for operations related to intersections for determining mouse locations as projected onto the plane. If you aren't intending to use that functionality in your application, you may want to use a generic FXViewer instead, by creating your own simple extensions for FXMeshCanvas (with materializeViewer() overridden) and FXMeshService (with createCanvas() overridden).

I'm not aware of any performance issues for TriangleMeshes vs quads, so I'm afraid I can't offer any advice there.

We also welcome contributions, so if you write your own implementation before I get done, feel free to issue a pull request. You may also want to join the EAVP dev list yourself to stay up to date with progress on the work.

Robert Smith



From: Håvard Heierli-Nesse <Havard.Heierli-Nesse@xxxxxxxxxxxxxxxxxx>
Sent: Tuesday, May 24, 2016 9:23 AM
To: Smith, Robert W.; eavp developer discussions
Subject: RE: [eavp-dev] EAVP ready to go
 
Hi there, Robert!


Thank you very much for your quick reply!

I've been playing around with EAVP for the last two days, and now I'm finally getting somewhere.

I've set up a FXViewer in our RCP app, and today I've been working with adding vertices and edges to it.

I have a few questions (some of them quite basic :), though...

1) I'm a little bit confused with the different Meshes - what to use when. I need to render models with shaded polygons (preferably triangles?). I can see that this is easilly done in JavaFX 8. but what should I use in EAVP for this? Face? Shape?

I'll use some library (or implement my own) to read Wavefront .obj files. I'll create the shaded models from this.

2) Can I set texture coordinates on my vertices and add a material (with texture) to the meshes?

3) Is it possible to change the default coordinate system or will I have to do this tranform myself?

I guess EAVP uses the default right hand system with negative Z being into the screen and Y up. I think in our case we would like to use X/Y in the horizontal plane, and Z pointing up.

4) Can I remove the default axis cross (and the horizontal plane)


Is there a difference in rendering performance in JavaFX if you choose to use TriangleMesh instead of rendering Quads? I guess it's OpenGL behind the scene here, and as far as I know Quads are converted into Triangles in OpenGL (at least after the fixed pipeline was deprecated). Performance is actually my main concern regarding using JavaFX for rendering, but initially it looks OK :)

Med vennlig hilsen / Best regards,
Håvard Heierli-Nesse
Programutvikler – Konstruksjonsteknikk
Software developer – Structural engineering
 
MARINTEK (Norsk Marinteknisk Forskningsinstitutt AS)
Address:  POB 4125 Valentinlyst, NO-7450 Trondheim, Norway
Mobile:   +47 930 04 277 
Web:       www.marintek.sintef.no

From: Smith, Robert W. [smithrw@xxxxxxxx]
Sent: Wednesday, May 18, 2016 5:18 PM
To: Håvard Heierli-Nesse; eavp developer discussions
Subject: Re: [eavp-dev] EAVP ready to go

Havard,


We do not yet have centralized documentation for all meshing related data objects, though you can see the code comments for the datatypes the VertexMesh and EdgeMesh and their IMesh superclass in the org.eclipse.eavp.modeling bundle and an example of working with them (the EAVP Mesh Editor) in the org.eclipse.eavp.javafx.mesh bundle. We have documentation related to using the Mesh Editor on the wiki​ and the MeshEditorTutorial in the docs folder of the ICE repo, but these are related to using EAVP's default Mesh Editor rather than setting up your own.

In the ICE repo you can find VisualizationCompleteModel in org.eclipse.ice.demo, which shows how the EAVP Mesh Editor can be instantiated, but it uses an ICE specific class (MeshComponent) that isn't available in EAVP.

You can see an example of a mesh being changed in real time here. I should mention that moving vertices with the mouse as seen in the video is a function of the FXMeshViewer (a part of our default Mesh Editor implementation) and not of the core EAVP data structures themselves.

Here is an example of setting up a truely minimal FXCanvas of your own. 

//Get the ControllerProviders from the factory. We would normally get this factory from the IVizService, but we instantiate it here for simplicity.
FXMeshControllerProviderFactory factory = new FXMeshControllerProviderFactory();
IControllerProvider<FXVertexController> vertexProvider = factory.createProvider(new VertexMesh());
IControllerProvider<FXEdgeController> edgeProvider = factory.createProvider(new LinearEdgeMesh());
//Create a vertex at the origin
VertexMesh vertexMesh1 = new VertexMesh();
FXVertexController vertex1 = vertexProvider.createController(vertexMesh1);
vertex1.updateLocation(0.0, 0.0, 0.0);

//Create a second vertex at (100,100)
VertexMesh vertexMesh2 = new VertexMesh();
FXVertexController vertex2 = vertexProvider.createController(vertexMesh2);
vertex2.updateLocation(100.0, 100.0, 0.0);
//Create an edge connecting the two vertices
LinearEdgeMesh edgeMesh = new LinearEdgeMesh(vertex1, vertex2);
FXEdgeController edge = edgeProvider.createController(edgeMesh);
//Get the Groups containing the pieces' JavaFX shapes
Group vertex1Group = (Group) vertex1.getRepresentation().getData();
Group vertex2Group = (Group) vertex2.getRepresentation().getData();
Group edgeGroup = (Group) edge.getRepresentation().getData();
//Add the groups to your FXCanvas as normal...

//Animate the edge by moving its endpoint
        vertex2.updateLocation(200.0, 200.0, 0);

To create a more complex shape, simply start adding more vertices and connecting them with edges, as seen above.


Robert Smith


From: eavp-dev-bounces@xxxxxxxxxxx <eavp-dev-bounces@xxxxxxxxxxx> on behalf of Jay Jay Billings <jayjaybillings@xxxxxxxxx>
Sent: Wednesday, May 18, 2016 9:05 AM
To: Håvard Heierli-Nesse; eavp developer discussions
Subject: Re: [eavp-dev] EAVP ready to go
 

Havard,

CC'ed the eavp dev list.

I'm in training today, but one of the devs will
1.) Point you to the documentation.
2.) Point you to the tutorial code.
3.) Point you to a video of the mesh editor manipulating vertices.

Very glad you are looking at this again! Also, contributions are welcome. ;)

Jay

On May 18, 2016 8:12 AM, "Håvard Heierli-Nesse" <Havard.Heierli-Nesse@xxxxxxxxxxxxxxxxxx> wrote:
Hello!

Things has "started moving" in regards of using EAVP as a basis for our platform. I'm now picking up where I left to actually evaluate if we can use EAVP by doing some avtual coding.

I'm now using the official p2 in our target platform, and this week I'll see if I'm able to set up a 3D view using EAVP.  The demo will contain an animated flat mesh. Will EAVP allow for updating the properties (position) of individual vertices of a mesh?

I do however see a couple of obsticles. The lack of documentation is one of them ;)
Some time ago I asked if it would be possible to get a minimal example, with f.ex. an FXCanvas just rendering a mesh. I guess I'll be able to figure this out myself, but it'd greatly reduce the time I'll have to fiddle around to get something up and running.

I spoke to Torkild Resheim 2-3 weeks ago, and he said that there had been a tutorial/workshop of some sort on EclipseCon NA? If you know of any tutorial or material available that I could have a look at, it'd be really appreciated :)



Med vennlig hilsen / Best regards,
Håvard Heierli-Nesse
Programutvikler – Konstruksjonsteknikk
Software developer – Structural engineering
 
MARINTEK (Norsk Marinteknisk Forskningsinstitutt AS)
Address:  POB 4125 Valentinlyst, NO-7450 Trondheim, Norway
Mobile:   +47 930 04 277 
Web:       www.marintek.sintef.no

From: Jay Jay Billings [jayjaybillings@xxxxxxxxx]
Sent: Wednesday, March 23, 2016 6:55 PM
To: Håvard Heierli-Nesse
Subject: EAVP ready to go

Havard,

I wanted to let you know that EAVP is now out of the ICE repo (at least the 'next' branch) and we are using it solely through the EAVP p2 site. We seem to have all of the bumps worked out of it and it is good to go.

The p2 site is available in the downloads section at https://www.eclipse.org/eavp.

Please let me know how we can help as you start using it!

Jay

--
Jay Jay Billings
Oak Ridge National Laboratory
Twitter Handle: @jayjaybillings

Back to the top