Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

barramundiFish normals #29

Closed
blitz-research opened this issue Feb 13, 2017 · 11 comments
Closed

barramundiFish normals #29

blitz-research opened this issue Feb 13, 2017 · 11 comments

Comments

@blitz-research
Copy link

Hi,

I'm trying to find a sample with some normal mapping.

BarramundiFish has a normal map in it's 'images' chunk, but it doesn't seem to be referenced by anything.

Is there another model I can try?

Bye!
Mark

@pjcozzi
Copy link
Member

pjcozzi commented Feb 14, 2017

@blitz-research I'm not aware of any (but we would welcome a pull request when you find one!), but I suspect there are some as part of the PBR work, KhronosGroup/glTF#643

@sbtron @cedricpinson do you have a glTF model with normal mapping?

@sbtron
Copy link
Contributor

sbtron commented Feb 14, 2017

@blitz-research here are some sample models with the glTF 2.0 that use normal maps - https://github.com/sbtron/BabylonJS-glTFLoader/tree/master/Models/BarramundiFish/2.0
https://github.com/sbtron/BabylonJS-glTFLoader/tree/master/Models/Telephone/2.0

Still working on testing these out. The same models are also available in the 1.0 format with the PBR extension and can be seen here - https://sbtron.github.io/BabylonJS-glTFLoader/

@cedricpinson
Copy link

cedricpinson commented Feb 14, 2017 via email

@blitz-research
Copy link
Author

I suspect there are some as part of the PBR work

This looks cool! Unfortunately, there doesn't seem to be a normalTexture in there either...?

here are some sample models with the glTF 2.0 that use normal maps

Nice models! The telephone is esp. cool, is it PBR?

But what is glTF 2.0 all about? I can't find any references to it here...

https://github.com/KhronosGroup/glTF

...the 'specification' dir only has 1.0 in it.

@blitz-research
Copy link
Author

Ok, just found this:

KhronosGroup/glTF#817

So glTF2.0 is glTF1.0 + PBR material system?

Still can't find any references to normalTexture or anything here...

https://github.com/tsturm/glTF/tree/master/extensions/Vendor/FRAUNHOFER_materials_pbr

...but I'm about to hack into the 2.0 models linked to above!

@sbtron
Copy link
Contributor

sbtron commented Feb 14, 2017

Still wip. PR is here - KhronosGroup/glTF#830

@blitz-research
Copy link
Author

Quick question: The 2.0 barramundi fish model appears to store root nodes in arrays, not objects - is this legal?

I'm using the gltf 'cheatsheet' as my main docs, and it states scenes, nodes etc are 'given as dictionaries'. Not sure of the exact definiton of dictionary in JSON - does it include both objects and arrays?

Anyway, think I might wait until 2.0 (and the cheatsheet!) before attempting to extract normals from a gltf file. Think I'll just hack a 'normalTexture' into 1.0 barramundiFish for now.

@sbtron
Copy link
Contributor

sbtron commented Feb 14, 2017

Yes arrays is a change in 2.0 - KhronosGroup/glTF#831
See this discussion on the normal maps - KhronosGroup/glTF#699
They are now being included as additional textures in the 2.0 spec.
For 1.0 they could be added as part of the pbr extension.
This example - https://github.com/sbtron/BabylonJS-glTFLoader/tree/master/Models/BarramundiFish/PBR-MetalRoughness
shows how it was done in 1.0 + PBR extension. 2.0 is essentially taking the same texture data just rearranging the json so its becomes part of the core.
Sorry lots of flux, we are days away from getting 2.0 done so that its easier to read and all in one place.

@blitz-research
Copy link
Author

Sorry lots of flux, we are days away from getting 2.0 done so that its easier to read and all in one place.

No problem - thanks heaps for the help and I'm really looking forward to glTF2.0!

@lexaknyazev
Copy link
Member

Closed, since normal maps were implemented in schema and samples.

@emackey
Copy link
Member

emackey commented May 24, 2017

@blitz-research We now have a sample model that directly compares geometric features to normal-mapped features.

https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/NormalTangentTest

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants