That limitation can be easily circumvented through use of Alpha-Masks/Color-Keying + Ignorance of Transparent Pixels (check the latest release).AticAtac wrote:First, great gui-lib and idea !
Overlays having to be of size of power of 2 "hurts" and should be changed by internally managing different textures of power of 2 and transparent areas.
Navi
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
-
- Goblin
- Posts: 292
- Joined: Fri Jul 22, 2005 8:14 pm
- Location: Midwest USA
Actually, I have written a little function to make the map on request from the current data string. I will send that along on Monday... (forgot to commit to my SVN, so it isn't available to me right now.)ajs15822 wrote: If you haven't written it already, I'd gladly extend the C++ NaviData implementation to create a std::map from the internal representation.
I hope to have a first pass on the Lua wrapper to send along on Monday as well.
Wiki is good. If you have the Navi stuff on a wiki, I will post it there when ready.
-
- Silver Sponsor
- Posts: 413
- Joined: Wed Feb 11, 2004 11:44 am
- Location: Austin (that's kept wierd :))
@ajs15822
I've got a good question for you
Is it possible to render a web page on the transparent background (not white, not color filled)? So far, I've noticed only that you can change the opacity of the whole texture, Navi was rendered on. I'm not sure if I've seen similar here...
The reason I'm asking is if that is possible, then we can use SVG for interface (Gecko can render SVG, right?), and that will be sweet!
I've got a good question for you

Is it possible to render a web page on the transparent background (not white, not color filled)? So far, I've noticed only that you can change the opacity of the whole texture, Navi was rendered on. I'm not sure if I've seen similar here...
The reason I'm asking is if that is possible, then we can use SVG for interface (Gecko can render SVG, right?), and that will be sweet!
Twitter: Tau Powered
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
This is why the latest release (see the first post for updates) has introduced Dynamic Color-Keying. There is no native support for Gecko to render to a 'transparent' background and so we must key out the background with another color with 0% opacity.tau wrote:@ajs15822
I've got a good question for you
Is it possible to render a web page on the transparent background (not white, not color filled)? So far, I've noticed only that you can change the opacity of the whole texture, Navi was rendered on. I'm not sure if I've seen similar here...
The reason I'm asking is if that is possible, then we can use SVG for interface (Gecko can render SVG, right?), and that will be sweet!
Just remember that with SVG's and Text, any anti-aliasing done by Gecko incorporates the background color as the color matte. So remember this when selecting a color to use as the key.
And yes, SVG's work great, have fun.

*EDIT*: Just a heads up, Mozilla does not support SMIL animation of SVG's at this time, which may be rather deleterious to your experience.

There are still many things you can do with SVG's in Mozilla, you probably could very well implement your entire interface without ever using SMIL animation. Remember that because SVGs are native to Mozilla, you can use them with XUL and Javascript; quite a powerful combination indeed.
Last edited by ajs15822 on Sun Jun 10, 2007 8:15 am, edited 1 time in total.
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
Okay cool, the wiki should be ready to go in a few hours.madmark wrote:Actually, I have written a little function to make the map on request from the current data string. I will send that along on Monday... (forgot to commit to my SVN, so it isn't available to me right now.)ajs15822 wrote: If you haven't written it already, I'd gladly extend the C++ NaviData implementation to create a std::map from the internal representation.
I hope to have a first pass on the Lua wrapper to send along on Monday as well.
Wiki is good. If you have the Navi stuff on a wiki, I will post it there when ready.

-
- Gnoblar
- Posts: 11
- Joined: Sun Jun 10, 2007 7:37 pm
Updating UI texture elements in Navi
Hi,
First of all ... you have done a gr8 job!!!
I wanted to create a small panel to show render targets (for debugging) is this possible using navi (of course I use MooTools for the gui but I still have to update the textures in realTime)
Cheers,
Neshume
First of all ... you have done a gr8 job!!!
I wanted to create a small panel to show render targets (for debugging) is this possible using navi (of course I use MooTools for the gui but I still have to update the textures in realTime)
Cheers,
Neshume
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
Re: Updating UI texture elements in Navi
Hi Neshume, thanks for the complimentneshume wrote:Hi,
First of all ... you have done a gr8 job!!!
I wanted to create a small panel to show render targets (for debugging) is this possible using navi (of course I use MooTools for the gui but I still have to update the textures in realTime)
Cheers,
Neshume
This functionality doesn't exist yet, however in the next release I do plan to provide a way to do this (by implementing the retrieval of the internal Panel object of a Navi).
Thus, you would simply need to add an Ogre::OverlayElement to the existing Panel object with a RenderTarget Texture. If the Navi is movable, any child overlay elements would naturally move with it.
This is really only viable for static Navi pages (pages that do no scroll) or for NaviMaterials.
Last edited by ajs15822 on Wed Jun 13, 2007 7:28 am, edited 1 time in total.
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
Okay, this is just too cool to keep under wraps.
I've enhanced the dynamic color-keying to allow 'fuzzy color-keying'. Think of in Photoshop, when using the 'Color Range' utility, moving the 'Fuzziness' slider.
So now when you key out one color, it will (at your discretion) also key out the closest colors (depending on how much Fuzziness you specify). Also, the color distance of the closest colors affects the opacity as well.
This video demonstrates this latest feature (fuzzy color-keying) and also shows off the NaviMouse implementation. (The animated dock is made using Javascript/Mootools)
Download the new video here. (XVID)
Isn't that dock just way cool?
Oh! Also, the NaviLibrary wiki is now open.
I've enhanced the dynamic color-keying to allow 'fuzzy color-keying'. Think of in Photoshop, when using the 'Color Range' utility, moving the 'Fuzziness' slider.
So now when you key out one color, it will (at your discretion) also key out the closest colors (depending on how much Fuzziness you specify). Also, the color distance of the closest colors affects the opacity as well.
This video demonstrates this latest feature (fuzzy color-keying) and also shows off the NaviMouse implementation. (The animated dock is made using Javascript/Mootools)
Download the new video here. (XVID)
Isn't that dock just way cool?
Oh! Also, the NaviLibrary wiki is now open.

-
- Halfling
- Posts: 72
- Joined: Sat Sep 24, 2005 10:19 am
- Location: Germany
Once again, Great Job!
Your lib gives me a new perspective for my game. Before i planned the game on the web with java-applets, which means run the game inside the browser. But now i am thinking about to reverse that and run the browser inside my game
One question, is it possible to use proxy inside Navi ? Here at work we have set up a proxy.
Your lib gives me a new perspective for my game. Before i planned the game on the web with java-applets, which means run the game inside the browser. But now i am thinking about to reverse that and run the browser inside my game

One question, is it possible to use proxy inside Navi ? Here at work we have set up a proxy.
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
I'm fairly positive the next update of LLMozLib should include support for it (if not, I'll modify it).AticAtac wrote:Once again, Great Job!
Your lib gives me a new perspective for my game. Before i planned the game on the web with java-applets, which means run the game inside the browser. But now i am thinking about to reverse that and run the browser inside my game
One question, is it possible to use proxy inside Navi ? Here at work we have set up a proxy.
This post on the Google Group of LLMozLib might be helpful: Support for proxies
-
- Halfling
- Posts: 72
- Joined: Sat Sep 24, 2005 10:19 am
- Location: Germany
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
Major Update:
Wow! What a night! (I pulled an all-nighter working on this).
Long story short, we now have Asynchronous Javascript Evaluation!! This is a major hurdle and its benefits are two-fold:
1) Execute Javascript at any time. Don't worry about page refreshes (the previous problem with NaviData transmission), it's asynchronous!
2) Evaluate Javascript at any time!
Okay, here's an example. Say you wanted to update a DIV layer with an ID of "textArea" with some new text. All you would need to do is this:
The fun doesn't end there, evaluation works awesomely as well!
If you had a function on the page that returned some value, you could easily evaluate that:
Note: NaviEvaluateJS will always return a String, regardless of the internal Javascript datatype. You will need to do conversions yourself.
I nearly fell out of my chair when it first worked, I'm still reeling.
This is pretty major for me and finally gives the NaviLibrary some real feasability. I mean, come on, executing/evaluating Javascript in-line? You can't get much better than that. 
Wow! What a night! (I pulled an all-nighter working on this).
Long story short, we now have Asynchronous Javascript Evaluation!! This is a major hurdle and its benefits are two-fold:
1) Execute Javascript at any time. Don't worry about page refreshes (the previous problem with NaviData transmission), it's asynchronous!
2) Evaluate Javascript at any time!
Okay, here's an example. Say you wanted to update a DIV layer with an ID of "textArea" with some new text. All you would need to do is this:
Code: Select all
NaviManager::Get().NaviEvaluateJS("myNavi", "document.getElementById('textArea').innerHTML = 'Hello sexy world!';");
Code: Select all
std::string currentText = NaviManager::Get().NaviEvaluateJS("myNavi", "document.getElementById('textArea').innerHTML;");
Code: Select all
std::string currentText = NaviManager::Get().NaviEvaluateJS("myNavi", "MySuperFunction(1337)");
I nearly fell out of my chair when it first worked, I'm still reeling.


-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
-
- Silver Sponsor
- Posts: 413
- Joined: Wed Feb 11, 2004 11:44 am
- Location: Austin (that's kept wierd :))
Man, that's bad, I was gonna use it, and I did not know it's not supportedajs15822 wrote: *EDIT*: Just a heads up, Mozilla does not support SMIL animation of SVG's at this time, which may be rather deleterious to your experience.![]()

You did really good job with color-keying, and that's very useful. In fact, that will be an answer for my previous question

Twitter: Tau Powered
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
yeah, your question actually inspired me to implement thattau wrote:Man, that's bad, I was gonna use it, and I did not know it's not supportedajs15822 wrote: *EDIT*: Just a heads up, Mozilla does not support SMIL animation of SVG's at this time, which may be rather deleterious to your experience.![]()
I hope Gecko 2 will support it eventually.
You did really good job with color-keying, and that's very useful. In fact, that will be an answer for my previous question

-
- Silver Sponsor
- Posts: 413
- Joined: Wed Feb 11, 2004 11:44 am
- Location: Austin (that's kept wierd :))
Kudos to you, pal and thanks!ajs15822 wrote: yeah, your question actually inspired me to implement that


Twitter: Tau Powered
-
- Goblin
- Posts: 292
- Joined: Fri Jul 22, 2005 8:14 pm
- Location: Midwest USA
I put up the changes that I need for the Lua wrapper on NaviWiki
http://navi.agelessanime.com/wiki/index ... ifications
Feel free to fix it and/or include with the base distro.
I am working on the wrapper and have a rough wiki page linked to on the community portal page. Currently that page just points to the modification page and has a link to the CLua library (hosted on the Wounded Badger site, that needs a page too)
Just added the link to the CLua variant first function to the wiki.
Pretty much what the standard demo does, just controlled from Lua
http://navi.agelessanime.com/wiki/index ... ifications
Feel free to fix it and/or include with the base distro.
I am working on the wrapper and have a rough wiki page linked to on the community portal page. Currently that page just points to the modification page and has a link to the CLua library (hosted on the Wounded Badger site, that needs a page too)
Just added the link to the CLua variant first function to the wiki.
Pretty much what the standard demo does, just controlled from Lua
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
Re: w00t
You're welcomevmh wrote:With this and color keying your have made my life a lot easier. The ability to call javascript like this frees me from using an embedded webserver and some very hacky AJAX. Thank you.ajs15822 wrote: Asynchronous Javascript Evaluation

And actually, speaking of color-keying, that might go by the wayside if I have my way. After digging around in the Mozilla API, I found a native way to find the actual alpha channel of the browser window. So you could effectively have a page with "background-color: translucent;" and everything would just 'work'.
It will take a little more studying of the Mozilla API to get implemented though. *Dances around for great progress*
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
Update!
NaviLibrary v1.2 has just been released! - Get it now!
Updates include:
Have fun~
NaviLibrary v1.2 has just been released! - Get it now!
Updates include:
- 'Fuzzy' Color-Keying - More info
Javascript Evaluation - More info
DataMap Retrieval - When working with a NaviData object, you can now retrieve all of its parameter names/values in the form of a std::map. (Written by madmark)
Retrieve the internal material name of a Navi
Retrieve the internal panel (Ogre::OverlayContainer) of a Navi
Bugfix - There was an issue with the destruction of the Navi object, specifically I didn't destroy the OverlayContainer before the Overlay. This has been resolved thanks to madmark's notification of the issue.
Have fun~

-
- Greenskin
- Posts: 146
- Joined: Fri Jun 03, 2005 8:13 am
- Location: Austria
I watch the development of Navi some time now, and I wondered if there are issues to expect if I want to use Navi inside a CEGUI window, since CEGUI still lacks HTML rendering capability (some may argue about if it is indeed a lack)?
I saw that you internally use an Ogre Overlay. Maybe rendering to a Ogre::Texture would abstract the framework more, becoming usable to many other GUI solutions - at least CEGUI.
I saw that you internally use an Ogre Overlay. Maybe rendering to a Ogre::Texture would abstract the framework more, becoming usable to many other GUI solutions - at least CEGUI.
-
- OGRE Expert User
- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
This was implemented in v1.1 with 'NaviMaterials'. All you need to do is derive the TexturePtr from the Material name and inject relative input.thamosthigh wrote:I watch the development of Navi some time now, and I wondered if there are issues to expect if I want to use Navi inside a CEGUI window, since CEGUI still lacks HTML rendering capability (some may argue about if it is indeed a lack)?
I saw that you internally use an Ogre Overlay. Maybe rendering to a Ogre::Texture would abstract the framework more, becoming usable to many other GUI solutions - at least CEGUI.
-
- Halfling
- Posts: 72
- Joined: Sat Sep 24, 2005 10:19 am
- Location: Germany
-
- Halfling
- Posts: 72
- Joined: Sat Sep 24, 2005 10:19 am
- Location: Germany