Best way to embedd 3rdParty JOGL animated Avatar in jME

Hello I’m new to the jME community :slight_smile:

I looked into the jMonkeyEngine3 and want to use it for my Master’s Thesis if it is possible to achieve what I’m planning to do. I allready did some Tutorials and have set up a game with a basic Scene (flat terrain and house on it).

Basically I want to put a 3rd Party Avatar (it’s an application, not a model) into that game. The API of that Avatar provides a method to embedd the avatar into an AWT-Container
[java]//Adds the given JARP view canvas to its container.
void embedInContainer(java.awt.Component jarpcanvas)[/java]
(see /javadoc-jarpb/player/JACanvasEmbedder.html and implementation of it in BareSiGMLPlayer.java which you can find in the use-jarp-source under the provided developer-documentation-link below).

My question to you is which way is the best practice to achieve this ?

I see two different ways

1. Embedd the jME3-Canvas in a Swing?!-GUI and overlay the Avatar on new Pane. (or maybe embedd the jME canvas directly into the Avatar-GUI)

2. Use Nifty-GUI and create a new layer to which the Avatar will be overlayed.

In both cases I don’t know if this will work. What’s your suggestions ?

I wanted to use the jME3 because of the advantages of a game engine. Or do you think the described approaches will be to difficult to implement and i should just stick to given Avatar GUI, paint a background (not that important to me) and implement all the needed game engine stuff by myself (jme3 appstates could be helpful for example).

My experience with the avatar-system is mostly based on the BareSiGMLPlayer.java and not much successful attempts to modify it to my needs.

Should I use the jarp-api to build up my avatar classes from skretch?

Here are some more Information about the Avatar System I want to use:
General Information
Current-Release (Online Applets using the Avatar)
Local installation guide for current-release
Developer documentation (API and example Code)

I hope you can understand my Problem and help me with it :slight_smile:

Thank You!
Nosezeichen

Should I try this approach from a user ? @Normen’s advice was not to use it in that way

Or should i take a deeper look into ViewPort’s ?

First of all: 1. approach “worked”.

I’ve built a swing-gui with a JLayeredPane and on the bottom layer I placed the jME3-engine and on the top layer the avatar.
My current problem is the background-color of the Avatar-Panel. The background-color has to be deactivated or made transparent for my approach. I didn’t see something related to it in the API jet. The bg-color “can be set” via a properties-file, but the format isn’t documented at all. With my attempts I only get error-messages from the avatar-framework saying “Bad Background RGB string”.
I’ve wrote to the developers of the avatar-framework, maybe they can help me with this.

But I’m not that sure if my approach (approach 1) is a good one. Has someone an idea if approach 2 is possible in a similar way ? Or should I try the approach mentioned in my previous post ?

Thank You!
Nosezeichen