Search the Community
Showing results for tags 'monitor'.
The search index is currently processing. Current results may not be complete.
-
I downloaded XBOCT's Monitor from workshop. I got it working, but I wonder why it shows my HUD elements in the upper left corner of the "virtual" screen? What am I missing? Edit. Added code from the monitor --------------------------------------------------------------------------- -- Film Grain (Monitor) by Igor Katrich 28/02/20015 -- Email: igorbgz@outlook.com --------------------------------------------------------------------------- Script.camera=""--entity "Camera" Script.border_radius=2.0--float "Border Radius" Script.inflate_rect=50.0--float "Inflate Rect" function Script:Start() --Material self.material = Material:Load("Materials/Monitor/monitor.mat") self.entity:SetMaterial(self.material) --Context self.context = Context:GetCurrent() --Media self.defaultfont = self.context:GetFont() self.recellipse = Texture:Load("Materials/Monitor/Media/ellipse.tex") self.recblend = 0.0 self.digitalfont = Font:Load("Materials/Monitor/Media/digital.ttf",30) self.context:SetFont(self.digitalfont) self.digitalfont:Release() --Buffer self.buffer = Buffer:Create(128,128,1,0); local color = Texture:Create(context:GetWidth(),context:GetHeight()) self.buffer:SetColorTexture(color) self.buffer:Disable(); end function Script:UpdateWorld() self.buffer:Enable() self.camera:Show() --world:Render() self.camera:Hide() self.buffer:Disable() self.context:SetBlendMode(Blend.Alpha) --Border self.context:SetColor(1,1,1,0.2) self.context:DrawRect(self.inflate_rect,self.inflate_rect,self.border_radius,self.context:GetHeight()-self.inflate_rect*2.0) self.context:DrawRect(self.context:GetWidth()-self.inflate_rect-self.border_radius,self.inflate_rect,self.border_radius,self.context:GetHeight()-self.inflate_rect*2.0) self.context:DrawRect(self.inflate_rect+self.border_radius,self.inflate_rect,self.context:GetWidth()-(self.inflate_rect*2.0)-self.border_radius*2.0,self.border_radius) self.context:DrawRect(self.inflate_rect+self.border_radius,self.context:GetHeight()-self.inflate_rect-self.border_radius,self.context:GetWidth()-(self.inflate_rect*2.0)-self.border_radius*2.0,self.border_radius) --Rec self.recblend = Math:Sin(Time:GetCurrent()*.4)-0.2 self.context:SetColor(1,1,1,self.recblend) self.context:DrawImage(self.recellipse,self.context:GetWidth()-26-48-self.inflate_rect-self.border_radius-10,self.inflate_rect+self.border_radius+10,26,26) self.context:SetColor(1,1,1,0.5) --Text self.context:DrawText("REC",self.context:GetWidth()-45-self.inflate_rect-self.border_radius-10,self.inflate_rect+self.border_radius+10+1) self.context:DrawText(self.camera:GetKeyValue("name"),self.inflate_rect+self.border_radius+10,self.context:GetHeight()-self.inflate_rect-self.border_radius-10-25) self.context:SetBlendMode(Blend.Solid) Context:SetCurrent(context) local color = self.buffer:GetColorTexture() self.material:SetTexture(color,0) end function Script:Cleanup() self.digitalfont:Release() self.defaultfont:Release() end I also have another question. If I want to show text, graphics etc on the wall, I just remove world:render() from the monitor script and use it to draw text etc.? What I mean to ask, is this the "right" way, or is there a better way to show text and graphics on wall, like a screen or maybe even a poster, sign etc.
-
Hi, I'm trying to create a computer terminal so that I can save it as a prefab. Only thing is, every kind of light I try to use is wrong. A point light reflects off of the screen. I want the screen to be the thing emitting light (or make it look like it). I want the screen to give off light without a light shining on it. I searched the forum, and I found this post asking the same thing, but I can't find a glow shader anywhere. http://www.leadwerks.com/werkspace/topic/5894-does-lw-have-an-illumination-map/page__hl__computer+screen If anyone can help me, I thank you in advance.