• Movie Projector
    310 replies, posted
[QUOTE=maurits150;16855549]I didn't use any kind of module when made that video, but I might need one later.[/QUOTE] Did you use something like: cl_init.lua (From YouTube mod) Draw function [code] function ENT:Draw( ) self.Entity:DrawModel() local obbmax = self:OBBMaxs() local obbmin = self:OBBMins() obbmax.x = obbmax.x - 0.79 obbmax.y = obbmin.y + 1.9 obbmax.z = obbmax.z - 7.5 local pos = self:LocalToWorld( obbmax ) local ang = self:GetAngles( ) ang:RotateAroundAxis( ang:Right( ), -90 ) ang:RotateAroundAxis( ang:Up( ), 90 ) if html and html:IsValid() then html:SetPaintedManually( false ) cam.Start3D2D( pos, ang, 0.0555 ) html:PaintManual( ) self.Entity.new_material:SetTexture(html:GetMaterial()) self.Entity.flashlight:SetKeyValue ("SpotligtTexture", html:GetMaterial()) cam.End3D2D( ) html:SetPaintedManually( true ) if RenderFrame == true then html:SetSize( 1024, 513 ) html:SetSize( 1025, 513 ) RenderFrame = false else RenderFrame = true end else Create_HTML() end end [/code] init.lua (From gmod_lamp) Toggle function [code] function ENT:Toggle() if ( self.flashlight ) then SafeRemoveEntity( self.flashlight ) self.flashlight = nil self:SetOn( false ) return end local params = { ["$basetexture"] = "models/Alyx/emptool_glow", ["$nodecal"] = 1, ["$model"] = 1, ["$additive"] = 1, ["$nocull"] = 1, Proxies = { TextureScroll = { texturescrollvar = "$basetexturetransform", texturescrollrate = 33.3, texturescrollangle = 60, } }, } new_material = CreateMaterial("materiaal","UnlitGeneric",params); self:SetOn( true ) local angForward = self.Entity:GetAngles() + Angle( 90, 0, 0 ) self.flashlight = ents.Create( "env_projectedtexture" ) self.flashlight:SetParent( self.Entity ) self.flashlight:SetLocalPos( Vector( 0, 0, 0 ) ) self.flashlight:SetLocalAngles( Angle(90,90,90) ) self.flashlight:SetKeyValue( "enableshadows", 1 ) self.flashlight:SetKeyValue( "farz", 2048 ) self.flashlight:SetKeyValue( "nearz", 10 ) self.flashlight:SetKeyValue( "lightfov", 127 ) self.flashlight:SetKeyValue( "lightcolor", "255 255 255" ) self.flashlight:Spawn() end [/code] Never tested and im 99% sure that it dont work.
The env_projectedtexture entity accepts only a filename to a vtf texture file. There is no way to dynamically draw stuff to a vtf (RT textures are treated as vmts) without a bin.
[QUOTE=thomasfn;16857616]The env_projectedtexture entity accepts only a filename to a vtf texture file. There is no way to dynamically draw stuff to a vtf (RT textures are treated as vmts) without a bin.[/QUOTE] Except that if you read this thread, you would notice that it was accomplished using lua by maurits150
Wouldn't it work if you use _rt_texture (or something like that, can't remember right now) as file path?
[QUOTE=DarKSunrise;16872850]Wouldn't it work if you use _rt_texture (or something like that, can't remember right now) as file path?[/QUOTE] Only one way to find out. [editline]02:29PM[/editline] Didn't work.
I tried that long ago. The reason RT's use a [i]material[/i] is because materials (not textures) are clientside. They need to be, otherwise every player would share the same RT camera.
[QUOTE=HiddenMyst;16870778]Except that if you read this thread, you would notice that it was accomplished using lua by maurits150[/QUOTE] He can't have done it the projectedtexture way without a binary module, like I said. Unless there's a secret hidden keyvalue...
You should definetly do this, im not sure if you said that you would but can you make it RT Camera compatible? a few ppl need this (including me) and it would be a nice feature.
I've been able to get a RT camera working on a projected texture, somewhat.. [img]http://www.maurits.tv/data/img/August%202009/gm_construct0156.jpg[/img] Looking into a fix for this weird bug. Again this is done without any modules. [editline]06:08PM[/editline] Hmm I might know a way to fix the texture clamping..
I might as well give up now.
[QUOTE=grea$emonkey;16901479]I might as well give up now.[/QUOTE] Your avatar doesn't say so. :xd:
Nope, I'm counting on you man.
As long as someone releases something that works (maurits150?) then I'm happy.
Well, I can understand it's annoying to see someone accomplice something like it's nothing you've tried to do for ages.
I might have accomplished more then other people, but I still haven't been able to turn my work into anything useful. So you shouldn't really give up already.
[QUOTE=maurits150;16905870]I might have accomplished more then other people, but I still haven't been able to turn my work into anything useful. So you shouldn't really give up already.[/QUOTE] Be able to enter in entire webpages, and that's something useful, especially if it loads on servers, if not, try making it multiplayer playable. Much like the youtube one. I'm simple, I would be just fine with a projector that projected whatever content I threw at it, like pictures, webpages, and youtube videos, as well as other kinds of embedded videos. [b]It doesn't HAVE to be interactable, just a simple use-"enter url" and i'm good.[/b]
[QUOTE=Colton Rappe;16913164]Be able to enter in entire webpages, and that's something useful, especially if it loads on servers, if not, try making it multiplayer playable. Much like the youtube one. I'm simple, I would be just fine with a projector that projected whatever content I threw at it, like pictures, webpages, and youtube videos, as well as other kinds of embedded videos. [b]It doesn't HAVE to be interactable, just a simple use-"enter url" and i'm good.[/b][/QUOTE] Interaction is not the problem, the problem is that I can't project the HTML panel without changing some things manually by hand. I can't make the 'grab the HTML content and apply it to the projected texture entity' process automated within lua at the moment. I'm searching for a solution, and if I can't find that I'll have to use a module to get it working.
[QUOTE=maurits150;16919048]Interaction is not the problem, the problem is that I can't project the HTML panel without changing some things manually by hand. I can't make the 'grab the HTML content and apply it to the projected texture entity' process automated within lua at the moment. I'm searching for a solution, and if I can't find that I'll have to use a module to get it working.[/QUOTE] The same thought came to mind one time when I was looking at the youtube player code. Just for curiosity sake. The thought of how to display that kind of information.
Snip. Good god I missed a whole page :l .
maurits150... would the gm_chrome module help at all? O_o or is that already planned to be used...? not even fully sure what it does, but its the closest thing to this.
[QUOTE=Colton Rappe;16942146] not even fully sure what it does, but its the closest thing to this.[/QUOTE] No its not. He would need a new one.
[QUOTE=Jamie932;16942259]No its not. He would need a new one.[/QUOTE] What I meant was, I thought it might help, the module, didn't mean to say it did anything like what this addon does <_< sorry if I worded it wrong.
Well all of the dll's are supposed to include the source; if it's at all related code-wise, it might prove useful.
maurits150... any progress of ANY kind yet? or still same-o same-o [b]Edit:[/b] Guess not... well, cheers and hope it gets released soon. Even if you have to release it in versions, that may be just youtube first, then web content in a later released version. Ehhhh.
[QUOTE=Colton Rappe;16973275]maurits150... any progress of ANY kind yet? or still same-o same-o [b]Edit:[/b] Guess not... well, cheers and hope it gets released soon. Even if you have to release it in versions, that may be just youtube first, then web content in a later released version. Ehhhh.[/QUOTE] agreed
[QUOTE=Best4bond;17062551]agreed[/QUOTE] I wonder if the new update might help this thing. You know this one. Just sounds familiar. AND I REALLY DO HOPE, of all people, that this thing gets released some day. What a bloody waste if it never does, but I will stay optimistic. The update i'm referring to: [code]Fixed render.DrawQuad weird offset[/code]
But we're but not using that function.
[QUOTE=Overv;17097630]But we're but not using that function.[/QUOTE] Yes, DrawQuad is very expensive to run as often as my version does. A cam.3D2D would be best.
maurits150, don't give up on it. Making a faster and smoother player with such liquid dynamics like that, would definately be something fun to mess with, but it would be nice if you could just somehow input embed code into a url reader input box, to display whatever you enter via an embed code, like youtube, hulu, etc. Anything with supporting video script embed code. EDIT: Can you say... Thread Hijack? xD anyway, lots of things should get released.. just hope they do.
[QUOTE=maurits150;16900838]I've been able to get a RT camera working on a projected texture, somewhat.. [/QUOTE] Freaking Awesome!! I always wondered why no one had done this, as it is so cool!
Sorry, you need to Log In to post a reply to this thread.