qaisjp Posted May 26, 2011 Share Posted May 26, 2011 (edited) I know this is a foolish idea, but it is a useful idea. Video compatibility. The feature could show a video. Maybe it could be streaming or could be something like a dx function. Where it shows a part of a video for one frame. ------------------------------ Ways you could use it: dxDrawVideo(string videoPath, float onScreenX, float onScreenY,float positionValue, float alpha, string color = nil ) videoPath = "trailer.avi" onScreenX = 0 onScreenY = 1 positionValue = positionValue + 0.001 (position of video to show) alpha = 255 (alpha of video) color = nil (can use tocolor - without alpha option) Use this with onClientPreRender. It could show that part of the video for one frame. Note: It could also play the sound of that frame for one frame. Not noticeable if you dont use onClientPreRender. --------------------------------- Using the above method you could keep videoPath as a stream but positionValue is nil. I like this idea, what do you think about it? Is it even possible? Edited May 26, 2011 by Guest Link to comment
karlis Posted May 26, 2011 Share Posted May 26, 2011 would be possible(i guess), but unless its a 3d see no point in it, but if 3d, that would ftw(playing mta in a mta...) Link to comment
qaisjp Posted May 26, 2011 Author Share Posted May 26, 2011 a 3d could easily be implemented (thats why i suggested onClientPreRender, instead of a static image like guiCreateImage) Link to comment
karlis Posted May 26, 2011 Share Posted May 26, 2011 no i mean, added in 3d world, with actual dimensions, rotation, getting blocked by other stuff, etc... Link to comment
qaisjp Posted May 26, 2011 Author Share Posted May 26, 2011 Wow, i think they would implement that with images before doing it with videos. But that is still possible. dxDrawVideoSection + ... Link to comment
DiSaMe Posted May 26, 2011 Share Posted May 26, 2011 Videos can be made in image formats and then played with dxDrawImage or dxDrawImageSection. Videos in 3D world could be made if MTA supported animated UV in custom models OR if it was possible to draw textured 3D triangles. The latter could also be used to achieve many other great things, because very dynamic models would be possible. Link to comment
karlis Posted May 26, 2011 Share Posted May 26, 2011 so we need an image/dff/txd streamer. Link to comment
diegofkda Posted May 26, 2011 Share Posted May 26, 2011 dxDrawVideo? well the video will appear from the start every GTA frame Link to comment
qaisjp Posted May 27, 2011 Author Share Posted May 27, 2011 Hellooo? diegofkda, don't you see the POSITION value. Pwned. You laugh at meh, I'll laugh at you. Link to comment
Faw[Ful] Posted May 27, 2011 Share Posted May 27, 2011 Already requested ... 3D Ingame (for example on a texture) : Can be made with DFF animated UV or draw textured 3D triangles (well like CrystalMV said) = alot of frames (pictures) compressed BINK video, maybe = little sized video, but this or other kind of video doesn't exist in gta sa at all ... hmmmm ! Somebody know how the animated texture in GTA 4 are made ? Link to comment
diegofkda Posted May 28, 2011 Share Posted May 28, 2011 Hellooo? diegofkda, don't you see the POSITION value. Pwned. You laugh at meh, I'll laugh at you. No, no, dude, I just tried to put some humor here . Link to comment
Dark Dragon Posted June 1, 2011 Share Posted June 1, 2011 3d images and videos would be really neat but i guess theres more important work to do right now. Link to comment
diegofkda Posted June 1, 2011 Share Posted June 1, 2011 - 0006059: [Client] Exported functions break if the owner resource is restarted - new. I prefer the dxVideo function than fix that superminor bug. Link to comment
qaisjp Posted June 1, 2011 Author Share Posted June 1, 2011 - 0006059: [Client] Exported functions break if the owner resource is restarted - new. I prefer the dxVideo function than fix that superminor bug. Link to comment
Arran Posted June 1, 2011 Share Posted June 1, 2011 diegofkda if its "superminor" then its obviously going to take a fraction of the time to fix than a "dxVideo function" Its also a bug which was introduced into 1.1 and fixing bugs especailly new bugs is always more important than adding new features and new features result in more bugs so its important to stay on top of bugs. Link to comment
karlis Posted June 2, 2011 Share Posted June 2, 2011 - 0006059: [Client] Exported functions break if the owner resource is restarted - new. I prefer the dxVideo function than fix that superminor bug. i can see how this superminor bug can break gamemode... Link to comment
DiSaMe Posted June 2, 2011 Share Posted June 2, 2011 OK, I have one more suggestion about feature which would make scriptable videos really efficient: an ability to use 2D tables as image data. DX image functions could allow passing table to filename parameter, and values in the table would be colors of every pixel. Table size would be used to get the dimensions of the image. Something like this: table_image = { {tocolor(255,0,0,255),tocolor(0,255,0,255),tocolor(0,0,255,255)}, {tocolor(255,0,0,128),tocolor(0,255,0,128),tocolor(0,0,255,128)}, } dxDrawImage(50,50,100,100,table_image) table_image is a 3x2 image. The upper row has opaque red, green and blue pixels, while the lower has the same colors, but transparent. In dxDrawImage, a table instead of a string is passed as 5th parameter. I tried creating 1024x1024 table and it used only 16 MBs of memory. The same amount of memory can be used to store 64 128x128 images. That's efficient enough. What's more, it would allow to make very dynamic images Link to comment
karlis Posted June 2, 2011 Share Posted June 2, 2011 you could do that by few dxDrawImageSection function dxDrawImageColorSection(x,y,l,h,path,rot,rotX,rotY,colorTBL,posgui) local rotX,rotY=l/2-rotX,h/2-rotY local xs,ys=x,y for k,v in ipairs(colorTBl) do for k2,v2 in ipairs(v) do dxDrawImageSection(x,y,l/#v,h/#colorTBL,x,y,l/#v,h/#colorTBL,path,rot,rotX-xs+x,rotY-ys+y,v2,posgui) x=x+l/#v y=y+h/#colorTBL end end end untested yet. Link to comment
DiSaMe Posted June 2, 2011 Share Posted June 2, 2011 What I requested can be imitated by drawing separate pixels with dxDrawRectangle, but that will slow the game down. Link to comment
diegofkda Posted June 3, 2011 Share Posted June 3, 2011 i can see how this superminor bug can break gamemode... I think gamemode can be restarted why will you restart the resource with exported functions? there are more ways for ignore the bug than make a dxVideo function, well there is a way but ehemm it occupies many PNG images. Link to comment
qaisjp Posted June 4, 2011 Author Share Posted June 4, 2011 diegofkda if its "superminor" then its obviously going to take a fraction of the time to fix than a "dxVideo function"Its also a bug which was introduced into 1.1 and fixing bugs especailly new bugs is always more important than adding new features and new features result in more bugs so its important to stay on top of bugs. True. Link to comment
Recommended Posts