I want to create a terrain layer using a repeated base texture using a non-repeated opacity map. (either in alpha or as separate texture)

<Appearance>
    <MultiTexture mode='"MODULATE" "MODULATE"'>
        <ImageTexture repeatS="true" repeatT="true" url='"textures/terrain_pavement.jpg"'/>
        <ImageTexture url='"textures/terrain_pavement_opacity.png"'/>

        <!--<PixelTexture image="2 2 2 
            0x0000 0xFFFF
            0xFFFF 0x0000"/>-->
    </MultiTexture>
    <MultiTextureTransform>
       <TextureTransform scale="12 4"/>
       <TextureTransform/>
    </MultiTextureTransform>
</Appearance>

Using a pixeltexture gives the correct result, but my opacity.png map is saved as 8bit grayscale too.

有帮助吗?

解决方案

It seems it is not well supported using X3D itself or most players.

Using old wrl format it worked as expected.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top