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.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.
Mapping of gLTF emissive texture
- spookyboo
- Silver Sponsor
- Posts: 1141
- Joined: Tue Jul 06, 2004 5:57 am
- x 151
- Contact:
Mapping of gLTF emissive texture
Does anybody know how a gLTF emissive texture maps to an Ogre Pbs material?
Gui generator tool https://github.com/spookyboo/Magus ==> Windows binaries https://github.com/spookyboo/Magus_bin
HLMS editor https://github.com/spookyboo/HLMSEditor ==> Windows setup https://github.com/spookyboo/HLMSEditor ... e?raw=true
HLMS editor https://github.com/spookyboo/HLMSEditor ==> Windows setup https://github.com/spookyboo/HLMSEditor ... e?raw=true
- devxkh
- Halfling
- Posts: 84
- Joined: Tue Aug 02, 2016 6:07 pm
- Location: Germany
- x 12
Re: Mapping of gLTF emissive texture
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.
such a basic feature like emissive texture/factor should be supported per default and should be easy to set. No hacks.
My little OGRE engine -> FrankE WIP
-
- OGRE Expert User
- Posts: 1148
- Joined: Sat Jul 06, 2013 10:59 pm
- Location: Chile
- x 168
Re: Mapping of gLTF emissive texture
I agree
+1
upvote
like
+1
upvote
like
- dark_sylinc
- OGRE Team Member
- Posts: 5296
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1278
- Contact:
Re: Mapping of gLTF emissive texture
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.
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.
-
- OGRE Expert User
- Posts: 1148
- Joined: Sat Jul 06, 2013 10:59 pm
- Location: Chile
- x 168
Re: Mapping of gLTF emissive texture
yes please , 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!!
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!!
- miki3d
- Halfling
- Posts: 56
- Joined: Wed Jul 18, 2012 1:30 pm
- Location: Italy
- x 4
-
- OGRE Expert User
- Posts: 1227
- Joined: Thu Dec 11, 2008 7:56 pm
- Location: Bristol, UK
- x 157
Re: Mapping of gLTF emissive texture
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.
- Zonder
- Ogre Magi
- Posts: 1168
- Joined: Mon Aug 04, 2008 7:51 pm
- Location: Manchester - England
- x 73
Re: Mapping of gLTF emissive texture
+1
There are 10 types of people in the world: Those who understand binary, and those who don't...
-
- Gremlin
- Posts: 152
- Joined: Sat Aug 12, 2017 4:16 pm
- x 4
Re: Mapping of gLTF emissive texture
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).xrgo wrote:yes please , I think Ogre's PBS default implementation should follow the industry "standards", so If everyone has it.. why don't we =D?!
- dark_sylinc
- OGRE Team Member
- Posts: 5296
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1278
- Contact:
Re: Mapping of gLTF emissive texture
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.
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.
-
- OGRE Expert User
- Posts: 1148
- Joined: Sat Jul 06, 2013 10:59 pm
- Location: Chile
- x 168
Re: Mapping of gLTF emissive texture
Yay! Thank you!
You could add an emissive sphere to the GI sample room, that would look awesome
It's fine for medark_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.
Thank you so much!
- spookyboo
- Silver Sponsor
- Posts: 1141
- Joined: Tue Jul 06, 2004 5:57 am
- x 151
- Contact:
Re: Mapping of gLTF emissive texture
Great!!
Gui generator tool https://github.com/spookyboo/Magus ==> Windows binaries https://github.com/spookyboo/Magus_bin
HLMS editor https://github.com/spookyboo/HLMSEditor ==> Windows setup https://github.com/spookyboo/HLMSEditor ... e?raw=true
HLMS editor https://github.com/spookyboo/HLMSEditor ==> Windows setup https://github.com/spookyboo/HLMSEditor ... e?raw=true
- dark_sylinc
- OGRE Team Member
- Posts: 5296
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1278
- Contact:
- devxkh
- Halfling
- Posts: 84
- Joined: Tue Aug 02, 2016 6:07 pm
- Location: Germany
- x 12
Re: Mapping of gLTF emissive texture
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"
My little OGRE engine -> FrankE WIP
- dark_sylinc
- OGRE Team Member
- Posts: 5296
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1278
- Contact:
Re: Mapping of gLTF emissive texture
Fixed. Sorry about that.
- devxkh
- Halfling
- Posts: 84
- Joined: Tue Aug 02, 2016 6:07 pm
- Location: Germany
- x 12
Re: Mapping of gLTF emissive texture
Thx! looks like emissive now!
Next nice addition would be the texture channel selection.
viewtopic.php?f=25&t=93570&p=539555#p539555
Next nice addition would be the texture channel selection.
viewtopic.php?f=25&t=93570&p=539555#p539555
My little OGRE engine -> FrankE WIP
-
- OGRE Expert User
- Posts: 1148
- Joined: Sat Jul 06, 2013 10:59 pm
- Location: Chile
- x 168
- spookyboo
- Silver Sponsor
- Posts: 1141
- Joined: Tue Jul 06, 2004 5:57 am
- x 151
- Contact:
Re: Mapping of gLTF emissive texture
Concerning Emissive: PbsAllSettings.json refers to the emissive 'value' as an integer, while setEmissive is a Vector3
Gui generator tool https://github.com/spookyboo/Magus ==> Windows binaries https://github.com/spookyboo/Magus_bin
HLMS editor https://github.com/spookyboo/HLMSEditor ==> Windows setup https://github.com/spookyboo/HLMSEditor ... e?raw=true
HLMS editor https://github.com/spookyboo/HLMSEditor ==> Windows setup https://github.com/spookyboo/HLMSEditor ... e?raw=true