Put jme3 Node into nifty panel

Hello!

I am curious is it possible to put some jme3 node inside nifty panel?

I did manage to reserve space with empty panel and then did use locate the position of the panel and put node at the correct position.

But now i am curios if it is possible to put node into scrollPanel, in that case i can’t reserve static place for Node, so i need another solution.

I think i have seen some thread about this some time ago, but can’t find it again, maybe i am just think i did see something like this.

Hi, yes that works. This might help:

1 Like

Thanks, Yeah, it it understandable.

I try to avoid textures here. I have couple icons, in jme i may change color for every single icon by using different materials, so i need only one texture per icon, but i may have several colors per every icon. I should have many textures to cover all possible cases.

Yes, I may generate them all, event dynamically, but i am not sure that this is the right way to go.

I will check later(after work) what i can get from the thread you pointed at. Maybe i will get what i need

I did try off screen render, it is working somehow, but it is long way for me to come to something useful.
I think i wil lgenerate textures, since i am already doing it to make own atlas. Generate single textur eis not a problem, but i have heard it is not a good practice to have many textures per screen. Espessially for android.
So, till current moment, i had one texture per jme application (and i don’t know how many for nifty is used). I will generate textures specially for nifty. Mabe i will manage to make just one more additional texture with colored symbols, it could be many of them for now it is like 20 textures on 20 colors and it is 400 texures. I will just give it a try and check how it goes

Bandwidth is your enemy on mobile devices. Object count, texture count, etc are all going to boil down to how much data can be pushed to the graphics chip per frame, summarised as bandwidth.

Which is why you can have even 100k verts on screen but 500 individual cubes will kill performance.

https://developer.arm.com/docs/dui0555/b/bandwidth-optimizations

1 Like

Note that Nifty can make an atlas for you out of separate images if you use a matching constructor. But yeah, that might not work with runtime-generated textures out of the box, or you’d have to write/read them to/from a disk or something like that.

Just an idea:
It might be worth checking out if it’s possible to write a custom effect that colorizes an image. Or see if there’s a way to access/set the underlying material.

Also note that Nifty is pretty much abandoned by the jme community in favour of the Lemur library which could easily handle the coloring I guess. But Lemur doesn’t have scroll panels AFAIK, which also was my reason to stick with Nifty.

The most important thing is that lemurs don’t have a visual editor. Don’t you think the advantage of nifty is to see the design in a visual and real-time way? Why give up nifty, don’t you think it’s hard for lemurs to write code and layout? I still like to use XML to visualize layout nifty like Android :zipper_mouth_face:

1 Like