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

3DS Loader - possibly use MeshPhysicalMaterial #27227

Closed
GitHubDragonFly opened this issue Nov 21, 2023 · 2 comments
Closed

3DS Loader - possibly use MeshPhysicalMaterial #27227

GitHubDragonFly opened this issue Nov 21, 2023 · 2 comments
Labels

Comments

@GitHubDragonFly
Copy link
Contributor

GitHubDragonFly commented Nov 21, 2023

Description

This is just a suggestion to possibly improve the appearance of 3DS models.

It has been implemented on my end and it seems to be looking a bit better. The specular and specularMap have been re-routed to specularColor and specularColorMap properties of the MeshPhysicalMaterial.

For those who would like to try it just use my online 3DS Viewer and enter the following URL in the viewer's URL textbox:

  • https://raw.githubusercontent.com/mrdoob/three.js/master/examples/models/3ds/portalgun/portalgun.3ds, https://raw.githubusercontent.com/mrdoob/three.js/master/examples/models/3ds/portalgun/textures/

Here is the picture of what it might look like:

3DS Viewer - MeshPhysicalMaterial

Solution

As suggested above, my 3DS Viewer is already using a customized TDSLoader.js file whose code is available here.

Alternatives

Alternative solution is not to change anything in the TDSLoader.js file and keep using it as it is.

Additional context

No response

@Mugen87
Copy link
Collaborator

Mugen87 commented Nov 22, 2023

I'm afraid you can't just assign specular and specularMap from MeshPhongMaterial to the specular properties of PBR materials since they are different things.

The specular map of MeshPhongMaterial isn't a real color map which is explained in #7290. The question is now how is the specular map of the 3DS format defined? Is it supposed to be a color map?

Besides, according to the docs specularColor is intended for non-metals only (https://threejs.org/docs/index.html#api/en/materials/MeshPhysicalMaterial.specularColor). So you have to setup your instance of MeshPhysicalMaterial with roughness to 1 and metalness to 0 which you don't do in your code.

@GitHubDragonFly
Copy link
Contributor Author

@Mugen87 thank you for taking the time to reply, I always learn something new.

I will just leave it as it is on my end since, to me, these 3DS models do look better with a bit of metalness and roughness.

Users have nothing to lose by trying their models in my viewer, it shouldn't be much different than if they were making similar changes to their models in the three.js editor.

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

No branches or pull requests

2 participants