Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FBXLoader: Removed envMapIntensity parameter #12361

Merged
merged 1 commit into from Oct 9, 2017

Conversation

looeee
Copy link
Collaborator

@looeee looeee commented Oct 9, 2017

I added support for the material.envMapIntensity in #12317, but it's causing a console warning when Phong materials are created so I've removed it for now.

I plan to add proper support for MeshStandardMaterial, wich will require refactoring of the parseParameters function. I'll add this parameter back then.

@looeee
Copy link
Collaborator Author

looeee commented Oct 9, 2017

By the, I'm aware that the current parameters.reflectivity will also cause a warning with Lambert or Standard materials.

However, while FBX does support material type 'lambert', I have not yet managed to find or create a model that actually uses this, while every non-raytraced material type exported from 3DS Max (Blinn, Phong, Oren-Nayer, Blinn_Phong, Multilayer etc. etc. ) has material type 'phong'.

So warnings for materials that don't have a .reflectivity parameter should be very rare for now, and worth it in exchange for simple support of environment maps for Phone materials, since this is almost exclusively the material currently created by the loader.

@mrdoob mrdoob merged commit 9e0800d into mrdoob:dev Oct 9, 2017
@mrdoob
Copy link
Owner

mrdoob commented Oct 9, 2017

Thanks!

@WestLangley
Copy link
Collaborator

I plan to add proper support for MeshStandardMaterial

I am not sure I agree with that. What model format is assumed by the FBX model parameters?

I would expect the only loader that should output MeshStandardMaterial at this point is glTF.

@looeee
Copy link
Collaborator Author

looeee commented Oct 10, 2017

@WestLangley I should have said "investigate whether we can add support for MeshStandardMaterial".

Which I have done - there are two materials types supported in the FBX format: FbxSurfaceLambert and FbxSurfacePhong.

In practice though, I have tested exporting every type of material available in 3DS Max and they all either export with type "phong" or "unknown".

So we should probably change the default material type in the loader from Standard to Phong.

Interestingly, it does look like it may be possible to export GLSL materials, although it would be quite a bit of work. I'll leave investigating that fully until I need it though...

@looeee looeee deleted the FBXLoader_revert_envmap branch October 10, 2017 03:16
@WestLangley
Copy link
Collaborator

So we should probably change the default material type in the loader from Standard to Phong.

Right.

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

Successfully merging this pull request may close these issues.

None yet

3 participants