2D background image behind scene

What is the currently standard way of putting a 2D background image behind the 3D scene? I saw a post from four years ago that referred to renderpasses - but those do not exist in jme3.



I’ve tried to create a background viewport as a rendermanager “pre” viewport, but did not see anything render. My current approach is to add a background Node to the main viewport, then add the rootNode.



This seems to be rendering both, but the background is rendering on top of the 3D scene. Thoughts?



Thanks!



[java]@Override

public void simpleInitApp() {



backgroundElement = new Element();

backgroundElement.setCullHint(CullHint.Never);

backgroundElement.setQueueBucket(Bucket.Sky);

backgroundElement.setLocalTranslation(0, 0, -1000f);



viewPort.clearScenes();

viewPort.attachScene(backgroundElement);

viewPort.attachScene(rootNode);



backgroundElement.updateGeometricState();



}[/java]


http://hub.jmonkeyengine.org/groups/graphics/forum/topic/setting-a-stationary-background-image-in-jme3

You can use Viewports to do this.

Create two viewports, the first rendering a 2d image on the gui node.

Then create a second one, your 3d one, on top of that.



Check out TestMultiViews.java

Got it. Thanks. I tried creating the two viewports, but missed setClearFlags() on the main viewport.

Also, heads up that the google.com search results are returning forum posts about 4 years old.

Oh hey, theres a google search bar. I’ve only seen the top documentation search bar!

2 Likes

Can we not remove that top search box? I think it causes more confusion than it saves…

there were article about how people “see” webpages.



and it is known that people read from left to right and see mostly the top of the webpage.



So people usually see part of webpage like this:

http://i.imgur.com/yx5MA.jpg



The solution for “blindness” is just to replace left and right columns :wink:

@oxplay2 said:
there were article about how people "see" webpages.

and it is known that people read from left to right and see mostly the top of the webpage.

So people usually see part of webpage like this:
http://i.imgur.com/yx5MA.jpg

The solution for "blindness" is just to replace left and right columns ;)


The problem with that is that 99% of usage is reading the forums... and that would make reading the forums worse. The right side is for the "other stuff"... which is appropriate.

I'm kind of an anti-fan of making it easier for people who didn't look in the first place to find something that they still won't see no matter where you put it. The majority of the people who don't see the search box wouldn't notice it if it was moving under their mouse cursor wherever they moved it. ;) To mangle and paraphrase a saying, "You can lead a thirsty horse to water but you can't make him stop staring at the sky hoping for some rain to fall in his mouth."

All that being said, it is too bad that the poor-search is the one that shows up first.

@zarch said:
Can we not remove that top search box? I think it causes more confusion than it saves...


I think the problem there is that if you really want to search just the docs then it's the only way I know of. I suspect that swapping them is not easy.

hmm, then it’s harder to solve.



what if there would be:


Google //put in first place
Documentation
Forum
Blog

options?

edit: this should be visible and logical for members. for other types, they can change type of search and done.

just think about less number of topics "where to find".

but if you want to give people adventure of searching search input, just put it into foot :evil:

I know it took me a while to spot the second search box just because I’d already found one so it didn’t even occur to me there might be another…and even when I did spot it it wasn’t immediately obvious that it was a completely different search as opposed to a second way to access the first search.



Even a note under the current one saying “For searching the forums we recommend the google search box on the bar to the right” would help.

I still just manually type

Site:hub.jmonkeyengine.org stuff to search



Into google because I can see more results/full screen etc



You can also search specific directories of the site

@wezrule said:
I still just manually type
Site:hub.jmonkeyengine.org stuff to search

Into google because I can see more results/full screen etc

You can also search specific directories of the site


because you know how to use google ;)

but it dont change fact that 99% of google users, don't know how to use it properly. :roll:
@wezrule said:
I still just manually type
Site:hub.jmonkeyengine.org stuff to search

Into google because I can see more results/full screen etc

You can also search specific directories of the site


I prefer the search on this page because I don't have to open another tab to run it while I'm answering a post.

everyone has their own preference. I’m more used to having 2 different web browser sessions (1 per monitor) for easy cross-referencing, but really depends what im doing. I always end up with about 10-15 or so tabs each by the end of the day. I’m always cba to close them down :slight_smile:

I usually have a few browser windows open:





But why bother taking extra steps when you can pop open a window right in the same page and then middle-mouse results into a new tab (if needed).