Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird looking Torus with #3547

Closed
Sebbl0508 opened this issue Jan 4, 2022 · 2 comments
Closed

Weird looking Torus with #3547

Sebbl0508 opened this issue Jan 4, 2022 · 2 comments
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior

Comments

@Sebbl0508
Copy link

Sebbl0508 commented Jan 4, 2022

Bevy version

v0.5.0

Operating system & version

Windows 10

What you did

Spawn a Torus & a Light

What you expected to happen

The Torus to have a normal colour

What actually happened

The Half of the torus is a weird gray-ish colour

Additional information

This happens with other Meshes nearby, but also when the torus is spawned alone with the light

    commands.spawn_bundle(PbrBundle {
        mesh: meshes.add(Mesh::from(shape::Torus {
            radius: 2.0,
            ring_radius: 1.5,
            subdivisions_segments: 64,
            subdivisions_sides: 64,
        })),
        material: materials.add(Color::rgb_u8(0, 0, 255).into()),
        transform: Transform::from_xyz(-1.0, 2.5, -5.0),
        ..Default::default()
    });

    // Light
    commands.spawn_bundle(LightBundle {
        transform: Transform::from_xyz(0.0, 16.0, 1.0),
        light: Light {
            color: Color::WHITE,
            range: 40.0,
            intensity: 400.0,
            ..Default::default()
        },
        ..Default::default()
    });
@Sebbl0508 Sebbl0508 added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Jan 4, 2022
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen and removed S-Needs-Triage This issue needs to be labelled labels Jan 4, 2022
@alice-i-cecile
Copy link
Member

We suspect that this is an issue with the normals: that's probably the best place to start digging into this issue.

@alice-i-cecile
Copy link
Member

@jakobhellermann adapted the code from http://apparat-engine.blogspot.com/2013/04/procedural-meshes-torus.html originally. We should check for obvious differences between this and our implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants