Talk:AVI Materials

From Valve Developer Community
Jump to: navigation, search

Hmm, from the looks of this, this has potential for opening up a whole new phenomenon: Virtual movie piracy. Could it be handled like SHOUTcast radio perhaps? :P --Andreasen 21:07, 11 Sep 2006 (PDT)

Yeah, I'd love to see someone do a drive-in theatre mod, with a real movie playing on the screen that you and your friends were watching at the same time. You could spawn zombies during the slow parts, and someone could model a pretty great Havok-enabled box of popcorn to spill.  :-) --Ndnichols 07:52, 12 Sep 2006 (PDT)
Thanks for the great tutorial Ndnichols!
I am only experiencing 1 error which is an abstract class error. I sent you an email but ill copy the contents here In case it slips through the cracks or if anyone else has a solution for what appears to be a simple problem.
Seems to be the only warning/error aswell and it might have something to do with imaterialproxy.cpp in the Client codes.
I should note i am using Orangebox engine however that shouldn't make a huge difference, although i am also using VC2008 Express to Compile the source so that might be my issue..
Anyway here is the only error i'm coming across;
5>c:\src\game\client\AVIMaterialProxy.h(74) : error C2259 : 'CAviMaterialProxy' : cannot instantiate abstract class
5> due to following members:
5> 'IMaterial *IMaterialProxy::GetMaterial(void)' : is abstract
5> c:\src\public\materialsystem/IMaterialProxy.h(25) : see
declaration of 'IMaterialProxy::GetMaterial'
This error is coming from around line 70 in AVIMaterialProxy.h;
EXPOSE_INTERFACE( CAviMaterialProxy, IMaterialProxy, "AviRenderer"
and the declaration of 'IMaterialProxy::GetMaterial' is;
abstract_class IMaterialProxy
virtual bool Init( IMaterial* pMaterial, KeyValues *pKeyValues ) = 0;
virtual void OnBind( void * ) = 0;
virtual void Release() = 0;
virtual IMaterial * GetMaterial() = 0; // This line is new to Orangebox...
// no one should call this directly
virtual ~IMaterialProxy() {}
Where i've written // This line is new to Orangebox...
Is where its stuffing up i think, when i comment out virtual IMaterial* GetMaterial() = 0;
your codes then work without errors however it breaks just about every other proxy cpp in the Source engine
(same abstract class error when its not commented, but not on your files on Valve's)
Any help would be much appreciated
Thanks for the codes man, and thanks in advance :)
--Jenkins08 14:45, 4 April 2009 (UTC)

Same MLSTRM 16:12, 14 July 2009 (UTC)

Ah Ha!

I think i've got it...

It's because in the code both IMaterial and Texture are used and that now wth Orange Box, they are incompatable...

I managed to get a type-cast error but that's as close as i have come.

Sorry but there it is...

MLSTRM 18:29, 6 August 2009 (UTC)


I have just edited the wiki page to add a fix to allow this to work on branches newer than 2007. This fix was semi-documented on the Procedural Materials page, but was never moved here. Since I do not have access to update the actual download, I have simply written the instructions to apply the patch. I can host an updated copy (along with vfw32.lib) if anyone would like.

I have confirmed that the code now works on all current branches of source, including 2013. Djelectro (talk) 02:20, 30 May 2020 (UTC)