File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ function applyMaterialInfo( info, material ) {
126126 // defaults
127127 material . color . set ( 0xffffff ) ;
128128 material . transmission = 0.0 ;
129- material . attenuationDistance = Infinity ;
129+ material . attenuationDistance = 1 ;
130130 material . attenuationColor . set ( 0xffffff ) ;
131131 material . specularColor . set ( 0xffffff ) ;
132132 material . metalness = 0.0 ;
@@ -159,9 +159,15 @@ function applyMaterialInfo( info, material ) {
159159
160160 }
161161
162- // Blender uses 1 / density when exporting volume transmission which doesn't look
163- // exactly right. But because the scene is 1000x in size we multiply by 1000 here.
164- material . attenuationDistance = 1000 / info . density ;
162+ if ( info . transmissionDepth ) {
163+
164+ material . attenuationDistance = info . transmissionDepth ;
165+
166+ } else {
167+
168+ material . attenuationDistance = 1 ;
169+
170+ }
165171
166172 } else {
167173
You can’t perform that action at this time.
0 commit comments