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.

Newcomers DBPro Corner / Applying animations to 3D objects

Author
Message
Onefreshfish
FPSC Reloaded TGC Backer
12
Years of Service
User Offline
Joined: 5th Jan 2012
Location: Perth, Australia
Posted: 9th Feb 2013 09:21
I'm wondering how I can apply an animation to a 3D object. It's to autoscale the animation resolution to any resolution that someone might have on their computer.
You can get more information on the problem I'm having here: http://forum.thegamecreators.com/?m=forum_view&t=202886&b=7

Just to clarify what I'm thinking, when someone says applying an animation to a 3D object does that mean creating an object such as a rectangle that takes up the whole screen and then the animation is "applied" to the face of the rectangle so it can rescale to the resolution? If this is correct, I'm thinking that maybe the object and background could both be black to avoid seams.
I apologise for the lengthy posts, once I've cleared this hurdle I will be able to finish my game.

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 10th Feb 2013 04:16 Edited at: 10th Feb 2013 04:17
in your other thread, you state you want to play an animation in full screen and have it fit whatever the users' screen size.

i don't see how playing it to an object would be any benefit (it would be a solid performance hit, especially at the resolution you're using) when you can scale the animation to fit the screen while maintaining its correct aspect ratio.

try something like this, instead:



or, am i missing some other reason that you must play it to an object?

Virtual Nomad @ California, USA . DBPro V7.7 . Matrix1Utils 05.27.12
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit
Onefreshfish
FPSC Reloaded TGC Backer
12
Years of Service
User Offline
Joined: 5th Jan 2012
Location: Perth, Australia
Posted: 10th Feb 2013 11:20
Thanks for the reply!
There was no specific reason why I wanted it on an object. However your code, in a fullscreen environment, stretches the animation vertically so perhaps an object is needed in cohesion with your code to prevent stretching. Otherwise I guess I could use a windowed screen as long as it was centered, but ideally I really need fullscreen.
Thanks anyway for your code it has helped.

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 11th Feb 2013 05:16
Quote: "your code ... stretches the animation vertically"

ack! it shouldn't, of course, unless it's required to maintain aspect ratio.

i'm not going to dig back into code - i believe the notion is sound but i'll leave it for someone else to pick up as i've obviously missed something.

questions:

did you test the above code as stand-alone or did you insert it into your app?

if inserted, are you properly adjusting your camera aspect?

again, not spending a lot of time on this myself but it ran without a hitch for me on various resolution animations so... i'm at a loss.

Virtual Nomad @ California, USA . DBPro V7.7 . Matrix1Utils 05.27.12
AMD Phenomâ„¢ X4 9750 Quad-Core @ 2.4 GHz . 8 GB PC2-6400 RAM
ATI Radeon HD 3650 @ 512 MB . Vista Home Premium 64 Bit

Login to post a reply

Server time is: 2024-11-23 13:41:58
Your offset time is: 2024-11-23 13:41:58