ogreSwf/vektrix

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!
Post Reply
User avatar
rodan_nr
Kobold
Posts: 37
Joined: Thu May 18, 2006 2:59 am
Location: Ccs, Venezuela
Contact:

Post by rodan_nr »

Don't get angry ;). Seems good.
Rodan - Novus MediaTech
http://www.novus-mediatech.com/
JoshStribling
Gnoblar
Posts: 20
Joined: Sun Sep 17, 2006 11:27 am
Location: CO, Usa
Contact:

Re: New?

Post by JoshStribling »

stoneCold wrote:...
currently changing the rendering system to work with shaders, but only hlsl works (as I know it best, if you want to help with cg/glsl contact me),
...

...
As said I'd need a working CG/GLSL version of my HLSL shader, which does render the objects to view space.
...
I believe that HLSL and CG are the same language...
Microsoft and nVidia worked on the project together, and then released it under two names: HLSL is packaged with DirectX, and CG is available from the nVidia developer web site.

At least that is what it said in the CG Tutorial book from nVidia...
Basically, the main difference is the file extensions...

Here is an excerpt from an nVidia Doc:
NVIDIA is well known in the industry for developing the Cg language for programmable
real-time graphics. NVIDIA and Microsoft initially collaborated to provide a common
shading language syntax and semantics. The fruits of this collaboration became
NVIDIA’s Cg and Microsoft’s High-Level Shading Language (HLSL) implementations.
Located here:
http://download.nvidia.com/developer/GL ... crosoft%22


I don't have much experience with GLSL though... I believe it is different than HLSL/CG, and has extended features that are only available to OpenGL.

Hope this helps in some way...
-Josh
User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
x 3
Contact:

Post by Praetor »

Same language, different everything else. Cg is cross platform, but HLSL has a much better compiler. The Cg toolkit does not compile Cg code very well, and it is behind the times compared to HLSL. I believe they still dont support Sm3.0 stuff.
wooohoh
Gnoblar
Posts: 20
Joined: Wed Sep 20, 2006 9:00 am

Post by wooohoh »

this IS GREAT! i've never thought this could be possible..
User avatar
mj
Kobold
Posts: 32
Joined: Mon Mar 01, 2004 6:11 pm
Location: Moscow, Russia
Contact:

Post by mj »

Hi! I was very interested in possibility of using ogreSWF in my project. My platform is Linux so did anybody try to use/build ogreSWF there? Is there any troubles I should be aware of? Any advice would be welcome! :)
--mj
User avatar
mj
Kobold
Posts: 32
Joined: Mon Mar 01, 2004 6:11 pm
Location: Moscow, Russia
Contact:

Post by mj »

Hmm... I guess I'll have to wait for official cvs release in ogreaddons dir. As I understand the source code via link provided by Assaf Raman is very outdated, right?
--mj
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

Praetor wrote:Same language, different everything else. Cg is cross platform, but HLSL has a much better compiler. The Cg toolkit does not compile Cg code very well, and it is behind the times compared to HLSL. I believe they still dont support Sm3.0 stuff.
Do you have any source for this statement? (besides MS itself)
As I've heard the Cg compiler is actually known to be very good, especially at compiling to the NVidia specific profiles like fp/vp30/40. (vp/fp40 is equivalent to SM3.0)
Indie
Kobold
Posts: 36
Joined: Mon Sep 11, 2006 11:46 am

Post by Indie »

Hmm, this is nice stuff..
Here are some things to work on if not already done:
1) scale - ability .. (for using in GUIs)
2) eh, forgot while writing :)))

If you make this work right+fast the CEGUI will crash becouse it's much harder to make menus in it :)
User avatar
mj
Kobold
Posts: 32
Joined: Mon Mar 01, 2004 6:11 pm
Location: Moscow, Russia
Contact:

Post by mj »

stoneCold, any news about your project?
--mj
User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
x 3
Contact:

Post by Praetor »

:wumpus: wrote: Do you have any source for this statement? (besides MS itself)
As I've heard the Cg compiler is actually known to be very good, especially at compiling to the NVidia specific profiles like fp/vp30/40. (vp/fp40 is equivalent to SM3.0)
It mainly comes from the fact that last time I checked out the Cg toolkit (a couple months ago) they still didn't have Sm3.0 in there. Also, sometimes shaders that are compiled with HLSL compiler fit into the lower profiles but can't with Cg. For instance, sometimes something that compiles at 1.4 with HLSL has to compile in 2.0 for Cg. I know that their compiler was a major point they have been working on. Things could have turned around now, and I hope they have. I would prefer a cross-platform solution.
necropower
Gnoblar
Posts: 5
Joined: Thu Oct 12, 2006 2:40 am

Post by necropower »

how and where can i download the last .dll or codes for the ogreswf and some simple code examples of usage of it?
i really liked the idea , keep the good work :D

[[]]s Necro
User avatar
stoneCold
OGRE Expert User
OGRE Expert User
Posts: 867
Joined: Fri Oct 01, 2004 9:13 pm
Location: Carinthia, Austria
x 1

Post by stoneCold »

[UPDATE] ogreSwf BETA 0.1

Hi folks, after quite a long time I'm back again.
I have had some big changes in my all day life the last month which made it very hard to keep development of ogreSwf consistent. The whole story could fill up a forum page or two, but I won't bore you with details, so back to the topic :wink:

The last days I have had enough time to shorten my TODO list on ogreSwf and to finish the last feature I wanted to implement (rendering as 3D scene object, explained later ---> screenshot).

I called this current version ogreSwf BETA_0.1
(because "Beta" == all main features included + some additions and tweaks needed)

I will add some missing/useful functions to the API, when I have time to do so. (get***, set***, etc.)

the three main rendering types are:
1) rendering to Ogre::Texture: the resulting texture can be used on any 3D surface you can apply materials to.
Though it is a texture, there are no limitations of interactivity (mouse support, read/write variables, etc.)
2) rendering to screen: use Swf files as GUIs and HUDs
3) rendering as 3D scene object: this is a very powerful feature which I implemented the last days. It's very similar to the way Doom3 creates it's ingame control panels. It doesn't use a RenderTexture to display the Swf, but it directly displays the swf as scene object. This object can be attached to Nodes, can be rotated/scaled/translated and the main advantage to the SwfTexture (see 1) is, that you get a MUCH better performance, because the RenderTexture takes most of the updating time. Additionally the SwfPanel displays a sharp result, where a SwfTexture can be unsharp if the RenderTexture's resolution is too low. SwfTextures are mainly needed if you want to display a Swf on a very curved surface, but if you just need flat swf panels you should use the scene object attempt (SwfPanel).

Enough of long explanations...here's a screenshot of the current demo, showing the three rendering features

Image

here's a short video of the demo: Demo_ogreSwf.avi (2.9 MB)

and finally the long awaited full source + demo: ogreSwf_BETA_0.1.rar (1.31 MB)

ideas, proposals, wanted features, ... are welcome
greetings
Last edited by stoneCold on Sat Nov 25, 2006 1:25 am, edited 2 times in total.
my tweets | www.fuse-software.com | home of vektrix (Flash GUI for Ogre3D) and caspin (ActionScript 3 Virtual Machine Wrapper)
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

Wow, this is great! :D
Download Page wrote:Due to current high demand, the page you are looking for cannot be delivered right now.
Is this different from what I just pulled from the CVS? :)

I really like what you've done with option 3! :D
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
stoneCold
OGRE Expert User
OGRE Expert User
Posts: 867
Joined: Fri Oct 01, 2004 9:13 pm
Location: Carinthia, Austria
x 1

Post by stoneCold »

jacmoe wrote:Wow, this is great! :D
Download Page wrote:Due to current high demand, the page you are looking for cannot be delivered right now.
Is this different from what I just pulled from the CVS? :)

I really like what you've done with option 3! :D
fixed the link :) (I have to get my own website up again)

option 3 is also my favourite, fast and sharp shaped :wink:

I'm glad that the CVS works now, yesterday I uploaded my current version, but when doing a checkout anonymous, it didn't work. Today it does.
So ... everyone who likes CVS, go get ogreSwf from "ogreaddons/ogreswf" :wink:
my tweets | www.fuse-software.com | home of vektrix (Flash GUI for Ogre3D) and caspin (ActionScript 3 Virtual Machine Wrapper)
User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2703
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 51

Post by syedhs »

stonecold,

Great.. have been waiting for this. Btw is this for Eihort or Dagon? I compiled against 1.2.3 and has one compilation error -> ManualObject doesn't have _setBound. I guess the fix is simple but just to let you know.
Vectrex
Ogre Magi
Posts: 1266
Joined: Tue Aug 12, 2003 1:53 am
Location: Melbourne, Australia
x 1
Contact:

Post by Vectrex »

yeah I get the same error using 1.2.3
JeDi
Gnome
Posts: 351
Joined: Thu Oct 21, 2004 1:34 pm
Location: Diepenbeek, Belgium
x 3
Contact:

Post by JeDi »

Great news! I've been waiting for this too (especially the HUD part, but the scene object rendering is very cool too!).

I'll try it as soon as I have the chance. Great work!

Greetz,
JeDi
User avatar
stoneCold
OGRE Expert User
OGRE Expert User
Posts: 867
Joined: Fri Oct 01, 2004 9:13 pm
Location: Carinthia, Austria
x 1

Post by stoneCold »

@ syedhs: this release is for dagon (I'm currently using 1.2.3 too), but should be compatible with eihort (not tried it yet).

@syedhs / Vectrex: yeah, yesterday (when I already laid in bed :D ) I remembered that I forgot to mention this. Ogre has no _setBounds(); function for ManualObject by default. Therefore I added it myself...

Code: Select all

//------------------
//OgreManualObject.h
//------------------

public:
...
void _setBounds(const AxisAlignedBox& bounds, bool pad = true);
...

Code: Select all

//--------------------
//OgreManualObject.cpp
//--------------------

namespace Ogre
{
...
    void ManualObject::_setBounds(const AxisAlignedBox& bounds, bool pad)
    {
        mAABB = bounds;
        Vector3 max = mAABB.getMaximum();
        Vector3 min = mAABB.getMinimum();

        if (pad)
        {
            // Pad out the AABB a little, helps with most bounds tests
            Vector3 scaler = (max - min) * MeshManager::getSingleton().getBoundsPaddingFactor();
            mAABB.setExtents(min  - scaler, max + scaler);
        }
        else
        {
            mAABB.setExtents(min, max);
        }

    }
...
};
add the code to the files, build Ogre and everything should work well.
I hope there's a good chance of integrating this function permanently to Ogre, because it's quite trivial and in some cases essential to have this function for ManualObjects. I know I could have done ManualObject::convertToMesh, but you might understand that doing that once a frame + deleting the mesh after each frame would be a BIT unperformant :wink: sorry for my obliviousness.
my tweets | www.fuse-software.com | home of vektrix (Flash GUI for Ogre3D) and caspin (ActionScript 3 Virtual Machine Wrapper)
User avatar
Troglodit
Gremlin
Posts: 160
Joined: Tue May 25, 2004 2:18 pm
Location: Ukraine/Ternopil
Contact:

Post by Troglodit »

Great work :D !

Perhaps I put all 512x512 textures of game in separate swf file (one texture per frame).

Can I somehow render those textures to independent textures, put it to meshes and then completely disable processing of those swf file for increase fps ?

If Yes then OgreSWF can be also very useful for contain vector textures with gradients (small size! ) and png transparent textures (png with alpha channel in flash can be compressed with jpeg compression)

Also how about action script function LoadMovie ? Can swf inside ogre load images and other movies ?

Also how about sound in swf ? Is it possible to play it ?
Arsen Gnatkivsky
game development, programming, modeling.
Magic of Stonehenge demo
http://www.ogre3d.ru - Russian OGRE site. Welcome !
User avatar
syedhs
Silver Sponsor
Silver Sponsor
Posts: 2703
Joined: Mon Aug 29, 2005 3:24 pm
Location: Kuala Lumpur, Malaysia
x 51

Post by syedhs »

Stonecold wrote: I hope there's a good chance of integrating this function permanently to Ogre, because it's quite trivial and in some cases essential to have this function for ManualObjects. I know I could have done ManualObject::convertToMesh, but you might understand that doing that once a frame + deleting the mesh after each frame would be a BIT unperformant
I think you have a good reason there, well the final decision is Sinbad's.
big_o
Goblin
Posts: 279
Joined: Sun Feb 19, 2006 1:08 am

Post by big_o »

Looks really cool, I just wish I could figure out how all this flash stuff works. :?
User avatar
stoneCold
OGRE Expert User
OGRE Expert User
Posts: 867
Joined: Fri Oct 01, 2004 9:13 pm
Location: Carinthia, Austria
x 1

Post by stoneCold »

Troglodit wrote:Perhaps I put all 512x512 textures of game in separate swf file (one texture per frame).
I don't really understand / what advantage has it...describe

Troglodit wrote:Can I somehow render those textures to independent textures, put it to meshes and then completely disable processing of those swf file for increase fps ?
You can render as many independent SwfTextures as you want (at least as many as your hardware can handle). Yes it is possible to completely disable updating

Code: Select all

SwfTexture::setUpdateProperties(false, false);
Troglodit wrote:If Yes then OgreSWF can be also very useful for contain vector textures with gradients (small size! ) and png transparent textures (png with alpha channel in flash can be compressed with jpeg compression)
If I understand you right you want to use flash in ogre just to compress your textures?!
I don't really see the advantage and I don't think this will be performant in any way, because each SwfTexture needs an RTT call (as said above) which is very expensive. ogreSwf main task should be to bring interactive SWF movies to ogre, so using it with 1 frame SWFs is somehow overkill, except you need it for example to display the players name on his back like done in F.E.A.R.s multiplayer.

Troglodit wrote:Also how about action script function LoadMovie ? Can swf inside ogre load images and other movies ?
No (not atm), but I don't see the need here too, just load up a new SwfTexture instance in code if you need one, and you should be fine
Troglodit wrote:Also how about sound in swf ? Is it possible to play it ?
There IS some sound code in gameswf, but I did not yet integrate it, because of the same reason mentioned above. It would enforce you to use only 2D sound for example. It's more flexible to control your sound engine of choice with a swf file, than beeing fixed to 2D sound or maybe even beeing fixed to a sound engine of my choice :wink:
my tweets | www.fuse-software.com | home of vektrix (Flash GUI for Ogre3D) and caspin (ActionScript 3 Virtual Machine Wrapper)
User avatar
Troglodit
Gremlin
Posts: 160
Joined: Tue May 25, 2004 2:18 pm
Location: Ukraine/Ternopil
Contact:

Post by Troglodit »

If I understand you right you want to use flash in ogre just to compress your textures?!
Of course not only for compress :D I know why you make ogreSwf (gui, dynamic textures) it is very useful.

Yust you can use flash fo generate vector procedural textures like wood, noise etc.
I don't really see the advantage and I don't think this will be performant in any way, because each SwfTexture needs an RTT call (as said above) which is very expensive. ogreSwf main task should be to bring interactive SWF movies to ogre, so using it with 1 frame SWFs is somehow overkill, except you need it for example to display the players name on his back
That is a question: can I render/convert/whatever 1 frame from swf to absolutly simple texture in memory, which will not call RTT or anything else? And then just unload swf?
No (not atm), but I don't see the need here too, just load up a new SwfTexture instance in code if you need one, and you should be fine
think about ability for game to download and show textures and data directly from internet without any third party libs. It can be very useful for MMORPGs for example. You will can show news in game.
Arsen Gnatkivsky
game development, programming, modeling.
Magic of Stonehenge demo
http://www.ogre3d.ru - Russian OGRE site. Welcome !
User avatar
stoneCold
OGRE Expert User
OGRE Expert User
Posts: 867
Joined: Fri Oct 01, 2004 9:13 pm
Location: Carinthia, Austria
x 1

Post by stoneCold »

Troglodit wrote:Yust you can use flash fo generate vector procedural textures like wood, noise etc.
Tell me how it's done in flash then I can test it (never heard of it yet).
Troglodit wrote:That is a question: can I render/ronvert/whatever 1 frame from swf to absolutly simple texture in memory, which will not call RTT or anything else? And then just unload swf?
Will integrate this, nice idea :wink:
Troglodit wrote:think about ability for game to download and show textures and data directly from internet without any third party libs. It can be very useful for MMORPGs for example. You will can show news in game.
This task is not really up to ogreSwf (not even to a third party lib), but up to Ogre itself. ogreSwf uses Ogre's resource loading system, therefore it's possible to store SWFs in zip archives or directly on the hardisk out of the box. If you want more options to load data from, just extend Ogre's resource system and you will be fine. So every kind of resource is possible. HTTP, FTP, ... , even vinyls if you just manage to find/code an ogre archive factory for it :wink:
my tweets | www.fuse-software.com | home of vektrix (Flash GUI for Ogre3D) and caspin (ActionScript 3 Virtual Machine Wrapper)
User avatar
Troglodit
Gremlin
Posts: 160
Joined: Tue May 25, 2004 2:18 pm
Location: Ukraine/Ternopil
Contact:

Post by Troglodit »

Will integrate this, nice idea Wink
Perfect ! :D
Tell me how it's done in flash then I can test it (never heard of it yet).
of course ! Look:
here is generic noise texture 256x256(not tiled yet):
Image
swf-http://www.ogre3d.org.ru/trogl/noise.swf
fla-http://www.ogre3d.org.ru/trogl/noise.fla
Every time you run movie noise will be different.

And here tiled vector wood texture:
Image
swf-http://www.ogre3d.org.ru/trogl/wood.swf
fla-http://www.ogre3d.org.ru/trogl/wood.fla

now about size (jpegs are very compressed !).
noice.jpg - 14kB , noise.swf - 670 bytes !
wood.jpg - 23kB , wood.swf - 798 bytes !

What you think ?
Arsen Gnatkivsky
game development, programming, modeling.
Magic of Stonehenge demo
http://www.ogre3d.ru - Russian OGRE site. Welcome !
Post Reply