Jump to content

SDraw

Members
  • Posts

    79
  • Joined

  • Last visited

Everything posted by SDraw

  1. Just having fun with libVLC Video renders on texture, so it can be used in shaders/material lines/etc. So, continue or not?
  2. Current resource allows you to play custom videofile. How to create videofile: 1. You need to separate each frame of video you like. For this you can use any video editing software that can do it (I prefer Sony Vegas). Remember, that FPS should be integer. I suggest you to keep video resolution below 320x240 because you can get EXTREMELY large videofile at the end. All frames should be in '/frames/' folder. 2. Separate audiotrack and put in in resource folder. 3. Change first three variables in 'video_gen_server.lua' to yours. 4. Uncomment server script line in 'meta.xml' 5. Start resource. 6. Wait for video creating. 7. Comment server script line in 'meta.xml', uncomment file line in 'meta.xml' 8. Restart resource. Videofile structure (quite simple): http://i.imgur.com/kxl05a2.png Client-side commands: vload , vplay, vstop, vrewind, vunload. Warnings: 1. This is demonstration resource. It's not for everyday using. 2. If you do something wrong, you probably will crash your game at playback. Download: Github Screenshot http://i.imgur.com/5CQwG2p.png Video (of video): https://www.youtube.com/watch?v=bmTcHw3_KRc If you can't create videofile, you can use this file for demonstration.
  3. I tried to create shader that acts same as shadow on low graphic settings, but no luck. Sometimes I get a planar hell or even more weird things. If you really want (and can) help, please, make possible to set start and end positions of projection for shader via script as 3 dimensional vector (I really can't understand homogeneous coordinates D: ) Edited: found a perfect way for this. If you are interested, just send PM.
  4. Жалко, что почищено. Видать, "легендарный" долбоящер опять слился, обиделся и поплакался модераторам.
  5. Yes, title is dumb. Yes, someone will start to complain "Why do you need it?","You can do it with 'file<>' functions" and etc. But let me explain this. Just imagine, you made awesome terrain/city/(whatever) model, but you don't want others to use it. Solution? Encryption. There are a lot of methods of encryption (even you can make own). So, now you have encrypted model. And then pain in the ass starts. Decryption. You open encrypted file, read it all, decrypt data, save it to temporary file, use engineLoad<>. Ooops, temporary file is decrypted. Someone smart can use it. 1. Ok, let's delete file after importing. Do you think now your model is safe after that? Wrong. It's possible to prevent file deletion and successfully steal model. 2. Let's modify algorithm and put temporary file in random folder. Harder to locate temporary file, but still possible to steal. 3. We can remove encyption and rename file(s) as md5 hash without file type. Still not good. Why? DFF and TXD are connected with textures names, so it's simple to read all files and find similar textures. You can add more problems for thief and always create models with same textures names (wall.dff -> tex0,tex1,tex2; grass-> tex0; etc.), but it won't help. A bit of manual sorting and awesome model(s) is(/are) stolen. As you see, there is no perfect way to prevent model stealing. And I suggest to improve import functions: col engineLoadCOL ( string col_file, [ bool is_string = false ] ) dff engineLoadDFF ( string dff_file, int model_id, [ bool is_string = false ] ) txd engineLoadTXD ( string txd_file [, bool filteringEnabled = true, bool is_string = false ] ) Why? Just think. Get it? No? It's sad then. P.s. I can't create request on BT. It says "Access denied".
  6. I'll open server when I make it
  7. У меня просто способность делать велосипеды
  8. Код довольно примитивный должен выходить, дам толчок
  9. This is exactly "crutch" that I was talking about...
  10. So, problem: need to draw object/vehicle on screen as separated image. Properties of object/vehicle can be changed. I thought about using shader, applying it on object/vehicle and preform pixels on separated render target. But I couldn't find function/algorithm to preform pixels because they have position with 4 dimensions, not 2 as needed for render target. Even VPOS semantic for pixel shader couldn't help. Any ideas?
  11. Yes, I use latest build (1.3.5-rc-6159). Only in one script, exactly where it should be.
  12. local px,py,pz = getElementPosition(localPlayer) local veh = createVehicle(411,px-5,py-5,pz) setVehicleColor(veh,0,141,255,0,0,0) function colorChFunc() setVehicleColor(veh,0,141,255,0,0,0) end bindKey("j","down",colorChFunc)
  13. Yes, there were two shaders: for hiding numberplate part and for replacing texture of it. But even without them problem still exists. Sorry for posting there, because I've just found button to report issue on bugtracker (it didn't want to appear).
  14. After updating to 1.3.5 clientside vehicles have wrong colors after creating. Colors changes to random. Steps: 1.Create clientside vehicle. 2.Change its colors (RGB). Sample code: local veh = createVehicle(...) setVehicleColor(veh,0,141,255,0,0,0) Besides, getVehicleColor returns right colors. Changing color after a while is right too.
×
×
  • Create New...