CgFx support in OGRE

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
xte
Gnoblar
Posts: 4
Joined: Mon Feb 22, 2010 2:31 pm

Re: CgFx support in OGRE

Post by xte »

Assaf Raman wrote:What type of shaders do you need there? Bump map? Light map? What?
I'm far from being an expert in that area, and my task is to get as many features as possible.

We probably will not need very advanced stuff, but certainly bump maps, light maps, normal maps. I don't know that much about shader writing, so if I can avoid having to learn the ins and outs of cgfx and ogre shaders it would be quite nice.

I was a bit surprised at first to see that ogre couldn't load those files, and believe that this kind of tool would be very useful. (as well as a good material editor!).

Isn't your plugin designed for that kind of stuff? I'm feeling a bit powerless in front of that linker error at the moment. Sure it is simple, but I can't find a way to solve it.

Thanks
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: CgFx support in OGRE

Post by Assaf Raman »

I think you are better off using the RTSS then CgFx if your needs are only bump map and such.
The team doesn't plan full CgFx support or any work on this plug-in in the near future, and I don't know about anyone else.
When I started the plugin I had smiler ideas to yours regarding CgFx - but in the end when you need only simple\common shaders - you better use a complete shader system then a "text shader" that doesn't know to adapt to different light\fog\other scene parameters.
Watch out for my OGRE related tweets here.
xte
Gnoblar
Posts: 4
Joined: Mon Feb 22, 2010 2:31 pm

Re: CgFx support in OGRE

Post by xte »

I managed to load a cgfx file with your code, but didn't realize your loader was not meant to be used directly.

I'll still test a bit what can be achieved with this and learn about the RTSS stuff. Not sure if we'll need only those maps, the required features are not clear to say the least, but the main goal is to preview in max what will be rendered in ogre.

Thanks!
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: CgFx support in OGRE

Post by Assaf Raman »

I understand, I wish I had time to write up an better max exporter with a preview.
Watch out for my OGRE related tweets here.
User avatar
Pyritie
Gnome
Posts: 363
Joined: Wed Feb 25, 2009 6:15 pm
Location: UK
x 8
Contact:

Re: CgFx support in OGRE

Post by Pyritie »

Damn, this is exactly what I wanted .__.

/me just found the PERFECT shader he needs but it's in cgfx
I use Mogre, BulletSharp, LuaNetInterface, irrKlang, and Miyagi! | Ponykart (Showcase)
Image
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: CgFx support in OGRE

Post by Assaf Raman »

What does your shader do?
Watch out for my OGRE related tweets here.
User avatar
Pyritie
Gnome
Posts: 363
Joined: Wed Feb 25, 2009 6:15 pm
Location: UK
x 8
Contact:

Re: CgFx support in OGRE

Post by Pyritie »

I use Mogre, BulletSharp, LuaNetInterface, irrKlang, and Miyagi! | Ponykart (Showcase)
Image
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: CgFx support in OGRE

Post by Assaf Raman »

Interesting.
Watch out for my OGRE related tweets here.
User avatar
Pyritie
Gnome
Posts: 363
Joined: Wed Feb 25, 2009 6:15 pm
Location: UK
x 8
Contact:

Re: CgFx support in OGRE

Post by Pyritie »

I can probably convert it over by hand though... it doesn't look too complicated
I use Mogre, BulletSharp, LuaNetInterface, irrKlang, and Miyagi! | Ponykart (Showcase)
Image
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: CgFx support in OGRE

Post by Assaf Raman »

I am sure you can. :D
Watch out for my OGRE related tweets here.
User avatar
Pyritie
Gnome
Posts: 363
Joined: Wed Feb 25, 2009 6:15 pm
Location: UK
x 8
Contact:

Re: CgFx support in OGRE

Post by Pyritie »

Okay I converted it! :D

Where can I post it in case others want to use it?
I use Mogre, BulletSharp, LuaNetInterface, irrKlang, and Miyagi! | Ponykart (Showcase)
Image
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: CgFx support in OGRE

Post by jacmoe »

/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
Pyritie
Gnome
Posts: 363
Joined: Wed Feb 25, 2009 6:15 pm
Location: UK
x 8
Contact:

Re: CgFx support in OGRE

Post by Pyritie »

I use Mogre, BulletSharp, LuaNetInterface, irrKlang, and Miyagi! | Ponykart (Showcase)
Image
User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel
x 76

Re: CgFx support in OGRE

Post by Assaf Raman »

Nice work, thanks for the wiki page.
Image
Watch out for my OGRE related tweets here.
pkovacs86
Gnoblar
Posts: 24
Joined: Mon May 27, 2013 3:09 pm
x 4

Re: CgFx support in OGRE

Post by pkovacs86 »

Hi ALL,

I saw tons of threads related to cgFX or FX or ShaderFX MAX to OGRE.
Please help me because I want to use my shaders which are created in 3DSMAX ShaderFX...
Currently i would like to use my shaders in Ogre 1.8.1......

Could anyone give me some help about how to do that?
Actually i found that it is only possible by manually create *.material *.program *.cg,hlsl,glsl, etc
Is it true?Or are there any tool to save time?

Any help would be appreciated...

Regards,
Peter
NotCamelCase
Greenskin
Posts: 140
Joined: Sun Feb 03, 2013 6:32 pm
x 8

Re: CgFx support in OGRE

Post by NotCamelCase »

pkovacs86 wrote:Hi ALL,

I saw tons of threads related to cgFX or FX or ShaderFX MAX to OGRE.
Please help me because I want to use my shaders which are created in 3DSMAX ShaderFX...
Currently i would like to use my shaders in Ogre 1.8.1......

Could anyone give me some help about how to do that?
Actually i found that it is only possible by manually create *.material *.program *.cg,hlsl,glsl, etc
Is it true?Or are there any tool to save time?

Any help would be appreciated...

Regards,
Peter
RF
I don't know about Cgfx or ShaderFx but can just recommend, if not already, to check 3DSMAX exporters (previous versions as well), they let you create Materials/programs from within the modeller, maybe you'll figure out a way to convert them.
Check out my projects: https://github.com/NotCamelCase
Post Reply