#How can I use 2D sprites in a 3D world?

10 messages · Page 1 of 1 (latest)

vale shard
#

Kinda like pokemon black & white

dense gyro
#

You can spawn a plane with sprite as a texture

cunning hemlock
cunning hemlock
vale shard
#

Thank you both, gonna try the plane solution

glass basin
#

Hey @vale shard im interested in this as well. Could you share what you tried and how it went? Id love to achieve this without a dependency, if possible.

cunning hemlock
#

Basic billboarding can be done with something like

let camera_transform = camera_query.single();

for mut billboard_transform in billboards.iter_mut() {
    billboard_transform.rotation = camera_transform.rotation;
}

but performance is a concern, bevy_mod_billboard has shader work for this which I think helps if ur gonna have alot of this going on

glass basin
# cunning hemlock Basic billboarding can be done with something like ``` let camera_transform = c...

Just noticed this. You should @ ppl next time, haha (but ty 🙂 ).

Yeah I see what ur doing here, but like, why is this not performant? ur just changing a single f32. Ur not even doing any math. I dont see how it can be faster lol. On second thought, I think shaders is a GPU thing so I suppose that makes sense. Doing this stuff a bunch of times is almost a waste of CPU resources, when u think about it. Although, if u were to do this in a more multithreaded way, I wonder if thats enough to eliminate the performance gap.

cunning hemlock
#

it just feels like shaders would be best if possible, I think things like particle systems usually get billboarded so, the marginal gains would add up when you have thousands of lil dots?

but yeh, doing it basic for just a few entities is probably fine.

#

(I have noticed threads getting lost, still learning the norms of this discord!)