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
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2

Post by ajs15822 »

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.
That limitation can be easily circumvented through use of Alpha-Masks/Color-Keying + Ignorance of Transparent Pixels (check the latest release).
User avatar
madmark
Goblin
Posts: 292
Joined: Fri Jul 22, 2005 8:14 pm
Location: Midwest USA

Post by madmark »

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.
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.)

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.
User avatar
tau
Silver Sponsor
Silver Sponsor
Posts: 413
Joined: Wed Feb 11, 2004 11:44 am
Location: Austin (that's kept wierd :))

Post by tau »

@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!
Twitter: Tau Powered
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 »

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!
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.

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. :P

*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.
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 »

madmark wrote:
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.
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.)

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.
Okay cool, the wiki should be ready to go in a few hours. ;)
neshume
Gnoblar
Posts: 11
Joined: Sun Jun 10, 2007 7:37 pm

Updating UI texture elements in Navi

Post by neshume »

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
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2

Re: Updating UI texture elements in Navi

Post by ajs15822 »

neshume 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
Hi Neshume, thanks for the compliment

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.
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 »

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. :D
User avatar
AticAtac
Halfling
Posts: 72
Joined: Sat Sep 24, 2005 10:19 am
Location: Germany

Post by AticAtac »

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.
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 »

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.
I'm fairly positive the next update of LLMozLib should include support for it (if not, I'll modify it).

This post on the Google Group of LLMozLib might be helpful: Support for proxies
User avatar
AticAtac
Halfling
Posts: 72
Joined: Sat Sep 24, 2005 10:19 am
Location: Germany

Post by AticAtac »

I am now testing NaviLib in Debug-Mode. When i shutdown the application i get sometimes a heap-error happening in
'LLMozLib::getInstance()->reset();'
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 »

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:

Code: Select all

NaviManager::Get().NaviEvaluateJS("myNavi", "document.getElementById('textArea').innerHTML = 'Hello sexy world!';");
The fun doesn't end there, evaluation works awesomely as well!

Code: Select all

std::string currentText = NaviManager::Get().NaviEvaluateJS("myNavi", "document.getElementById('textArea').innerHTML;");
If you had a function on the page that returned some value, you could easily evaluate that:

Code: Select all

std::string currentText = NaviManager::Get().NaviEvaluateJS("myNavi", "MySuperFunction(1337)");
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. :wink: 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. 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 »

AticAtac wrote:I am now testing NaviLib in Debug-Mode. When i shutdown the application i get sometimes a heap-error happening in
'LLMozLib::getInstance()->reset();'
Yes, earlier in the thread I mentioned that in Debug-Mode there is a bug from the version of Gecko that we're using.
User avatar
tau
Silver Sponsor
Silver Sponsor
Posts: 413
Joined: Wed Feb 11, 2004 11:44 am
Location: Austin (that's kept wierd :))

Post by tau »

ajs15822 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. :(
Man, that's bad, I was gonna use it, and I did not know it's not supported :( 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 :)
Twitter: Tau Powered
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 »

tau wrote:
ajs15822 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. :(
Man, that's bad, I was gonna use it, and I did not know it's not supported :( 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 :)
yeah, your question actually inspired me to implement that :P
User avatar
tau
Silver Sponsor
Silver Sponsor
Posts: 413
Joined: Wed Feb 11, 2004 11:44 am
Location: Austin (that's kept wierd :))

Post by tau »

ajs15822 wrote: yeah, your question actually inspired me to implement that :P
Kudos to you, pal and thanks! :) It's great you are close to your users and listening to them - the best skill a author/maintainer could have :D
Twitter: Tau Powered
User avatar
madmark
Goblin
Posts: 292
Joined: Fri Jul 22, 2005 8:14 pm
Location: Midwest USA

Post by madmark »

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
vmh
Gnoblar
Posts: 5
Joined: Fri Jun 01, 2007 3:07 pm

w00t

Post by vmh »

ajs15822 wrote: Asynchronous Javascript Evaluation
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.
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2

Re: w00t

Post by ajs15822 »

vmh wrote:
ajs15822 wrote: Asynchronous Javascript Evaluation
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.
You're welcome ;)

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*
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 »

Update!
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.
There's also a new tutorial on the Wiki, more are coming soon.

Have fun~ :D
thamosthigh
Greenskin
Posts: 146
Joined: Fri Jun 03, 2005 8:13 am
Location: Austria

Post by thamosthigh »

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.
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 »

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.
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.
User avatar
AticAtac
Halfling
Posts: 72
Joined: Sat Sep 24, 2005 10:19 am
Location: Germany

Post by AticAtac »

@ajs15822
You are great !
Continue the good work.
I am definitly going to use Navi in my game.
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 »

AticAtac wrote:@ajs15822
You are great !
Continue the good work.
I am definitly going to use Navi in my game.
Fantastic, glad to hear it! :D
User avatar
AticAtac
Halfling
Posts: 72
Joined: Sat Sep 24, 2005 10:19 am
Location: Germany

Post by AticAtac »

I got a question:
Is it possible to retrieve the position of certain "object" (gif-image, editbox, ...) ?
What i want to do is to draw "something" over the html at runtime at certain position which corresponds to an element on that page.