Mapping of gLTF emissive texture

Design / architecture / roadmap discussions related to future of Ogre3D (version 2.0 and above)
Post Reply
User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1132
Joined: Tue Jul 06, 2004 5:57 am
Contact:

Mapping of gLTF emissive texture

Post by spookyboo » Tue Sep 12, 2017 6:05 pm

Does anybody know how a gLTF emissive texture maps to an Ogre Pbs material?
The emissive map controls the color and intensity of the light being emitted by the material. This texture contains RGB components in sRGB color space. If a fourth component (A) is present, it is ignored.
Not sure whether it is the same as PBSM_METALLIC. gLTF (without extensions) only supports metallic workflow. Maybe I have to 'apply' it offline to the baseColor (diffuse) texture or just ignore it for now.
0 x

User avatar
devxkh
Halfling
Posts: 81
Joined: Tue Aug 02, 2016 6:07 pm
Location: Germany

Re: Mapping of gLTF emissive texture

Post by devxkh » Wed Sep 13, 2017 5:40 pm

good to know i'm not the only one playing around with gltf! :)

such a basic feature like emissive texture/factor should be supported per default and should be easy to set. No hacks. :?
0 x
My little OGRE engine -> FrankE WIP

xrgo
OGRE Expert User
OGRE Expert User
Posts: 819
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile

Re: Mapping of gLTF emissive texture

Post by xrgo » Wed Sep 13, 2017 7:25 pm

I agree
+1
upvote
like
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3459
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
Contact:

Re: Mapping of gLTF emissive texture

Post by dark_sylinc » Wed Sep 13, 2017 7:37 pm

The default Hlms PBS implementation doesn't support emissive, as it isn't very "PBS".

Emission means it creates light rather than absorving, which is what Unlit does.

However if there's enough demand for this feature I suppose I could reconsider it.
0 x

xrgo
OGRE Expert User
OGRE Expert User
Posts: 819
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile

Re: Mapping of gLTF emissive texture

Post by xrgo » Wed Sep 13, 2017 9:06 pm

yes please :P, I think Ogre's PBS default implementation should follow the industry "standards", so If everyone has it.. why don't we =D?!
besides.. its a really important feature, I use it a lot for example in a truck cabin some tiny buttons/panels/lights should emit... I can't use unlit because I can't separate tiny polygons so I can assign another datablock (there is no tiny polygons..) all the information is in the texture

thanks!!
0 x

User avatar
miki3d
Halfling
Posts: 55
Joined: Wed Jul 18, 2012 1:30 pm
Location: Italy

Re: Mapping of gLTF emissive texture

Post by miki3d » Thu Sep 14, 2017 11:57 am

+1
:D
0 x
Image
Co-Founder and Design Director at VaeVictis
Current project Racecraft

al2950
OGRE Expert User
OGRE Expert User
Posts: 1038
Joined: Thu Dec 11, 2008 7:56 pm
Location: Bristol, UK

Re: Mapping of gLTF emissive texture

Post by al2950 » Thu Sep 14, 2017 2:05 pm

I have to admit I use a separate renderable for my emmisive bits, eg lights, and use an unlit texture. However it would make life easier for me if it was part of the PBS, and if its the direction/standard that industry follows we should probably follow suit.
0 x

User avatar
Zonder
Gargoyle
Posts: 1076
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England

Re: Mapping of gLTF emissive texture

Post by Zonder » Thu Sep 14, 2017 4:25 pm

+1
0 x
There are 10 types of people in the world: Those who understand binary, and those who don't...
My Blog - http://www.This post is suspected as SPAM! If you feel otherwise contact a moderator.

123iamking
Gremlin
Posts: 152
Joined: Sat Aug 12, 2017 4:16 pm

Re: Mapping of gLTF emissive texture

Post by 123iamking » Sun Sep 24, 2017 7:25 am

xrgo wrote:yes please :P, I think Ogre's PBS default implementation should follow the industry "standards", so If everyone has it.. why don't we =D?!
I think following the standard is always the best idea, remember Firefox vs MS IE (Internet Explorer), Firefox did follow the standard and MS IE didn't - soon both web developers & web user hate MS IE (dev think it hard to develop and user think it slow).
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3459
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
Contact:

Re: Mapping of gLTF emissive texture

Post by dark_sylinc » Sun Nov 19, 2017 5:30 pm

Yesterday I added emissive materials to Ogre 2.2.

The pro: emissive colour!
The con: Normal detail maps no longer have separate offset and scale settings. They assume they're the same setting as the diffuse detail map.

This shouldn't be much of a con to most people. The main reason for this is that it was rarely needed (since often detail diffuse and normal map offset/scale are tied together) and maintaining 256 bytes per material in GPU is important for some cards (it's just faster, I guess it must be a bank conflict thing).

We're adopting Microsoft strategy to have new features in newer versions in order to force people to upgrade. Nah, just kidding. I will be porting these changes back to 2.1 today.
I just hope I don't piss off too many people with the removal of detail normal map's individual offset and scaling.
3 x

xrgo
OGRE Expert User
OGRE Expert User
Posts: 819
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile

Re: Mapping of gLTF emissive texture

Post by xrgo » Sun Nov 19, 2017 6:38 pm

dark_sylinc wrote:
Sun Nov 19, 2017 5:30 pm
emissive colour!
Yay! Thank you!
You could add an emissive sphere to the GI sample room, that would look awesome
dark_sylinc wrote:
Sun Nov 19, 2017 5:30 pm
I just hope I don't piss off too many people with the removal of detail normal map's individual offset and scaling.
It's fine for me :)

Thank you so much!
0 x

User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1132
Joined: Tue Jul 06, 2004 5:57 am
Contact:

Re: Mapping of gLTF emissive texture

Post by spookyboo » Sun Nov 19, 2017 7:46 pm

Great!! :D :D
0 x

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3459
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
Contact:

Re: Mapping of gLTF emissive texture

Post by dark_sylinc » Sun Nov 19, 2017 8:18 pm

1 x

User avatar
devxkh
Halfling
Posts: 81
Joined: Tue Aug 02, 2016 6:07 pm
Location: Germany

Re: Mapping of gLTF emissive texture

Post by devxkh » Sun Nov 19, 2017 10:02 pm

cool, thx for adding it. I'm the only one, getting a shader compile error?
OgreLog:GLSL compile log: 537002112PixelShader_ps
0(764) : error C1008: undefined variable "emissiveIdx"
0 x
My little OGRE engine -> FrankE WIP

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 3459
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
Contact:

Re: Mapping of gLTF emissive texture

Post by dark_sylinc » Sun Nov 19, 2017 10:17 pm

devxkh wrote:
Sun Nov 19, 2017 10:02 pm
cool, thx for adding it. I'm the only one, getting a shader compile error?
OgreLog:GLSL compile log: 537002112PixelShader_ps
0(764) : error C1008: undefined variable "emissiveIdx"
Fixed. Sorry about that.
1 x

User avatar
devxkh
Halfling
Posts: 81
Joined: Tue Aug 02, 2016 6:07 pm
Location: Germany

Re: Mapping of gLTF emissive texture

Post by devxkh » Sun Nov 19, 2017 10:26 pm

Thx! looks like emissive now! :D

Image

Next nice addition would be the texture channel selection. 8)
viewtopic.php?f=25&t=93570&p=539555#p539555
0 x
My little OGRE engine -> FrankE WIP

xrgo
OGRE Expert User
OGRE Expert User
Posts: 819
Joined: Sat Jul 06, 2013 10:59 pm
Location: Chile

Re: Mapping of gLTF emissive texture

Post by xrgo » Mon Nov 20, 2017 1:53 am

devxkh wrote:
Sun Nov 19, 2017 10:26 pm
Thx! looks like emissive now! :D

Image
Looks amazing :)
devxkh wrote:
Sun Nov 19, 2017 10:26 pm
Next nice addition would be the texture channel selection.
viewtopic.php?f=25&t=93570&p=539555#p539555
Or at least the option to use the standard used by gltf
0 x

User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1132
Joined: Tue Jul 06, 2004 5:57 am
Contact:

Re: Mapping of gLTF emissive texture

Post by spookyboo » Mon Nov 20, 2017 10:40 pm

Concerning Emissive: PbsAllSettings.json refers to the emissive 'value' as an integer, while setEmissive is a Vector3
0 x

Post Reply