This should hopefully be the final version now.
I'm sure there's plenty of room for optimisation, but I think it's good enough.
Download: https://1drv.ms/u/s!Atq7cUIJ7uextFqt...atKIr?e=8VOp44 (version 1.3)
This should hopefully be the final version now.
I'm sure there's plenty of room for optimisation, but I think it's good enough.
Download: https://1drv.ms/u/s!Atq7cUIJ7uextFqt...atKIr?e=8VOp44 (version 1.3)
Hey! Here's my DX11 port, just a note for people downloading:
DX9 version up above had a small issue in the backside equation which wasn't an issue on DX11.
Took me a bit to figure out the cause but I've fixed that
So this includes DX9 version as well with the fix.
Wow this is really cool, thank you for sharing!
Cheers!
This is just yet another minor update, allowing for both sides of the object to be animated, in case anyone wants to do that...
Download: https://1drv.ms/u/s!Atq7cUIJ7uextFvN...9JRdI?e=vWFsIL (version 1.4)
![]()
You must be a mind reader, I was going to ask if it could be animated. Very clever idea, thank you.
haou énorme Merci.
huge thank you
I actually talked about having a fixed backside texture would make harder for animated backside, which should be useful in something like Paper Mario for example
Either way, here it is, my port of version 1.4 to DX11, I'll eventually port all of these to all runtimes just so people can enjoy it everywhere!
Heard there might be a final version with two alternatives, with and without lighting, to improve performance, which might be interesting for other runtimes.
Yep, that was NaitorStudio's suggestion.
Since we're now talking about more diverse use-cases, such Paper Mario, it begs the question: Do we need three degrees of freedom?
Right now, we can only rotate the card on the X and Y axes, but it would be trivial to allow rotation on the Z axis as well, if that's something people might use?
I know you could use the standard CF2.5 "angle" property, but that would effectively rotate the object on the Z axis after rotating on the X and Y axes, whereas it would probably be preferable to rotate on the Z axis first.
Possibly also the option to mirror both faces, so you wouldn't need separate left/right walking animations?
Anyway, for now, here's another edit. As NaitorStudios alluded to, it now comes in two flavours:
1.5a (advanced) - works the same as 1.4, but the code is more streamlined.
1.5b (basic) - as above, but doesn't include the lighting effect or the option to use an image parameter for the reverse side.
I've also included an .mfa file which demonstrates how to replicate the lighting effect in the basic version, using CF2.5 events instead, which I believe ought to be more efficient (especially on larger objects).
Download: https://1drv.ms/u/s!Atq7cUIJ7uextF3l...8kzPE?e=kcTxtO (versions 1.5a & 1.5b)
Fantastic!
Yeah, some people may find use for a Z rotation, I see that you have leaved the function there in case anyone need
As usual, here's my ports.
Edit: updated file, there was a slightly lighting issue on DX11 because of a float modulus that didn't happened on previous versions.
Edit²: Changed modulus operation to uint intead of forcing no warning, should improve performance a bit.
This looks awesome! This could work great for games where you inspect notes and stuff like that.