Navi
-
- OGRE Moderator
- Posts: 3447
- Joined: Mon Jul 18, 2005 4:15 pm
- Location: Wales, UK
- x 58
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
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.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?
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.
-
- Ogre Magi
- Posts: 1260
- Joined: Mon Aug 07, 2006 6:16 am
- Location: Colorado Springs, CO USA
-
- Kobold
- Posts: 37
- Joined: Sun Jan 22, 2006 10:08 pm
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
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.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?
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

So stay tuned!

-
- Goblin
- Posts: 208
- Joined: Sat May 05, 2007 4:49 pm
-
- Ogre Magi
- Posts: 1260
- Joined: Mon Aug 07, 2006 6:16 am
- Location: Colorado Springs, CO USA
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
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 ... e21f75d8a7Zeal wrote: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...LLMozLib has limited support for Flash applications and cannot (at this time) inject inputs into Flash objects.
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
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:
Here's the function definition of this new utility function:
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:
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:
Here is a screenshot of the result of the above code:

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:
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.
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);
Code: Select all
std::string resourceToDataURI(const std::string &resFileName, const std::string &resourceGroupName = Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
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>
'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;
}

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);
-
- Gnoblar
- Posts: 5
- Joined: Sun May 27, 2007 2:44 pm
- Location: Bari, Italy
problem :(
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???
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???
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
Re: problem :(
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.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???
-
- Gnoll
- Posts: 653
- Joined: Thu May 11, 2006 9:12 pm
- Location: Bavaria
- x 36
awesome, this will speed up GUI building incredibly
Very nice work there! 


ARTIFEX TERRA 3D - Artist-friendly, free and easy WYSIWYG realtime outdoor scene Editor & Painter
New loader now with Ogre::Terrain support: Addons for Artifex on SourceForge
MOC - Minimal Ogre Collision & Mousepicking
Simple TerrainMaterialGenerator for the use of standard Ogre material with Ogre::Terrain
Support me on Patreon
-
- Halfling
- Posts: 43
- Joined: Tue Mar 20, 2007 4:41 pm
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!

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!
-
- Halfling
- Posts: 68
- Joined: Thu May 10, 2007 3:24 pm
-
- Ogre Magi
- Posts: 1260
- Joined: Mon Aug 07, 2006 6:16 am
- Location: Colorado Springs, CO USA
-
- Gnome
- Posts: 334
- Joined: Wed Aug 02, 2006 9:27 am
- Location: Toronto, Canada
-
- Kobold
- Posts: 37
- Joined: Sun Jan 22, 2006 10:08 pm
-
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
If you look up, you'll see that there's some issues with the component used.Mishra wrote:Is a linux port planned for the short term??
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
-
- Gnoblar
- Posts: 1
- Joined: Wed May 30, 2007 7:00 am
when i run it,i just can see two white boards
when i run it,i just can see two white boards,something maybe run wrongly.
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
-
- Ogre Magi
- Posts: 1260
- Joined: Mon Aug 07, 2006 6:16 am
- Location: Colorado Springs, CO USA
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...
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...
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
Nope, still nothing. You're welcome to contact the head developer (callum) or query their discussion group: http://groups.google.com/group/ubrowserZeal 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...
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.
-
- Ogre Magi
- Posts: 1266
- Joined: Tue Aug 12, 2003 1:53 am
- Location: Melbourne, Australia
- x 1
-
- Gnoblar
- Posts: 5
- Joined: Fri Jun 01, 2007 3:07 pm
Keying
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.ajs15822 wrote:A sneak peek of what's coming soon ;)