Hikari (v0.3)

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
boyamer
Orc
Posts: 459
Joined: Sat Jan 24, 2009 11:16 am
Location: Italy
x 6

Re: Hikari (v0.3)

Post by boyamer »

DOes Hikari Work on Linux and MacOSX?
Till
Gnoblar
Posts: 22
Joined: Tue Sep 30, 2008 5:47 pm
Location: Paris, France

Re: Hikari (v0.3)

Post by Till »

Hi all,
I have a small question regarding Hikari.

Is there any reasons why FlashControl::update() is protected, and so forcing the use of HikariManager::update() to update FlashControls all together?
Is there any way to update only one FlashControl at a time?

Thanks for any answer.
User avatar
Linuzer
Gnoblar
Posts: 7
Joined: Tue Oct 14, 2008 5:48 pm

Link to Hikari undocked version v0.4.1 (engine independent)

Post by Linuzer »

Hi again,

i have uploaded a zip file with undocked version of Hikari for all the people who want to download this mini-fork, engine independent. The VS project has also a HikariOgre demo source to show a FlashControl implementation for Ogre.
IFlashControl interface class has change a bit, and some bugs has been fixed, from previous version. See "CHANGELOG.txt" for more info.

It was uploaded long ago, to a free file hosting service ( published in Hikari forums ), but now its a broken link.

Now, is under g-boot team web server, so it will be more stable.

http://www.g-boot.com/downloads/sw/2009 ... c_v0.4.zip

Greetings and thanks to Hikari original authors and open source community.

Enjoy.

J.
http://www.g-boot.com
ThunderWheels a top-down perspective racing car game
::SONB::
Kobold
Posts: 27
Joined: Thu Apr 06, 2006 8:35 pm
Contact:

Re: Hikari (v0.3)

Post by ::SONB:: »

Great news!
Could you please explain how to use this IFlashControl interface?

Thanx in advance!
User avatar
Linuzer
Gnoblar
Posts: 7
Joined: Tue Oct 14, 2008 5:48 pm

Re: Hikari (v0.3)

Post by Linuzer »

::SONB:: wrote:Great news!
Could you please explain how to use this IFlashControl interface?

Thanx in advance!

Hi,

i'll try to explain the concept.

You need to care about the low level render part in your engine, cause IFlashControls manage with a dynamic graphic buffer which you need to draw. Hikari give you a render buffer from AVM ( Adobe Virtual Machine ), working like a wrapper and caring for low level part of messaging, binding, dirty zones, ... all you need, less one thing: render.

In Undocked version, the graphic side must be implemented in child classes (FlashControl implements IFlashControl).

Depends which engines you use, you must code differents FlashControl classes (and overlay classes too), renderig to a texture, or overlay, or whatever, ... following your engine API. This is the main issue.

Look at FlashControl::createMaterial() and FlashControl::update() methods, to start thinking in your engine implementation.

The Hikari's manager feature, create and delete FlashControls, need to be implemented in engine side.

You should read carefully the HikariOgreDemo C++ files to good understand, and i recommend you to google search about graphic render buffering, render to texture technique, ...

Good luck, and take it easy... would be a long way. Enjoy coding!

Greetings,

J.
http://www.g-boot.com
ThunderWheels a top-down perspective racing car game
::SONB::
Kobold
Posts: 27
Joined: Thu Apr 06, 2006 8:35 pm
Contact:

Re: Hikari (v0.3)

Post by ::SONB:: »

Hi, Linuzer! Thanx for the explanation.

I'm trying to compile your HikariOgreDemo in Shoggoth. It compiles without any error, but when I start the demo, all I can see are gray rectangles on a black background. I have the same issue with the 'Player' demo by ajs15822 in the Showcase forum (http://www.ogre3d.org/forums/viewtopic.php?f=11&t=46020), and it happens with both 'docked' and 'undocked' version of Hikari.

Do you, or somebody else, have any idea, why this is happening?

Thanx a lot in advance!
User avatar
Linuzer
Gnoblar
Posts: 7
Joined: Tue Oct 14, 2008 5:48 pm

Re: Hikari (v0.3)

Post by Linuzer »

Are you tried to use the "alphaHacking" feature??
I have seen black rectangles in some laptops, and weird graphic cards....

Try to use this method FlashControl::setTransparent(bool isTransparent, bool useAlphaHack)

yourcontrol->setTransparent(true,true);

Tell us if you success... if not, please show us a screenshot.

Greetings
http://www.g-boot.com
ThunderWheels a top-down perspective racing car game
::SONB::
Kobold
Posts: 27
Joined: Thu Apr 06, 2006 8:35 pm
Contact:

Re: Hikari (v0.3)

Post by ::SONB:: »

Linuzer, I found the reason for my problem. It's the Ogre source code. If I link libraries from the pre-built Ogre SDK everything works fine, but when I build Ogre DLLs from the source and link them, I see only gray rectangles, where flash controls should be.
It seems like Hikari doesn't like from source built DLLs... And I built them following the wiki tutorial.

Hmm... Any idea?
Till
Gnoblar
Posts: 22
Joined: Tue Sep 30, 2008 5:47 pm
Location: Paris, France

Re: Hikari (v0.3)

Post by Till »

Hi all,

I'm not quite sure the precedent posts are related to my question or do I miss something?

Does any body know if there is a way to separately update each FlashControl on its own? By know the only way I figure out is by calling HikariManager::update(), which updates all FlashControls together, which I'd like to avoid.

Thanks for any follow up.
User avatar
Praetorian
Google Summer of Code Student
Google Summer of Code Student
Posts: 171
Joined: Fri Aug 10, 2007 10:37 pm
Location: WA - USA
x 5

Re: Hikari (v0.3)

Post by Praetorian »

Till wrote:Does any body know if there is a way to separately update each FlashControl on its own? By know the only way I figure out is by calling HikariManager::update(), which updates all FlashControls together, which I'd like to avoid.
I was just looking into the same thing the other day... I don't have the code front of me now, but I think that calling HikariManager::update() simply iterates through all of the FlashControls, checks if they should be deleted and otherwise updates them. If you want to manually update everything, you'd just replicate what that function does (look at Hikari's source (it should be in should be in Hikari.cpp)), I know it updates each control with FlashControl::update(), but I don't remember what exactly it does as far as checking if stuff needs to be deleted.

Hope this helps, good luck! :)
My Google summer of code 2011 topic: Unit Testing Framework
My Google summer of code thread
My Google summer of code wiki page
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2
Contact:

Re: Hikari (v0.3)

Post by ajs15822 »

Hey guys!

Since there seems to be some interest in Hikari lately, I'll soon be releasing an updated SDK build for the Active-X branch of Hikari that will be compatible with Ogre (Shoggoth) 1.6.2 and MSVC9. I am working on a cross-platform NPAPI branch (via Akarui) but it still needs a little work before it's usable in a production setting.
Till wrote:Hi all,
I have a small question regarding Hikari.

Is there any reasons why FlashControl::update() is protected, and so forcing the use of HikariManager::update() to update FlashControls all together?
Is there any way to update only one FlashControl at a time?

Thanks for any answer.
Could you explain why you only wish to update a single FlashControl at a time? FlashControls should only occupy CPU time during Hikari::update if they are visible and their movie has changed since the last frame so I don't understand why you wish to update them selectively.
Linuzer wrote:Hi again,

i have uploaded a zip file with undocked version of Hikari for all the people who want to download this mini-fork, engine independent.
Thanks for sharing, Linuzer!
User avatar
Praetorian
Google Summer of Code Student
Google Summer of Code Student
Posts: 171
Joined: Fri Aug 10, 2007 10:37 pm
Location: WA - USA
x 5

Re: Hikari (v0.3)

Post by Praetorian »

ajs15822 wrote:Could you explain why you only wish to update a single FlashControl at a time? FlashControls should only occupy CPU time during Hikari::update if they are visible and their movie has changed since the last frame so I don't understand why you wish to update them selectively.
Oh, that saves me some effort then, I assumed it would keep updating the movie if it was changing, even if it was invisible.
ajs15822 wrote:I am working on a cross-platform NPAPI branch (via Akarui) but it still needs a little work before it's usable in a production setting.
Cool, looking forward to it! :)
My Google summer of code 2011 topic: Unit Testing Framework
My Google summer of code thread
My Google summer of code wiki page
Till
Gnoblar
Posts: 22
Joined: Tue Sep 30, 2008 5:47 pm
Location: Paris, France

Re: Hikari (v0.3)

Post by Till »

Hi ajs15822,

the way we're using Hikari by now is mostly with 'still' movies.

Anyhow, we'd like to be able to manage each of them seperatly.
One of the big issue, is that we want to be sure each FlashControl is properly drown before displaying is, since it works in a pretty asynchroneous mode.

In that manner, we implemented some routines inside each flash movies to tell OGRE whether or not it is ready to be displayed. For instance using the event features when loading bitmap files.
We realized some FlashControl may need more than a "frame" to correctly update.

If one Flash control tells OGRE it is ready to be displayed, we'd like to be sure only that one will be updated, since the other may not.

Hope this is clear enough.
User avatar
st4lk3r87
Greenskin
Posts: 101
Joined: Fri Feb 23, 2007 12:59 am
Location: Reggio Calabria ( Italy )
Contact:

Re: Hikari (v0.3)

Post by st4lk3r87 »

Hi i'm working in a 3d chat ( social network like ) and we are using Hikari for gui.

We need to display in textarea the input caret... how we can do it ? Are there some workarounds ?

Thanks a lot...
michaelg1987
Halfling
Posts: 71
Joined: Sat Mar 10, 2007 5:14 pm

Re: Hikari (v0.3)

Post by michaelg1987 »

So how about getting a rendered texture into this? Like, for instance, let's say I designed an inventory system for my game in this, and I wanted to put rendered pictures of items into it to represent everything. How feasible would that be?

Edit: So I started to implement Hikari. I've never had such an easy time getting it in, but I have another question. Let's say I wanted to make an in-game tooltip in flash that resized dynamically depending on how much text there was to display about a given object. How exactly would I go about resizing it? I'm somewhat new to Flash in general, so forgive me if this is terribly obvious.
michaelg1987
Halfling
Posts: 71
Joined: Sat Mar 10, 2007 5:14 pm

Re: Hikari (v0.3)

Post by michaelg1987 »

Not to double post this, but now I've got this issue with a gray box. Anyone else getting this? It seems to happen whenever transparency is enabled, with and without the alpha hack enabled.
User avatar
wacom
Gnome
Posts: 350
Joined: Sun Feb 10, 2008 2:07 pm

Re: Hikari (v0.3)

Post by wacom »

michaelg1987 wrote:Not to double post this, but now I've got this issue with a gray box. Anyone else getting this? It seems to happen whenever transparency is enabled, with and without the alpha hack enabled.
Yeah. I have this problem since some update from OGRE SVN. I can't really say which revision this was.
All I do now is waiting for the next Hikari version, as it will use Akarui and thus another technology.
michaelg1987
Halfling
Posts: 71
Joined: Sat Mar 10, 2007 5:14 pm

Re: Hikari (v0.3)

Post by michaelg1987 »

wacom wrote:
michaelg1987 wrote:Not to double post this, but now I've got this issue with a gray box. Anyone else getting this? It seems to happen whenever transparency is enabled, with and without the alpha hack enabled.
Yeah. I have this problem since some update from OGRE SVN. I can't really say which revision this was.
All I do now is waiting for the next Hikari version, as it will use Akarui and thus another technology.
I tried the 1.6.3 OgreSDK as well. I guess I'll have to move back a version or two in order to get around this for the time being.
neoranga974
Kobold
Posts: 25
Joined: Tue Apr 28, 2009 3:17 pm

Re: Hikari (v0.3)

Post by neoranga974 »

Hi,

I am using the sample fresnel reflection/refraction demo into my application,

but the flash just desappear, and when i put

Code: Select all

Viewport *v = rttTex->addViewport( mCamera );
...
v->setOverlaysEnabled(true);


the flash control just appear into water but not where it is supposed to be !!!!!
ss1.jpg
ss1.jpg (172.22 KiB) Viewed 7581 times


And here is what the hikari flash GUI looks like when i comment the offending lines :p :
ss2.jpg
ss2.jpg (203.5 KiB) Viewed 7581 times

here are the lines that make the app bug as i use it :

Code: Select all

theCam = mCamera;
		theCam->setDirection (0,0,-1);
		
		TexturePtr mTexture = TextureManager::getSingleton().createManual( "Refraction", 
			ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, TEX_TYPE_2D, 
			512, 512, 0, PF_R8G8B8, TU_RENDERTARGET );
        //RenderTexture* rttTex = mRoot->getRenderSystem()->createRenderTexture( "Refraction", 512, 512 );
        RenderTarget *rttTex = mTexture->getBuffer()->getRenderTarget();
		
        {
            Viewport *v = rttTex->addViewport( mCamera );
            MaterialPtr mat = MaterialManager::getSingleton().getByName("Examples/FresnelReflectionRefraction");
            mat->getTechnique(0)->getPass(0)->getTextureUnitState(2)->setTextureName("Refraction");
            v->setOverlaysEnabled(true);
            rttTex->addListener(&mRefractionListener);
        }
        
		
		TexturePtr mTexture = TextureManager::getSingleton().createManual( "Reflection", 
			ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, TEX_TYPE_2D, 
			512, 512, 0, PF_R8G8B8, TU_RENDERTARGET );
        //rttTex = mRoot->getRenderSystem()->createRenderTexture( "Reflection", 512, 512 );
        RenderTexture* rttTex = mTexture->getBuffer()->getRenderTarget();
        {
            Viewport *v = rttTex->addViewport( mCamera );
            MaterialPtr mat = MaterialManager::getSingleton().getByName("Examples/FresnelReflectionRefraction");
            mat->getTechnique(0)->getPass(0)->getTextureUnitState(1)->setTextureName("Reflection");
            v->setOverlaysEnabled(false);
            rttTex->addListener(&mReflectionListener);
        }
just for info, i copy/pasted the demo sample code and it worked !! (but killed my flash controls :p)
michaelg1987
Halfling
Posts: 71
Joined: Sat Mar 10, 2007 5:14 pm

Re: Hikari (v0.3)

Post by michaelg1987 »

I installed the Ogre 1.6.1 SDK and transparency works fine. I'll just deal with that for now.
User avatar
Faham
Gnoblar
Posts: 9
Joined: Fri Sep 26, 2008 10:57 am
Location: Iran
Contact:

Re: Hikari (v0.3)

Post by Faham »

Hi,
I've same problem "wacom" and "michaelg1987" have, whenever I enable transparency through setTransparent(true) or setTransparent(true, true) the whole swf become gray..., isn't there any solution for this except reverting to Ogre 1.6.1!!!
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

Re: Hikari (v0.3)

Post by sinbad »

My guess is that Hikari is using a render queue which is being included in the RTT render, but which a bug pre-1.6.2 caused to be excluded (so it was relying on incorrect behaviour). Try changing the render queue that it uses to RENDER_QUEUE_OVERLAY or similar.
User avatar
Faham
Gnoblar
Posts: 9
Joined: Fri Sep 26, 2008 10:57 am
Location: Iran
Contact:

Re: Hikari (v0.3)

Post by Faham »

Yes it seems the problem is with overlays, there is no problem when I use FlashMaterials and assign the material to an Entity, the problem only is in FlashOverlays, although there Hikari use Ogre::Overlay inside itself to create a FlashOverlay, so render queue of them are RENDER_QUEUE_OVERLAY by default, but sure there is something with overlays.
Last edited by Faham on Tue Aug 18, 2009 11:02 am, edited 1 time in total.
marc_
Halfling
Posts: 48
Joined: Wed May 21, 2008 7:03 pm
Location: México, CVA

interactivity with a flashcontrol Material

Post by marc_ »

Hey i have been playing a lil bit with hikari, and i have met a lil prob here, i created my flash control as a flashControlMaterial, and used it in a mesh (i can see the flash movie as a texture), but i can't interact with it, is there a way i could interact with it as i do when is created as an overlay?......

i have tried this..

Code: Select all

FlashControl* myControl = hikariMgr->createFlashMaterial("myControl", 350, 400);
myControl->load("flashMovie.swf");
myEntity->setMaterialName(myControl->getMaterialName());
and in the mouse mouse moved event i use this

Code: Select all

myControl ->injectMouseMove(arg.state.X.abs, arg.state.Y.abs);
and in the mouse pressed i have this code:

Code: Select all

myControl ->injectMouseDown(e.state.X.abs,e.state.Y.abs);
so i don't have any response in the movie.. .. what i'm doing wrong?..
thank you guys.. hope someone sould help me.!! :(
kallaspriit
Gnoblar
Posts: 23
Joined: Thu May 31, 2007 6:13 pm

Re: Hikari (v0.3)

Post by kallaspriit »

The gray-box problem still persists with Ogre compiled from the latest SVN, even in Hikari v0.4. The problem has something to do with calling Hikari::FlashControl::createMaterial() for the second time when setting transparency to either transparent or just to opaque. When I made the default setting to be transparent, it works.. Any ideas why is this happening?
Post Reply