#Rendering flat plane with texture

10 messages · Page 1 of 1 (latest)

vital yoke
#

I am trying to render a flat plane on a texture that is facing toward the camera, i have transforms properly working and stuff, its only the fact that the texture is a little darker than its supposed to be?

pub fn add_grid(
    mut commands: Commands,
    asset_server: Res<AssetServer>,
    mut meshes: ResMut<Assets<Mesh>>,
    mut materials: ResMut<Assets<StandardMaterial>>,
) {
    let grid_texture= asset_server.load("default/grid.png");

    commands.spawn((
        Grid,
        Mesh3d(meshes.add(Plane3d::default().mesh().size(3., 3.))),
        MeshMaterial3d(materials.add(StandardMaterial {
            base_color_texture: Some(grid_texture.clone()),
            ..Default::default()
        })),
        Transform::from_rotation(Quat::from_rotation_x(f32::to_radians(90.0))),
    ));
}

left is what its supposed to be, right is what bevy displays

#

alpha clipping also doesnt work

copper belfry
#

Do you have lights in the scene? StandardMaterial is lit by default, so it could be that there's no light to see it (and the bit you do see is just ambient light perhaps)

vital yoke
hearty mural
#

I can’t remember how tho

vital yoke
#

materiual

#

material

vital yoke
# hearty mural Yes

that was in fact not correct, its a flag in the uniforms, and the mesh doesnt contain a field for any uniform specification :p