-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
Technique 'ambient' node case added #8610
Conversation
The ambient node case is missing from technique/shader parsing
We don't support |
But there is support for ambient occlusion textures. I was trying to pick up ambient and emissive textures in my models and set them to the material.aoMap property. Btw, I am missing a lightMap feature for the Basic/Constant material. I see it was removed with version r71. #ifdef USE_AOMAP Inspired by WestLangley comment: Maybe ColladaLoader.js can use the ambient texture for material.aoMap and emissive texture for material.lightMap? #ifdef USE_LIGHTMAP |
Lightmaps in three.js are now treated as a source of indirect (ambient) light, and are purely additive to total indirect light. Ambient occlusion maps in three.js occlude only indirect (ambient) light.
three.js materials no longer have an |
Have the ColladaLoader.js use emissive and ambient textures to set the aoMap property on BasicMaterials. In the future maybe add a lightMap property to BasicMaterial and have different blending modes for the shading.
@@ -3791,7 +3792,21 @@ THREE.ColladaLoader = function () { | |||
switch ( this.type ) { | |||
|
|||
case 'constant': | |||
|
|||
|
|||
if ( props.emissionMap !== undefined ) { |
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.
Do you have any example files that use these maps?
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'll make a quick example just a sec
I understand, It would be nice if there is an easy way to use the BasicMaterial to blend detailed diffuse textures and prebaked lighting textures. Maybe add a different kind of textureMap property for this technique? The BasicMaterial is ideal for when you want to be as less resource intensive as possible right? So support for this would be great :) Should I close the pull request? |
By the way, |
Now that |
The lightmap shader uses a different formula, but I will test to see if it has similar results. |
Old |
The ambient node case is missing from technique/shader parsing