-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
sea3d new examples and revision #6896
Conversation
@@ -25,12 +25,12 @@ THREE.ShaderLib.replaceCode = function(src, target, replace) { | |||
THREE.ShaderLib['phong'].fragmentShader_StandardMaterial = | |||
THREE.ShaderLib.replaceCode( THREE.ShaderLib['phong'].fragmentShader, [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not realize this was in your previous version, too.
Why do you feel it is necessary to modify the Phong
shader code in the sea3d loader?
I notice you set material.emissive.set( 0.2, 0.2, 0.2 )
(or something similar) on almost all your models.
You appear to want emissive
to be modulated by both material.color
and material.map
.
In the Phong
shader, material.emissive
is simply additive to the reflected color.
I like Consider using |
Hi @WestLangley 'OrbitControls' looks much better. Thanks : )
|
I almost forgot... It is possible load without the hack.
Creating manually a material with emissive to ambient color.
|
@@ -72,7 +72,7 @@ | |||
|
|||
autoPlay : true, // Auto play animations | |||
container : scene, // Container to add models | |||
parser : THREE.SEA3D.DEFAULT, // THREE.SEA3D.BUFFER to THREE.GeometryBuffer | |||
parser : THREE.SEA3D.AUTO, // Auto choose THREE.BufferGeometry and THREE.Geometry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest not producing THREE.Geometry
at all (thus removing all the code for it). And let the user convert on their code if needed.
Yes, still working on that. I'm hoping to be able to spend some time tomorrow 😊 |
sea3d new examples and revision
Thanks! |
I see that you are adding Your hack to the |
You mean extending I guess it's okay for application code to clobber the |
At least in my tests in r71 mat.color took another result, like a * b
The value .2 can vary from material to material. I can not make a standard value for this at the time.
Also I do not think appropriate, I had talked about changing the way of how the fragment shader is built for easy extension without having create a custom shader for this, like a node material #5673 for the LayeredTexture that I want implement. Away3D make this architecture very well, I possibly do something like node material for the next updates of sea3d. video demo of sea3d LayeredTexture.
Yes has several extensions, all with a purpose. Sea3DSkinnedMesh seems like a good idea, just do not know if I could with THREE.Object3D for relative keyframe animation and Morph+Skin also be a problem with the interface. I will do everything possible to improve this, possibly I make a separate version for this extension. Cheers |
@sunag Are you hacking the shader code because you want |
I converted |
I think it should be working fine now. |
Thanks! Works great. |
Hi @mrdoob .
I have a few more examples, I hope you enjoy... morph seems that still is not working in r72dev?
Thks