Question

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.

Was it helpful?

Solution

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

Using old wrl format it worked as expected.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top