Search Results

Search found 437 results on 18 pages for 'lights'.

Page 1/18 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Fast lighting with multiple lights

    - by codymanix
    How can I implement fast lighting with multiple lights? I don't want to restrain the player, he can place an unlimited number and possibly overlapping (point) lights into the level. The problem is that shaders which contain dynamic loops which would be necessary to calculate the lighting tend to be very slow. I had the idea that if it could be possible at compiletime to compile a shader n times where n is the number of lights. If the number n is known at compiletime, the loops can be unrolled automatically. Is this possible to generate n versions of the same shader with just a different number of lights? At runtime I could then decide which shader to use for which part of the level.

    Read the article

  • Fast lighting with multple lights

    - by codymanix
    How can I implement fast lighting with multiple lights? I don't want to restrain the player, he can place an unlimited number and possibly overlapping (point) lights into the level. The problem is that shaders which contain dynamic loops which would be necessary to calculate the lighting tend to be very slow. I had the idea that if it could be possible at compiletime to compile a shader n times where n is the number of lights. If the number n is known at compiletime, the loops can be unrolled automatically. Is this possible to generate n versions of the same shader with just a different number of lights? At runtime I could then decide which shader to use for which part of the level.

    Read the article

  • Keyboard lights sometimes stay on after PC is powered off. Why?

    - by Vilx-
    Sometimes when I power off my PC some lights on the keyboard stay on. It's pretty random which ones, though I suspect it has something to do with what lights were on just before the shutdown (if I vigorously follow that they are all off while the PC is shutting down then they stay off). Not that this would change anything, but it is annoying. Why does this happen and how can I avoid it? Added: I know that I can turn off the power completely to my computer and it will go off. That's not the point. Actually, I even want my keyboard to have power, because I use it to turn on my computer (the power button on the case is difficult to reach). I just want the lights to go off. Or at least understand why this happens. Oh, and it's a PS2 keyboard.

    Read the article

  • Light mask map and camera for static lights in XNA Platformer

    - by JiminyCricket
    Using the example for some basic light maps found here : http://blog.josack.com/2011/07/xna-2d-dynamic-lighting.html, I've managed to create a lightmap texture using individual lightmaps and display it over a 2D tiled world as in the Platformer example. I'm using the very basic 2D camera example as found here : http://www.david-amador.com/2009/10/xna-camera-2d-with-zoom-and-rotation/, and the problem is that the lightmap texture scrolls with the player sprite. This looks pretty good and would be excellent for lighting the player sprite as it moves. But, I also want to be able to place static lights (or some initial position for the lights) that do not move with the player or camera. When I turn off the camera or give it a static position, it works as a series of static lights so I believe it's probably caused by the camera transformation matrix following the player around. I'm using RenderTarget2Ds, one for the main game screen after all the backgrounds and tiles are rendered, and one for the "lightmap" which consists of a black background and a bunch of lighting textures which are merged with it using additive blending. For now, I'm doing all of this in PlatformerGame.cs where the camera transformation and position is set and the level.Draw() call is made. I can't figure out how to separate the drawing of the lightmap and the camera following the player. I was thinking it would be better to render the shadows and lighting directly in the drawing of the level itself, but I'm not sure how to do that either because this technique requires RenderTarget2Ds and calling SpriteBatch.Begin()/End().

    Read the article

  • Office lights on or off in programming department? How to decide? [closed]

    - by smp7d
    At my company, the programmers who sit in the same area are constantly fighting over whether the lights stay on or off. Because there is no official policy it makes it a particularly sticky situation. We are a typical cube-farm and we have those typical cube-farm fluorescent lights and smaller ones at our desks. With the lights off, it is difficult to read and you would probably need to turn on your desk light (which some people do anyway). All programmers in our department do most of their reading on their monitor because of the nature of our business. Some feel that we should have a vote to decide whether the lights stay on or off. A couple who prefer 'lights on' feel that the vote would need to be unanimous to turn them off as having them on is the more natural office setting. Those who want them off point out that all other departments keep their lights off. I have heard all of the arguments: -Fluorescent lights cause eye strain -Reading in dark causes eye strain -The desk lights can be used if light is needed -People from other departments feel uncomfortable approaching us in the "dark" -The monitors are harder to see in the light ... Right now, some of the developers turn off the lights and some turn them on. It really just depends who last walked by the switch. I am a bit sick of the controversy as it feels a bit childish at the moment. I'm tired of hearing about it and I'm tired of having to talk about it. I tried to help them decide but as I explained, voting wasn't enough. Do other programming departments have this same argument? What is the standard or traditionally accepted option in a programming area? Are there any good reasons for one way or the other outside of preference? How can we decide fairly? EDIT Just a little more info... We do not have clients/visitors come into our office. We do have windows and hall lights that make our environment plenty bearable with the lights off. It kind of resembles a meeting room that has the lights off during a powerpoint presentation.

    Read the article

  • Create Your Own Geeky LED Holiday Lights with Old Bottles

    - by YatriTrivedi
    Who needs to go buy store-bought lights? Here’s a great geek project for the holidays that’s fairly easy to put together with things most geeks already have. My friend, Chris “Groff” Groff, had the great idea to work up some holiday lights using stuff he had lying around, and a few hours later things turned out quite geeky indeed. Materials Latest Features How-To Geek ETC The How-To Geek Holiday Gift Guide (Geeky Stuff We Like) LCD? LED? Plasma? The How-To Geek Guide to HDTV Technology The How-To Geek Guide to Learning Photoshop, Part 8: Filters Improve Digital Photography by Calibrating Your Monitor Our Favorite Tech: What We’re Thankful For at How-To Geek The How-To Geek Guide to Learning Photoshop, Part 7: Design and Typography Fun and Colorful Firefox Theme for Windows 7 Happy Snow Bears Theme for Chrome and Iron [Holiday] Download Full Command and Conquer: Tiberian Sun Game for Free Scorched Cometary Planet Wallpaper Quick Fix: Add the RSS Button Back to the Firefox Awesome Bar Dropbox Desktop Client 1.0.0 RC for Windows, Linux, and Mac Released

    Read the article

  • Hack Your Lights for Remote Control

    - by Jason Fitzpatrick
    This clever hack combines a modified wall switch with unused buttons on a universal remote to create one-touch wireless control of the lighting in a media room. Andrew, the tinker behind this home theater hack, writes: I really liked the idea of controlling my “Home Theater” lights with a remote (TV or other), this would save me the exhausting task of heaving myself off the couch to turn the lights on or off. I found one of my remotes has a spare power button, its one of those stupid “universal” remotes that comes with DVD players or TVs but only work if you have all the same brand equipment, I don’t so this made a good option for a light switch. Hit up the link below to check out more photos of his project and download the source code. Why Does 64-Bit Windows Need a Separate “Program Files (x86)” Folder? Why Your Android Phone Isn’t Getting Operating System Updates and What You Can Do About It How To Delete, Move, or Rename Locked Files in Windows

    Read the article

  • Multiple volumetric lights

    - by notabene
    I recently read this GPU GEMS 3 article Volumetric Light Scattering as a Post-Process. I like the idea to add volumetric light property to realtime render i'm working on. Question is will it work for multiple lights? Our renderer uses one render pass per light and uses additive blending to sum incoming light. I'm mostly convinced that it have to work nice. Do you agree? Maybe there can be problem where light rays crosses each other.

    Read the article

  • Directional Lights

    - by Setrio
    I'm working on a game idea (2D) that needs directional lights. Basically I want to add light sources that can be moved and the light rays interact with the other bodies on the scene. What I'm doing right now is some test where using sensors (box2d) and ccDrawLine I could achieve something similar to what I want. Basically I send a bunch of sensors from certain point and with raycast detect collisions, get the end points and draw lines over the sensors. Just want to get some opinions if this is a good way of doing this or is other better options to build something like this? Also I would like to know how to make a light effect over this area (sensors area) to provide a better looking light effect. Any ideas?

    Read the article

  • Shadow mapping with deffered shading for directional lights - shadow map projection problem

    - by Harry
    I'm trying to implement shadow mapping to my engine. I started with directional lights because they seemed to be the easiest one, but I was wrong :) I have implemented deferred shading and I retrieve position from depth. I think that there is the biggest problem but code looks ok for me. Now more about problem: Shadow map projected onto meshes looks bad scaled and translated and also some informations from shadow map texture aren't visible. You can see it on this screen: http://img5.imageshack.us/img5/2254/93dn.png Yelow frustum is light frustum and I have mixed shadow map preview and actual scene. As you can see shadows are in wrong place and shadow of cone and sphere aren't visible. Could you look at my codes and tell me where I have a mistake? // create shadow map if(!_shd)glGenTextures(1, &_shd); glBindTexture(GL_TEXTURE_2D, _shd); glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 1024, 1024, 0, GL_DEPTH_COMPONENT, GL_FLOAT,NULL); // shadow map size glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, _shd, 0); glDrawBuffer(GL_NONE); // setting camera Vector dire=Vector(0,0,1); ACamera.setLookAt(dire,Vector(0)); ACamera.setPerspectiveView(60.0f,1,0.1f,10.0f); // currently needed for proper frustum corners calculation Vector min(ACamera._point[0]),max(ACamera._point[0]); for(int i=0;i<8;i++){ max=Max(max,ACamera._point[i]); min=Min(min,ACamera._point[i]); } ACamera.setOrthogonalView(min.x,max.x,min.y,max.y,-max.z,-min.z); glBindFramebuffer(GL_DRAW_FRAMEBUFFER, _s_buffer); // framebuffer for shadow map // rendering to depth buffer glBindFramebuffer(GL_DRAW_FRAMEBUFFER, _g_buffer); Shaders["DirLight"].set(true); Matrix4 bias; bias.x.set(0.5,0.0,0.0,0.0); bias.y.set(0.0,0.5,0.0,0.0); bias.z.set(0.0,0.0,0.5,0.0); bias.w.set(0.5,0.5,0.5,1.0); Shaders["DirLight"].set("textureMatrix",ACamera.matrix*Projection3D*bias); // order of multiplications are 100% correct, everything gives mi the same result as using glm glActiveTexture(GL_TEXTURE5); glBindTexture(GL_TEXTURE_2D,_shd); lightDir(dir); // light calculations Vertex Shader makes nothing related to shadow calculatons Pixel shader function which calculates if pixel is in shadow or not: float readShadowMap(vec3 eyeDir) { // retrieve depth of pixel float z = texture2D(depth, gl_FragCoord.xy/screen).z; vec3 pos = vec3(gl_FragCoord.xy/screen, z); // transform by the projection and view inverse vec4 worldSpace = inverse(View)*inverse(ProjectionMatrix)*vec4(pos*2-1,1); worldSpace /= worldSpace.w; vec4 coord=textureMatrix*worldSpace; float vis=1.0f; if(texture2D(shadow, coord.xy).z < coord.z-0.001)vis=0.2f; return vis; } I also have question about shadows specifically for directional light. Currently I always look at 0,0,0 position and in further implementation I have to move light frustum along to camera frustum. I've found how to do this here: http://www.gamedev.net/topic/505893-orthographic-projection-for-shadow-mapping/ but it doesn't give me what I want. Maybe because of problems mentioned above, but I want know your opinion. EDIT: vec4 worldSpace is position read from depht of the scene (not shadow map). Maybe I wasn't precise so I'll try quick explain what is what: View is camera view matrix, ProjectionMatrix is camera projection,. First I try to get world space position from depth map and then multiply it by textureMatrix which is light view *light projection*bias. Rest of code is the same as in many tutorials. I can't use vertex shader to make something like gl_Position=textureMatrix*gl_Vertex and get it interpolated in fragment shader because of deffered rendering use so I want get it from depht buffer. EDIT2: I also tried make it as in Coding Labs tutorial about Shadow Mapping with Deferred Rendering but unfortunately this either works wrong.

    Read the article

  • DIY Super Mario “Kite” Lights Up the Sky [Video]

    - by Jason Fitzpatrick
    Throw some LEDs in helium balloons, string them together in a pixel-style grid, and you’ve got yourself a massive and glowing 8-bit sprite (in this case, a giant Super Mario). Read on to watch the video and see how you can build your own. Check out the video notes for more information on constructing it or, hit up the link below for more projects by Mark Rober. Mark Rober’s Project Blog [Make] HTG Explains: What Is RSS and How Can I Benefit From Using It? HTG Explains: Why You Only Have to Wipe a Disk Once to Erase It HTG Explains: Learn How Websites Are Tracking You Online

    Read the article

  • Blender Object Appearing Gray when all Lights are Off

    - by celestialorb
    I have an issue with Blender where, when I turn my only light off (a sun lamp) and render the image my object appears gray rather than black (and thus, not appear to the camera). I can't figure out why this is happening. Here's what I just did in my scene: Added a new UV Sphere mesh (to make a total of two spheres), made it visible to the camera, turned off the sun lamp (by setting energy to 0), and rendered. The result I obtained is below. I discovered this when attempting to render the first sphere with a material/texture on it and it was too bright. The material on the spheres (which are different) are very basic, there's no emit, diffuse and specular are at default values. Could there be an issue with the way my camera is setup? Thanks in advance!

    Read the article

  • Computer-controlled Lights and Music Synced into Christmas Rock Spectacular

    - by Jason Fitzpatrick
    This spectacular computer controlled and synchronized lighting display combines thousands of feet of LED lighting, multiple controllers, and a rock medley to great effect. The above display started life as the personal Christmas light display of Sioux Falls, ND resident Joe Noe. When Noe moved, he donated his display to a local mall in order to preserve the tradition of people stopping by to see it and making donations to the Make-A-Wish foundation. The local mall, Western Mall, expanded the display and added in even more LEDs and controllers. The end result is an impressive display synced to a Christmas rock medley by UK musician Richard Campbell. [via Mashable] Secure Yourself by Using Two-Step Verification on These 16 Web Services How to Fix a Stuck Pixel on an LCD Monitor How to Factory Reset Your Android Phone or Tablet When It Won’t Boot

    Read the article

  • Linksys WRT54GC v2.0 - all connection lights flashing

    - by JC Denton
    I have just received a Linksys WRT54GC router of a friend. Apperantly it has stopped working. All lights on it are flashing apart from the power and wireless light. I have read of similar issues online but not ones describing the same set of lights flashing. I have tried connecting to the device over ethernet but failed. It's no longer accessible over wireless either. I've also tried to run the linksys utility on the cd but it failed to detect the presence of the device (attempted over ethernet, firewall switched off). I've tried pressing the reset button for 30 seconds and disconnection the power cable for 30 seconds but to no avail. Thanks for any thoughts

    Read the article

  • "Turn Off The Lights" on any website?

    - by gojira
    On Youtube, there is this nice button (easy to overlook - top left of the video) which lets one "turn off the lights": the site background changes from white to black, the text color changes from black to grey. There is an unrelated plug-in for Firefox called "Turned Off The Lights", which has a very similar functionality. This makes websites so much easier to read. However, both technologies only work on YouTube. Is there anything to achive the same effect for all websites? Preferably with Firefox? I.e.: I want to have very dark background and light text color on all websites viewed with Firefox, how can I do that?

    Read the article

  • Computer doesn't start up apart from lights/noise

    - by Casebash
    One of my computers doesn't boot up or at least nothing appears on my screen (not even the bios). It still makes some noise and the lights stay on, but not any beeping like I have heard computer make when start up fails. Before this happened my screen would occasionally have a strange image appear than crash (usually around startup). It would also sometimes just freeze without the image appearing. Any suggestions for how I can attempt to identify the problem?

    Read the article

  • Way to dim outside windows / Turn the lights feature

    - by droidgren
    I am looking for a way to replicate the "Dim out" or "Turn the lights off" feature (that can be seen on various video sites on the web) into Windows ? This will darken (dim out) the active window. It could be a windows shell extension/plugin or a video player plugin that has this feature. The reason for I am looking for this is that I have a rather large monitor and doesn't use the whole screen when watching movies.

    Read the article

  • Setting the values of a struct array from JS to GLSL

    - by mikidelux
    I've been trying to make a structure that will contain all the lights of my WebGL app, and I'm having troubles setting up it's values from JS. The structure is as follows: struct Light { vec4 position; vec4 ambient; vec4 diffuse; vec4 specular; vec3 spotDirection; float spotCutOff; float constantAttenuation; float linearAttenuation; float quadraticAttenuation; float spotExponent; float spotLightCosCutOff; }; uniform Light lights[numLights]; After testing LOTS of things I made it work but I'm not happy with the code I wrote: program.uniform.lights = []; program.uniform.lights.push({ position: "", diffuse: "", specular: "", ambient: "", spotDirection: "", spotCutOff: "", constantAttenuation: "", linearAttenuation: "", quadraticAttenuation: "", spotExponent: "", spotLightCosCutOff: "" }); program.uniform.lights[0].position = gl.getUniformLocation(program, "lights[0].position"); program.uniform.lights[0].diffuse = gl.getUniformLocation(program, "lights[0].diffuse"); program.uniform.lights[0].specular = gl.getUniformLocation(program, "lights[0].specular"); program.uniform.lights[0].ambient = gl.getUniformLocation(program, "lights[0].ambient"); ... and so on I'm sorry for making you look at this code, I know it's horrible but I can't find a better way. Is there a standard or recommended way of doing this properly? Can anyone enlighten me?

    Read the article

  • Substrings, timer and LED lights, as3

    - by VideoDnd
    How would I sync my timer with my LED lights? I don't understand how to to set up the strings and conditions, so that they are unique to each number space. Need a condition and values for each blinker var condition:Number = 5; if(condition==5){ blink.visible = !blink.visible; //blink_.visible = !box.visible; //blink__.visible = !box.visible; } } Complete code //MY TIMER var timer:Timer = new Timer(100); //INTEGER VALUES var count:int = 0; var fcount:int = 0; var oldcount:int = 0; //FORMATTING STRING function formatCount(i:int):String { var fraction:int = i % 100; var whole:int = i / 100; return ("00" + whole).substr(-2, 2) + "." + (fraction < 10 ? "0" + fraction : fraction); } //START TIMER timer.start(); timer.addEventListener(TimerEvent.TIMER, condition); //ANIMATION function condition(event:TimerEvent):void{ count++; fcount=int(count) var toText:String = formatCount(fcount); dec.text = toText.substr(4, 1); decimal.text = toText.substr(3, 1); ones.text = toText.substr(1, 1); //LED LIGHTS var condition:Number = 5; if(condition==5){ blink.visible = !blink.visible; //blink_.visible = !box.visible; //blink__.visible = !box.visible; } }

    Read the article

  • Notification doesn't play sound or show lights even though set to

    - by robintw
    In my android application I have the following code: Notification notification = new Notification(icon, tickerText, when); context = context.getApplicationContext(); CharSequence contentTitle = "UK Radio Guide"; CharSequence contentText = title + " on " + channel_id + " at " + start; Intent notificationIntent = new Intent(context, ViewSchedules.class); PendingIntent contentIntent = PendingIntent.getActivity(context, 0, notificationIntent, 0); notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent); notification.ledARGB = 0xff00ff00; notification.ledOnMS = 300; notification.ledOffMS = 1000; notification.flags |= Notification.FLAG_SHOW_LIGHTS; notification.sound = Uri.parse("android.resource://com.robinwilson.radioguide/" +R.raw.chimes); notification.vibrate = new long[] { 0, 300, 200, 300, 400, 300 }; // Actually send the notification nm.notify(0, notification); As far as I am aware, I have followed the steps in the documentation to set it to play a sound from the resources folder, and to flash the lights. However, neither of these happen. It does, however, vibrate, as instructed. Any ideas what I'm doing wrong here? I've looked through the permissions that I can give the app in the AndroidManifest.xml file, but I can't see one for letting it flash the light or make sounds.

    Read the article

  • Lights off effect and jquery placement on wordpress

    - by Alexander Santiago
    I'm trying to implement a lights on/off on single posts of my wordpress theme. I know that I have to put this code on my css, which I did already: #the_lights{ background-color:#000; height:1px; width:1px; position:absolute; top:0; left:0; display:none; } #standout{ padding:5px; background-color:white; position:relative; z-index:1000; } Now this is the code that I'm having trouble with: function getHeight() { if ($.browser.msie) { var $temp = $("").css("position", "absolute") .css("left", "-10000px") .append($("body").html()); $("body").append($temp); var h = $temp.height(); $temp.remove(); return h; } return $("body").height(); } $(document).ready(function () { $("#the_lights").fadeTo(1, 0); $("#turnoff").click(function () { $("#the_lights").css("width", "100%"); $("#the_lights").css("height", getHeight() + "px"); $("#the_lights").css({‘display’: ‘block’ }); $("#the_lights").fadeTo("slow", 1); }); $("#soft").click(function () { $("#the_lights").css("width", "100%"); $("#the_lights").css("height", getHeight() + "px"); $("#the_lights").css("display", "block"); $("#the_lights").fadeTo("slow", 0.8); }); $("#turnon").click(function () { $("#the_lights").css("width", "1px"); $("#the_lights").css("height", "1px"); $("#the_lights").css("display", "block"); $("#the_lights").fadeTo("slow", 0); }); }); I think it's a jquery. Where do I place it and how do I call it's function? Been stuck on this thing for 6 hours now and any help would be greatly appreciated...

    Read the article

  • Can observer pattern be represented by cars and traffic lights?

    - by eeerahul
    I wanted to verify with all of you, if I have a correct Observer Pattern analogy. The scenario is as follows: Consider, at a junction, there is a traffic signal, having red, yellow and green lights respectively. There are vehicles facing the traffic signal post. When it shows red, the vehicles stop, when it shows green, the vehicles move on. In case, it is yellow, the driver must decide whether to go or to stop, depending on whether he/she has crossed the stop line or not. At the same time, there are vehicles that do not care about the signal. They would do as they like. The similarities are that, the Traffic Signal happens to be the subject, notifying its states by glowing the appropriate lights. Those looking at it and following the signal are the ones subscribed to it, and behave according to the state of the subject. Those who do not care about it, are sort-of un-subscribed from the traffic signal. Please tell me, if you think this is a correct analogy or not?

    Read the article

  • Large scale perspective lights casting shadow maps, in the most optimized way?

    - by meds
    I'm using projected texture shadows coupled with lights to light a large sports field at night. To do this I'm using shadow cameras which I place in the position of the stadiums lights and shine it down on the field at the appropriate angle. The problem with this method is the textures to which I render the shadows into have to be very large so they can keep sufficient detail over the entire stadium. This is incredibly under optimized since at any given point the players attention is only directed on a small portion of the field meaning large chunks of the texture just take up space wit no benefits. However the issue is the lights need to be perspective based as they come from actual directional lights hovering over the stadium. The way to solve this, I believe, is to figure out in the shadow cameras view matrix it would be to place the actual camera to render from, and adjust the view matrix accordingly to the position it is. So my question is, how can I calculate the optimal position to put the shadow camera and calculate its view matrix such that the shadows it projects will appear to be coming from the light source rather than the camera?

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >