trouble3524 Posted September 21, 2012 Share Posted September 21, 2012 Hi,I want play video when loading world. But I found splash did not support it. How to make it? Thanks. Link to comment
fonta.romain Posted September 21, 2012 Share Posted September 21, 2012 You should use https://developer.unigine.com/en/docs/1.0/code/scripting/library/gui/class.widgetspritevideo class Link to comment
trouble3524 Posted September 21, 2012 Author Share Posted September 21, 2012 You should use https://developer.un...dgetspritevideo class Thanks,I know that,but when playing video,I want use engine.world->loadworld("XXX"); to load a world. Every unigine project did not found this implementation,include "Oil Rush".. Link to comment
fonta.romain Posted September 21, 2012 Share Posted September 21, 2012 Sorry for misunderstanding :D Don't know if it's possible. I assume that in OilRush they load a really simple world that only plays videos and then load the "big" game world. But loading screen with a video seems to be impossible right now ;) Link to comment
carl.sutton Posted September 21, 2012 Share Posted September 21, 2012 engine.splash.setWorld void engine.splash.setWorld(string name,int threshold = 0) Description Sets basic properties of a world splash screen, which is displayed while the world is being loaded. The splash screen can be either a two-part texture or a Flash movie (.swf). In case of the flash movie, it is played with its native FPS as the loading progress goes. Notice If NULL is set for a splash screen texture (and no Flash movie is used), LOADING text will be shown instead. Arguments string name - Name of the file with the world splash screen. If NULL (0) is passed, the splash screen is cleared. int threshold = 0 - Amount of blur in the alpha channel when interpolating between states of the splash screen. This is an optional parameter; if it is not passed, 0 will be used instead. Note the "or a Flash movie" part :D Link to comment
fonta.romain Posted September 21, 2012 Share Posted September 21, 2012 Actually, Flash doesn't support video movies IIRC, but it's nice to have the ability to play flash files at loading :D Link to comment
trouble3524 Posted September 22, 2012 Author Share Posted September 22, 2012 Actually, Flash doesn't support video movies IIRC, but it's nice to have the ability to play flash files at loading :D Note the "or a Flash movie" part ;) Thanks. But when use flash moive loading screen with "engine.splash",the fps was very low and unstable,just like loading bar... Oil Rush game flow: play video->loading world(static texture)-main UI->loading world(static texture)->play video->game play... I just want use video to replace static texture when loading world... Link to comment
fonta.romain Posted September 24, 2012 Share Posted September 24, 2012 Unfortunately, it's not possible right now (or I did not find it in the doc). Perhaps Unigine crew will add it to the next SDK, as it seems to be a trivial functionality ;) Link to comment
trouble3524 Posted September 26, 2012 Author Share Posted September 26, 2012 Unfortunately, it's not possible right now (or I did not find it in the doc). Perhaps Unigine crew will add it to the next SDK, as it seems to be a trivial functionality ;) Thank you all the same. BTW:I think it's a very basic functionality ;) Link to comment
manguste Posted September 26, 2012 Share Posted September 26, 2012 No, sorry, adding video splashes is not planned. Just in case, it's not trivial. If video is rendered in one thread where scripts are compiled and the world is loaded, lags are imminent. And it's not possible to render it in a separate thread, since OpenGl does not support having a rendering context in more then one thread. In DirectX it's possible. In OpenGL, alas, no. Link to comment
fonta.romain Posted September 27, 2012 Share Posted September 27, 2012 Thanks for the technical point =) Link to comment
Recommended Posts