Git Product home page Git Product logo

bevy_infinite_grid's People

Contributors

aevyrie avatar barsoosayque avatar christophermacgown avatar gavlig avatar hate avatar icesentry avatar jakobhellermann avatar julianruiseco avatar loispostula avatar luca-della-vedova avatar oscrim avatar pcwalton avatar philpax avatar pikminguts92 avatar therawmeatball avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bevy_infinite_grid's Issues

Update crate releases for bevy 0.12

I was wondering if we could cut a new release and update crates.io with the new release. I'd like to use this project through bazel and its difficult to point it at a specific git hash. If its possible for me to help with this process I would be happy to. Wonderful project for robotics!

Unable to build the simple example

As far as I can tell, building the library assumes that you have bevy in the parent directory.

[patch.crates-io]
bevy = { path = "../bevy" }

So running cargo run --example simple results in

error: failed to load source for dependency bevy

Caused by:
Unable to update /path/bevy

Caused by:
failed to read /path/bevy/Cargo.toml

Caused by:
No such file or directory (os error 2)

Panic in WASM

Rev: 5897bb6

When running the example in WASM it panics with the following error message.

panicked at 'wgpu error: Validation Error

Caused by:
    In a RenderPass
      note: encoder = `<CommandBuffer-(0, 1, Gl)>`
    In a set_push_constant command
    Provided push constant is for stage(s) ShaderStages(VERTEX), however the pipeline layout has no push constant range for the stage(s) ShaderStages(VERTEX)

Metal render pass error

I have setup a simple example of using infinite grid and the scene renders briefly then crashes. Here is the initialisation of the camera and grid during the menu stage, I am using PanOrbitCamera if that is of any consequence. The example ran from this repo works no problem, this led me to believe that it could be an ordering issue? but I am just guessing at this stage.

    commands
        .spawn(InfiniteGridBundle {
            grid: InfiniteGrid {
                ..Default::default()
            },
            ..Default::default()
        })
        .insert(GridShadowCamera);
    commands
        .spawn((
            Camera3dBundle {
                transform: Transform::from_xyz(0.0, 4.37, 14.77),
                ..Default::default()
            },
            PanOrbitCamera::default(),
        ))
        .insert(GameCamera);
Caused by:
    In a RenderPass
      note: encoder = `<CommandBuffer-(0, 8, Metal)>`
    In a set_pipeline command
      note: render pipeline = `grid-render-pipeline-shadowless`
    Render pipeline targets are incompatible with render pass
    Incompatible sample count: the renderpass expected 1 but was given 4

Grid in example does not render

cargo run --release --example simple on a M1 mac. Bevy's examples work on this system.

On load, shows nothing:

Screen Shot 2022-10-18 at 3 56 49 PM

Navigating around I get cubes but no grid:

Screen Shot 2022-10-18 at 3 57 17 PM

Debug lines will not shown if under plane

Thanks for the upgrade. After migrate to new version, I found debug lines will be clipped but meshes not.Please see below screenshots for more details:

After move the new version:

  • with bevy gizmo sample

infinite_grid_2

  • with bevy-repier example(debug render used)

infinite_grid

In old version:

  • with bevy-repier example(debug render used)

ddb499872fb6f9caff8a15019899608

Update to bevy 0.10

bevy_flycam dev dependency is not updated yet

I've tried to update, see this commit: rlidwka@48d1b7c

EntityRenderCommand is merged into RenderCommand (biggest change here), stages are replaced with system sets, and so on

It compiles, but returns real-time errors which I don't know how to debug. Can anyone help?

Rendering multiple axis on top of each other causes flickering

When one renders two grids on top of each other, one is randomly selected to be rendered on top and the result is per-frame flickering. Is there a way to render two grids?

    commands.spawn(bevy_infinite_grid::InfiniteGridBundle {
        grid: bevy_infinite_grid::InfiniteGrid {
            fadeout_distance: 250.,
            shadow_color: None,
            ..Default::default()
        },
        ..Default::default()
    });
    commands
        .spawn(bevy_infinite_grid::InfiniteGridBundle {
            transform: Transform::from_rotation(Quat::from_axis_angle(Vec3::X, FRAC_PI_2))
                .with_scale(Vec3::splat(10.)),
            grid: bevy_infinite_grid::InfiniteGrid {
                fadeout_distance: 7.,
                shadow_color: None,
                ..Default::default()
            },
            ..Default::default()
        });

Thanks for the awesome project : )

HDR 3D camera funks up fade-out rendering

When I turn on HDR in a Bevy 3D camera (hdr: true), the infinite grid fade out makes the faded out portion (out to infinity) turn black as opposed to turning transparent.

grid


How I instantiate the camera bundle:

commands.spawn((
        Camera3dBundle {
            camera: Camera {
                hdr: true,
                clear_color: ClearColorConfig::Custom(Color::rgb(0.075, 0.075, 0.075)),
                ..default()
            },
            ..default()
        },
        BloomSettings::NATURAL,
    ));

How I instantiate the grid:

commands.spawn(InfiniteGridBundle {
        settings: InfiniteGridSettings {
            fadeout_distance: 400.0,
            scale: 0.1,
            x_axis_color: Color::rgb(1.0, 1.0, 1.0),
            z_axis_color: Color::rgb(1.0, 1.0, 1.0),
            minor_line_color: Color::rgba(0.0, 0.0, 0.0, 0.0),
            major_line_color: Color::rgb(1.0, 1.0, 1.0),
            ..Default::default()
        },
        ..Default::default()
    });

Camera2dBundle

I was wondering if it's possible to use this i've tried rotating it on the x axis so hopefully it would show up but it did not. Is it just not possible? Awesome library btw!

How to use GridShadowCamera ?

While trying to use bevy_infinite_grid v0.5.1, I'm getting constant crashes, although I'm doing what docs told me to do (or rather, what I copied from the simple example ๐Ÿ˜„). Here is the crash log:

thread 'Compute Task Pool (3)' panicked at 'called `Result::unwrap()` on an `Err` value:
NoEntities("bevy_ecs::query::state::QueryState<(&bevy_transform::components::global_transform::GlobalTransform, 
&bevy_render::camera::camera::Camera), bevy_ecs::query::filter::With<bevy_infinite_grid::GridShadowCamera>>")',
src/lib.rs:134:33

Seems like using the library requires an entity with GridShadowCamera:

fn track_frustum_intersect_system(
mut commands: Commands,
mut grids: Query<(
Entity,
&GlobalTransform,
&InfiniteGrid,
Option<&mut GridFrustumIntersect>,
)>,
camera: Query<(&GlobalTransform, &Camera), With<GridShadowCamera>>,
) {
let (cam_pos, cam) = camera.single();

But I'm not really sure how I'm supposed to spawn a GridShadowCamera ? Do I just inject it into some other camera I'm using ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.