Hello, everyone. I'm thinking about migrating to LOVE from the scripting engine that I've previously worked with (Danmakufu) and have been trying to conceptualize how I might replicate certain effects that I previously achieved in it in LOVE as well.
I want to know if 3D rotation of a 2D sprite can be achieved, at least for visual purposes. This video shows the effect in question in Danmakufu. The 2D sprites appear to rotate in random directions in 3 dimensions.
I'm not looking for "real" 3D, I just want to know if 3D rotation of a 2D sprite can be faked for visual purposes and how I might go about doing that. Thanks!
Simulated 3D sprite rotation in 2D
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Simulated 3D sprite rotation in 2D
Something like this?
- Attachments
-
- snowflake.love
- Simple rotating flake
- (7.97 KiB) Downloaded 338 times
- ExPorygon
- Prole
- Posts: 10
- Joined: Tue Apr 04, 2017 1:57 pm
- Location: New York, United States
- Contact:
Re: Simulated 3D sprite rotation in 2D
Hmm, I see that this is done with by manipulating the image's x-scale and y-scale along with the rotation angle. I had thought of trying a similar method but I didn't think it would look as good as it seems to. I suppose this would be an adequate replacement but I don't believe that this is precisely accurate to what I'm used to seeing.
My brief research into the subject led me to believe that the effect that I'm seeking may require the use of vertex shaders, which I do not have much experience using.
My brief research into the subject led me to believe that the effect that I'm seeking may require the use of vertex shaders, which I do not have much experience using.
Re: Simulated 3D sprite rotation in 2D
Maybe you could modify this.
- Attachments
-
- texturedCube.love
- shader image rotation
- (612.36 KiB) Downloaded 343 times
- ExPorygon
- Prole
- Posts: 10
- Joined: Tue Apr 04, 2017 1:57 pm
- Location: New York, United States
- Contact:
Re: Simulated 3D sprite rotation in 2D
Ah, this looks promising! I'll have to make it so there's only 1 image instead of 6, and change the axis of rotation from the middle of the cube to the texture. From studying the code, it looks like it's a bit out of my league to completely understand, but I'll do my best to work with it. I may end up posting back here for help later, though.
Thanks for the help, I'm sure this will put me on the right track!
Thanks for the help, I'm sure this will put me on the right track!
Who is online
Users browsing this forum: Bing [Bot] and 10 guests