Jump to content

:roll: Video


Recommended Posts

  • MTA Team
Posted (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 by Guest
  • MTA Team
Posted

a 3d could easily be implemented (thats why i suggested onClientPreRender, instead of a static image like guiCreateImage)

  • MTA Team
Posted

Wow, i think they would implement that with images before doing it with videos. But that is still possible. dxDrawVideoSection + ...

Posted

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.

  • MTA Team
Posted

Hellooo? diegofkda, don't you see the POSITION value. Pwned. You laugh at meh, I'll laugh at you. :twisted:

Posted

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 ? :?

Posted
Hellooo? diegofkda, don't you see the POSITION value. Pwned. You laugh at meh, I'll laugh at you. :twisted:

No, no, dude, I just tried to put some humor here :wink:.

Posted
- 0006059: [Client] Exported functions break if the owner resource is restarted - new.

I prefer the dxVideo function than fix that superminor bug.

  • MTA Team
Posted
- 0006059: [Client] Exported functions break if the owner resource is restarted - new.

I prefer the dxVideo function than fix that superminor bug.

:D

Posted

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.

Posted
- 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...

Posted

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 :)

Posted

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.

Posted

What I requested can be imitated by drawing separate pixels with dxDrawRectangle, but that will slow the game down.

Posted

i can see how this superminor bug can break gamemode...

I think gamemode can be restarted :roll: 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.

  • MTA Team
Posted
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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...