Navi

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
x 58

Post by betajaen »

Wouldn't you have to move the overlay around depending where the texture would be on the screen, not only that. Clip portions of it, when the texture wouldn't be completely on the page?
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2

Post by ajs15822 »

betajaen wrote:Wouldn't you have to move the overlay around depending where the texture would be on the screen, not only that. Clip portions of it, when the texture wouldn't be completely on the page?
Mmm, overlay panels inside other overlays move thanks to Ogre's brilliant OverlayManager. Masking the result with the optional alpha mask wouldn't be too hard either.

If the page was scrollable, that would present a problem (very hard to get pixel-perfect estimations of how far a page has scrolled, even with the ability to see the input injection).

Streaming frames over HTTP with AJAX would be our best bet if this functionality is really needed.
User avatar
Zeal
Ogre Magi
Posts: 1260
Joined: Mon Aug 07, 2006 6:16 am
Location: Colorado Springs, CO USA

Post by Zeal »

Just had to say wow again...

Now I can learn a VERY marketable skill (flash/html/java) AND bang out my game GUI all in one shot.

ajs15822 you are my hero.
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2

Post by ajs15822 »

Zeal wrote:Just had to say wow again...

Now I can learn a VERY marketable skill (flash/html/java) AND bang out my game GUI all in one shot.

ajs15822 you are my hero.
You're welcome 8)
Mishra
Kobold
Posts: 37
Joined: Sun Jan 22, 2006 10:08 pm

Post by Mishra »

a simple question...
(i could download Navi and see it by myself, but bandwith will kill me)

can you render a navi to any texture or only overlays are supported by now?
8)
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2

Post by ajs15822 »

Mishra wrote:a simple question...
(i could download Navi and see it by myself, but bandwith will kill me)

can you render a navi to any texture or only overlays are supported by now?
8)
As of right now, Navi has strictly been developed for use in an overlay. In the future, however, I definitely intend to expand this ability to other meshes.

And really, it's not like you can't do it right now (after you've created a Navi, make an entity with a material name of "name of the navi" + "Material"), there are just two things that need to be handled:

-Mouse-picking (not that hard thanks to the uOgreBrowserPlane demo's algorithm)
-Texture filtering

Image

So stay tuned! :wink:
kcbanner
Goblin
Posts: 208
Joined: Sat May 05, 2007 4:49 pm

Post by kcbanner »

Awesome! I really am looking forward to seeing where this goes.

My project is a mmo-style deal, and if I can tie this in to the server (web pages served by the game server (stores etc)), then I can streamline alot of stuff :D

-kcbanner
User avatar
Zeal
Ogre Magi
Posts: 1260
Joined: Mon Aug 07, 2006 6:16 am
Location: Colorado Springs, CO USA

Post by Zeal »

LLMozLib has limited support for Flash applications and cannot (at this time) inject inputs into Flash objects.
Hey is there really no way around this? Being able to code a GUI in html/java is nice, but it would be oh so much nicer if we could use flash...
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2

Post by ajs15822 »

Zeal wrote:
LLMozLib has limited support for Flash applications and cannot (at this time) inject inputs into Flash objects.
Hey is there really no way around this? Being able to code a GUI in html/java is nice, but it would be oh so much nicer if we could use flash...
I'm afraid the limitation lies in a library below this one, however Callum claims that progress is being made in this area. This post from a little more than a month ago touches on the subject: http://groups.google.com/group/ubrowser ... e21f75d8a7
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2

Post by ajs15822 »

Alrite! Navi can now make full use of Ogre's Resource Group Manager.

Navi also now allows you to 'programmatically' create HTML pages for use in a Navi.

Before I tell you any more, please get acquainted with Data URI'sif you haven't gotten to know one another yet.

Okay, check it out:

Let's say you have 'test.html' in a resource folder/archive, well you can tell Navi to create a Navi from this Ogre Resource like so:

Code: Select all

NaviManager::Get().createNavi("testNavi", resourceToDataURI("test.html"), 25, 15, 512, 512);
Here's the function definition of this new utility function:

Code: Select all

std::string resourceToDataURI(const std::string &resFileName, const std::string &resourceGroupName = Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
Essentially what this utility function does is open the Ogre Resource, derive its mime-type by looking at its file extension, encode the contents to Base64, and concatenate that all into the correct Data URI syntax.

This utility is not limited to just HTML files either. This is the contents of 'test.html' file:

Code: Select all

<html>
<head>
<link rel="stylesheet" type="text/css" href="resource://SexyStyle.css" />
</head>
<body>
Hello world! This is a proof of concept! ;)
<br/><br/>
<img src="resource://General/clouds.jpg" />
<br/>
<img src="resource://GuuSama.gif" />
<br/>
</body>
</html>
When Navi parses an HTML/Javascript/CSS/PHP/ASP resource, it is smart enough to replace all instances of "resource://GroupName/FileName.extension" with an encoded DataURI of an Ogre Resource, if it exists. If you omit the GroupName, and just use "resource://FileName.extension", Navi will assume you are referring to the Default Resource Group (in this case, 'General').

'SexyStyle.css' is a resource inside of the 'Media' folder, here is the contents of it:

Code: Select all

body {
	background-color: #fb28fe;
	color: #000000;
	text-align: center;
	font: bold 15px Georgia;
	width: 502px;
	height: 502px;
	border: 5px solid #000000;
	margin-left: 0;
	margin-top: 0;
	overflow: hidden;
}

img {
	border: 3px dashed #da2cd9;
}
Here is a screenshot of the result of the above code:
Image

There is some overhead in encoding Data URI's and so for larger resources (greater than 500k), I recommend leaving them inside of the 'NaviLocal' folder, which you can refer to in 'parsed Ogre Resources' (HTML/Javascript/CSS/PHP/ASP resources) with the 'local://filename.ext' syntax.

You can also now 'programmatically' create HTML files for use in a Navi. This is how you might do it:

Code: Select all

std::string myPage = "<html><body>Hello world!<br/><img src=\"resource://clouds.jpg\" /></body></html>";

NaviManager::Get().createNavi("myNavi", htmlToDataURI(myPage), Center , 512, 512);
Note: HTML/Javascript/CSS/PHP/ASP resources that are not an Ogre Resource/Programmatically-created will not be able to use the 'resource://' and 'local://' specifiers inside their code.
User avatar
ilsilent
Gnoblar
Posts: 5
Joined: Sun May 27, 2007 2:44 pm
Location: Bari, Italy

problem :(

Post by ilsilent »

Running NaviDemo, i get this horrible result:
http://www.gparts.net/navi/navi.jpg

I'm running under Windows Vista, with an ATI Mobility Radeon X1400...
same test on other machines doesn't give any problem.
Any suggestion???
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2

Re: problem :(

Post by ajs15822 »

ilsilent wrote:Running NaviDemo, i get this horrible result:
http://www.gparts.net/navi/navi.jpg

I'm running under Windows Vista, with an ATI Mobility Radeon X1400...
same test on other machines doesn't give any problem.
Any suggestion???
Hm, other users haven't had problems with Windows Vista as far as I know, it may be your videocard/videocard driver. Try running the Ogre Dynamic Texture Demo and see if you are getting the same problem.
User avatar
Nauk
Gnoll
Posts: 653
Joined: Thu May 11, 2006 9:12 pm
Location: Bavaria
x 36

Post by Nauk »

awesome, this will speed up GUI building incredibly :) Very nice work there! :D
Funcracker
Halfling
Posts: 43
Joined: Tue Mar 20, 2007 4:41 pm

Post by Funcracker »

Just wanted to add some more praise to this topic ;)

Very well done! As a part-time web developer I'm very interested in how this will develop. Applying this to meshes would really be something I'm looking forward to. Unfortunately, I still have to learn a lot before I would be able to do that myself (in an efficient way).

Thanks for this fantastic manager ajs15822!
User avatar
To1ne
Halfling
Posts: 68
Joined: Thu May 10, 2007 3:24 pm

Post by To1ne »

Tjeezz, it's looking real good!
Gonna check it out (when I have some time).
User avatar
Zeal
Ogre Magi
Posts: 1260
Joined: Mon Aug 07, 2006 6:16 am
Location: Colorado Springs, CO USA

Post by Zeal »

Awe thats a real shame about flash.. are we sure there is no way to inject the inputs? Or emulate them somehow outside LLMozLib?
voxel
Gnome
Posts: 334
Joined: Wed Aug 02, 2006 9:27 am
Location: Toronto, Canada

Post by voxel »

Wow (I'm a little late to the party). This is exactly what I'm looking for!
Mishra
Kobold
Posts: 37
Joined: Sun Jan 22, 2006 10:08 pm

Post by Mishra »

Is a linux port planned for the short term??
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Post by jacmoe »

Mishra wrote:Is a linux port planned for the short term??
If you look up, you'll see that there's some issues with the component used.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
eric.fu
Gnoblar
Posts: 1
Joined: Wed May 30, 2007 7:00 am

when i run it,i just can see two white boards

Post by eric.fu »

when i run it,i just can see two white boards,something maybe run wrongly.
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2

Post by ajs15822 »

A sneak peek of what's coming soon ;)

Image
User avatar
Zeal
Ogre Magi
Posts: 1260
Joined: Mon Aug 07, 2006 6:16 am
Location: Colorado Springs, CO USA

Post by Zeal »

Oooh lookn good!

Any news on the flash front? I realised the other day that this limitation prevents you from actually clicking play/pause ect on many videos (like those on youtube). It also prevents you from browsing some sites that use flash objects for buttons/links ect...

I know you said its a limitation of the library below this one, but we just gotta find SOME creative way to fix it...
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2

Post by ajs15822 »

Zeal wrote:Oooh lookn good!

Any news on the flash front? I realised the other day that this limitation prevents you from actually clicking play/pause ect on many videos (like those on youtube). It also prevents you from browsing some sites that use flash objects for buttons/links ect...

I know you said its a limitation of the library below this one, but we just gotta find SOME creative way to fix it...
Nope, still nothing. You're welcome to contact the head developer (callum) or query their discussion group: http://groups.google.com/group/ubrowser

I've dived several times into the LLMozLib source trying to identify the issue however the Gecko API is so very cryptic =_=, I've had no luck. I'd really rather spend my time productively developing higher-level components than trying to fix someone else's code. I know we're not the only ones waiting for the resolution of this issue and, given time, it will be resolved.

As for clicking play on flash videos, I just add "&autoplay=1" to my embedded youtube videos.
Vectrex
Ogre Magi
Posts: 1266
Joined: Tue Aug 12, 2003 1:53 am
Location: Melbourne, Australia
x 1

Post by Vectrex »

ahh, excellent. 3d navis ahoy!
vmh
Gnoblar
Posts: 5
Joined: Fri Jun 01, 2007 3:07 pm

Keying

Post by vmh »

ajs15822 wrote:A sneak peek of what's coming soon ;)
How is that color-keying going to work? Specifically, will Navi let clicks through if the mouse is over a transparent region? I want to cover the whole screen (within the powers of 2 limitation) with one navi and create the GUI entirely in javascript/ajax.