[QUOTE=Xera;15111936]tr.HitPos + tr.HitNormal * 1.1
The rotation will be a bit more complex, just use trial and error until it works.[/QUOTE]
I tried that. It ended up somewhere else far away.
[QUOTE=Megalan;15112088]Maybe something like cs_office projector? or projector from portal?[/QUOTE]
That's a projector prop, and a .vtf on the wall, with no sound, unless built into the map to start on entry.
omg meet the spy projector yes yes yes
[QUOTE=Bletotum;15131993]That's a projector prop, and a .vtf on the wall, with no sound, unless built into the map to start on entry.[/QUOTE]
i mean effects from it, if i remember correctly it has light comming from projector prop
[QUOTE=Megalan;15136272]i mean effects from it, if i remember correctly it has light comming from projector prop[/QUOTE]
Probably a func_dustmotes and a sprite.
I still need some kind of beam effect for it.
[QUOTE=grea$emonkey;15061917]Xyxen and I collaborated for a while and we finally got this damn thing to work.
Here's some eye-candy for your nonbelievers.
[URL=http://img8.imageshack.us/my.php?image=gmconstruct0104.jpg][IMG]http://img8.imageshack.us/img8/5598/gmconstruct0104.th.jpg[/IMG][/URL]
[URL=http://img8.imageshack.us/my.php?image=gmconstruct0102.jpg][IMG]http://img8.imageshack.us/img8/9142/gmconstruct0102.th.jpg[/IMG][/URL]
[URL=http://img223.imageshack.us/my.php?image=gmconstruct0103.jpg][IMG]http://img223.imageshack.us/img223/6766/gmconstruct0103.th.jpg[/IMG][/URL]
One flaw, it needs to know how many fames there are total in the VTF so it can tell when to start the frame incrementation over. Only way I can think of is storing it in a txt file or a table with their corresponding materials. If anyone knows another way, please tell me.[/QUOTE]
You can store it in a dummy material param in the VMT, like "$MaxFrames"
True, but when I'm already making a 'dummy' material, I would need it stored somewhere else like a text file.
Why not a .vtf?
[QUOTE=Bletotum;15143232]Why not a .vtf?[/QUOTE]
Because the render library uses VMT's, and I can't read a VTF without some kind of module that decodes them.
Bahaha! I'm using anons entity panel base and made a rick roll screen.
[url]http://i39.tinypic.com/iwpzd2.jpg[/url] --Small size
[url]http://i40.tinypic.com/2you1lj.jpg[/url] --Up'd the size
Yes, it's animated, it loads it from youtube.
You can find his base here. [url]http://www.facepunch.com/showpost.php?p=15011981&postcount=3[/url]
I would really enjoy SWF/AVI support... that would just make my day. I hope this is finished. Good luck, grea$emonkey, I hope you can do this. :)
[QUOTE=blackops7799;15162912]Bahaha! I'm using anons entity panel base and made a rick roll screen.
[url]http://i39.tinypic.com/iwpzd2.jpg[/url] --Small size
[url]http://i40.tinypic.com/2you1lj.jpg[/url] --Up'd the size
Yes, it's animated, it loads it from youtube.
You can find his base here. [url]http://www.facepunch.com/showpost.php?p=15011981&postcount=3[/url][/QUOTE]
Oh my god, that is awesome.
[media]http://www.youtube.com/watch?v=mzuQmTlnHsA[/media]
Here's a video I made of it.
[QUOTE=blackops7799;15165290][media]http://www.youtube.com/watch?v=mzuQmTlnHsA[/media]
Here's a video I made of it.[/QUOTE]
Thank you. This will be very useful for me. I would just need to find a way to control the page on the screen from a derma panel.
I am thinking of adding 3 modes for this.
[list]
[*]Loop:
Uses a material with a sound clip. Basically what it does now.
[*]Slide Show:
Manually changing each frame or have a set frame rate.
[*]Video:
Plays videos on the internet. Nuff' said.
[/list]
I haven't started work on the derma yet, and I am kinda loathing that part more than anything. I am going to implement the video mode.
[editline]04:24PM[/editline]
I may even talk with aVoN about it.
You could use RT textures to get this working with PCMod.
And, Grea$emonkey, why don't you use the four trace method?
It'll be much more realistic, it'd do the thing that happens with real life projectors, where one edge is smaller than the other.
[QUOTE=Deco Da Man;15176122]You could use RT textures to get this working with PCMod.
And, Grea$emonkey, why don't you use the four trace method?
It'll be much more realistic, it'd do the thing that happens with real life projectors, where one edge is smaller than the other.[/QUOTE]
I tried it already. It looks horrible. You have to remember that Quads need 4 points which means if one point ends up on a different axis than the others, it stretches across axis and makes it look even less realistic. It ended up stretching across on a diagonal, and sometimes got horribly contorted across displacements.
It's essentially impossible without modifying the engine so that flashlight overlays could be animated. I already tried that too for the realism, but it failed horribly.
Besides, that wouldn't work for panels, which I am working with aVoN to integrate with Derma control.
You sir, are made of epic win.
[QUOTE=grea$emonkey;15176184]I tried it already. It looks horrible. You have to remember that Quads need 4 points which means if one point ends up on a different axis than the others, it stretches across axis and makes it look even less realistic. It ended up stretching across on a diagonal, and sometimes got horribly contorted across displacements.
It's essentially impossible without modifying the engine so that flashlight overlays could be animated. I already tried that too for the realism, but it failed horribly.
Besides, that wouldn't work for panels, which I am working with aVoN to integrate with Derma control.[/QUOTE]
Is it an actual engine restriction? Passing an animated vtf to the projected texture just shows the first frame or something?
[QUOTE=blackops7799;15165290][media]http://www.youtube.com/watch?v=mzuQmTlnHsA[/media]
Here's a video I made of it.[/QUOTE]
It doesn't beat mine yet. :D
[media]http://www.youtube.com/watch?v=Hjmtv-zU1pw[/media]
You can also set the quality/update rate so people with bad pcs don't lag by the refreshing.
[QUOTE=maurits150;15176631]It doesn't beat mine yet. :D
[media]http://www.youtube.com/watch?v=Hjmtv-zU1pw[/media]
You can also set the quality/update rate so people with bad pcs don't lag by the refreshing.[/QUOTE]
Very awesome. I'd very much like to see your code for this so I can integrate it with the projector. Certainly would speed things along. Mostly would like to see the quality/update rate stuff.
[editline]10:04AM[/editline]
[QUOTE=thomasfn;15176613]Is it an actual engine restriction? Passing an animated vtf to the projected texture just shows the first frame or something?[/QUOTE]
Flashlights just aren't meant to be animated. For the bending of flashlight light to work, it needs to be coming from a flashlight entity, which apparently doesn't support animation.
I thought flash lights were just a env_projectedtexture entity parented to the player. I didn't think they actually need another entity to work, they should work stand alone - one of the HL2 maps does it.
[QUOTE=thomasfn;15177996]I thought flash lights were just a env_projectedtexture entity parented to the player. I didn't think they actually need another entity to work, they should work stand alone - one of the HL2 maps does it.[/QUOTE]
The lamp entity is a good example. It directly spawns a flashlight entity. Type "create_flashlight" in console and that's pretty much it. It simply won't work.
[lua]self.flashlight = ents.Create( "env_projectedtexture" )
self.flashlight:SetParent( self.Entity )
// The local positions are the offsets from parent..
self.flashlight:SetLocalPos( Vector( 0, 0, 0 ) )
self.flashlight:SetLocalAngles( Angle(90,90,90) )
// Looks like only one flashlight can have shadows enabled!
self.flashlight:SetKeyValue( "enableshadows", 1 )
self.flashlight:SetKeyValue( "farz", 2048 )
self.flashlight:SetKeyValue( "nearz", 8 )
//Todo: Make this tweakable?
self.flashlight:SetKeyValue( "lightfov", 50 )
// Color.. Bright pink if none defined to alert us to error
self.flashlight:SetKeyValue( "lightcolor", self.m_strLightColor or "255 0 255" )
self.flashlight:Spawn()
self.flashlight:Input( "SpotlightTexture", NULL, NULL, self:GetFlashlightTexture() )[/lua]
So it needs a parent, thats ok. Just parent it to your projector entity? And I was thinking, since you pass the texture name in as a string, what happens if you make a blank 512x512 vmt, pass the filename of that in to the texture, then use whatever the function was to set $basename or whatever it was to an RT texture, then render your movie to the RT texture?
[QUOTE=thomasfn;15178119][lua]self.flashlight = ents.Create( "env_projectedtexture" )
self.flashlight:SetParent( self.Entity )
// The local positions are the offsets from parent..
self.flashlight:SetLocalPos( Vector( 0, 0, 0 ) )
self.flashlight:SetLocalAngles( Angle(90,90,90) )
// Looks like only one flashlight can have shadows enabled!
self.flashlight:SetKeyValue( "enableshadows", 1 )
self.flashlight:SetKeyValue( "farz", 2048 )
self.flashlight:SetKeyValue( "nearz", 8 )
//Todo: Make this tweakable?
self.flashlight:SetKeyValue( "lightfov", 50 )
// Color.. Bright pink if none defined to alert us to error
self.flashlight:SetKeyValue( "lightcolor", self.m_strLightColor or "255 0 255" )
self.flashlight:Spawn()
self.flashlight:Input( "SpotlightTexture", NULL, NULL, self:GetFlashlightTexture() )[/lua]
So it needs a parent, thats ok. Just parent it to your projector entity? And I was thinking, since you pass the texture name in as a string, what happens if you make a blank 512x512 vmt, pass the filename of that in to the texture, then use whatever the function was to set $basename or whatever it was to an RT texture, then render your movie to the RT texture?[/QUOTE]
I'll give that a shot. Thanks.
[QUOTE=grea$emonkey;15178177]I'll give that a shot. Thanks.[/QUOTE]
If you get that working, then you've just made a major breakthrough - no other game I know of has dynamic projection like what we are talking about.
[QUOTE=thomasfn;15179405]If you get that working, then you've just made a major breakthrough - no other game I know of has dynamic projection like what we are talking about.[/QUOTE]
You make it sound so exciting! :D
Hehe, well it is, imagine all the things you can do. Digital projector for PCMod, maybe adding minigames so you can play pong on a wall of gm_construct, movies (like what you are doing), special effects for staged productions... wow, you made me excited now.
[QUOTE=thomasfn;15179636]Hehe, well it is, imagine all the things you can do. Digital projector for PCMod, maybe adding minigames so you can play pong on a wall of gm_construct, movies (like what you are doing), special effects for staged productions... wow, you made me excited now.[/QUOTE]
Dont get too excited. Might not work reliably in the end, Although I do with you the best of luck.
..why couldn't it display an animated texture, or a RT-screen?
Sorry, you need to Log In to post a reply to this thread.