Open elmkni opened 1 year ago
Thanks for the report! I tested with latest view3dscene (9th January was long time ago :) ).
Note: To make emissiveTexture
visible in case of PhysicalMaterial
or Material
, you need to set emissiveColor
to something non-zero (like 1 1 1
or 0.5 0.5 0.5
). The emissiveTexture
colors are multiplied by emissiveColor
, and emissiveColor
is by default just black for PhysicalMaterial
or Material
.
That said, even after adding non-zero emissiveColor
... we indeed have a bug.
I confirm there's something weird in how 3D textures behave (PixelTexture3D
or even just ImageTexture3D
) when placed in emissiveTexture
of PhysicalMaterial
or Material
. They work fine in emissiveTexture
of UnlitMaterial
.
I'm pasting here my testcase (using random3d.dds
from https://github.com/castle-engine/demo-models .
#X3D V4.0 utf8
PROFILE Full
Shape {
appearance Appearance {
material Material {
diffuseColor 0 0 0
specularColor 0 0 0
emissiveColor 0.5 0.5 0.5
emissiveTextureMapping "3D"
emissiveTexture ImageTexture3D {
#url "/home/michalis/sources/castle-engine/demo-models/textures/marblebrick3d.dds"
url "/home/michalis/sources/castle-engine/demo-models/textures/random3d.dds"
textureProperties TextureProperties {
minificationFilter "NEAREST_PIXEL"
magnificationFilter "NEAREST_PIXEL"
boundaryModeR "CLAMP"
boundaryModeS "CLAMP"
boundaryModeT "CLAMP"
}
}
}
}
geometry Box {
texCoord TextureCoordinateGenerator {
mode "BOUNDS3D"
mapping "3D"
}
}
}
Note: I also experimented above with explicitly requesting 3D texture mapping, by
texCoord TextureCoordinateGenerator {
mode "BOUNDS3D"
mapping "3D"
}
though it should not be necessary. Anyway, it doesn't help.
Give me some time, I'll see can I solve this :)
Hi Michalis,
it's again me, Elmar!
I've tested the latest view3dscene-4.3.0-win64-x86_64 from 09-Jan-2023 17:27.
PhysicalMaterial works with 2D PixelTexture but not with PixelTexture3D ...
In the following example the upper-left-front should be emissive orange, but it isn't
Please help!
Regards,
Elmar
view3dscene_issue_52.zip