Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / 3D Sprites?

Author
Message
Mister Fuzzy
13
Years of Service
User Offline
Joined: 27th Feb 2011
Location: XNA
Posted: 27th Nov 2011 04:09
I am making a classic-ish adventure game that utilizes a 3D world with 2D characters, but I can't figure out how to paste an animated sprite to a 3D plane. This seems like it should be easy to do, but I still can't figure it out. Do I need to texture the object with seperate images for each individual frame (Which would REALLY suck...)? Can I grab a small portion of an image to texture the object with? Can I just apply an animated sprite to my object?

Tunnel vision yet? Have a carrot!
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 27th Nov 2011 07:17
Yes you do have to texture the plane object with an image.

To animate it you have two options:

1. Use multiple images for the frames and just simply texture the object with the new image.

2. Alter the UV of the texture to reflect the portion of the image you want to display on the plane.

ie. top-left UV would be 0,0 and bottom-right would be 1,1 to show a whole texture. UV coords of 0.5,0.5 would be halfway through the texture. So for the last frame in a 2x2 animated image would be top-left=0.5,0.5 and bottom-right=1.0,1.0

A bit fiddly yes, but neither way would slow anything down.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!

Login to post a reply

Server time is: 2024-11-19 06:36:52
Your offset time is: 2024-11-19 06:36:52