Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
37 views

Getting the Halo property of a point light in Unity

I am adding point lights in my scene ( max 6 ) and I want to be able to enable its Halo property via script. However in the documentation reference, they haven't mentioned how to enable the halo ...
1
vote
1answer
60 views

how to define a field of view for the entire map for shadow?

I recently added "Shadow Mapping" in my XNA games to include shadows. I followed the nice and famous tutorial from "Riemers" : http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series3/Shadow_map.php . ...
0
votes
1answer
203 views

HTML5 Canvas 2D lighting and normal maps [closed]

How using the HTML5 Canvas can I create a 2D game with light sources and also add an extra depth using normal maps. I have never really done lighting in 2D before and I'm not sure where to start. ...
11
votes
1answer
1k views

Is a Gaussian blur a fairly accurate representation of soft shadow edges?

I'm not sure if real life soft shadows (from close,large light sources) have a Gaussian or linear falloff, or something else. I'm working on something where I can create the shadows by manipulating ...
1
vote
1answer
193 views

Why Does unity_LightPosition[0] Seem to Depend on Camera Position?

I'm trying to write a fairly basic shader but I keep running into lighting issues with Unity. My first problem was trying to figure out which variable stored the light's position in world space. ...
2
votes
1answer
104 views

Specular map: What about the specular reflection's highlight' size?

I think I know what a specular map is and what it's used for (here is an example). http://www.rastertek.com/dx10tut21.html One of the models of specularity that are highly popular is Phong. In Phong ...
16
votes
3answers
3k views

What is the utility of squared radius and inverse squared radius for lighting computations?

On one of the slides from "DirectX 11 Rendering in Battlefield 3" PowerPoint I noticed the folowing code: struct Light { float3 pos; float sqrRadius; float3 color; float invSqrRadius; } I ...
0
votes
0answers
604 views

Unity 2D - SpotLight and Shadow

I've been having some trouble in the process of creating my 2D game. Here is the thing, i want to create a light source on the top of the screen, blocked by some rocks and letting only go through some ...
0
votes
1answer
583 views

Unity - Light and sprite collision

I'm a beginner in Unity and i'm facing a little problem / question. The main purpose of my 2D game is based on the mouvment of a specific light and the player have to avoid getting inside his rays. My ...
1
vote
0answers
275 views

LibGDX - Box2D: Realistic Light and Layers

I'm having some problems with my current game. Short description: It's a 2D game where you have to avoid the lights or you lose HP. My problem is the following one: Here is the rendering process: ...
1
vote
1answer
166 views

Center directional light shadow to the cameras eye

I'm currently drawing my directional light shadow using this view and projection: XMFLOAT3 dir((float)pitch, (float)yaw, (float)roll); XMFLOAT3 center(0.0f, 0.0f, 0.0f); XMVECTOR lightDir = ...
1
vote
1answer
210 views

Spot Light color fade in Unity 3d

I have a scene where many spot lights are focused on the screen. All have red color and same intensity. What I want is that the red Color(0,0,0,1) value should increase and decrease in a fading effect ...
5
votes
1answer
274 views

What light attenuation function does UDK use?

I'm a big fan of the light attenuation in UDK. Traditionally I've always used the constant-linear-quadratic falloff function to control how "soft" the falloff is, which gives three values to play ...
0
votes
1answer
466 views

Use light cone/range as a Trigger

I was wondering, in Unity 3D, how I could do something with the Spot Light (Range/cone) as a trigger? Since it would be very interesting to be able to manipulate whats actually in sight of Light ...
2
votes
1answer
466 views

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

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 ...
0
votes
1answer
364 views

Creating a light that follows the player

How do I create a point light that follows the player character when they walk around? The light should shine on the player and not on a fixed point.
1
vote
1answer
133 views

XNA Strange Lighting, Shader

Hey guys, i have strange lighting problem. I've written my own "deferred lighting" shader and this happend: Pic: Normal-Map Pic: Light-Map As long as i only use one big mesh everything seems ...
3
votes
1answer
270 views

Directional light shader not behaving as expected

I coded my first glsl shader which manage diffuse and specular effects of a directional light. This is the fragment shader. #version 120 //matrix uniform mat4 model_matrix; //directional light ...
2
votes
1answer
242 views

GLSL Multiple Uniform Structs

I'm developing a lighting system for my voxel game, and I have to send multiple (alot, say up to 200) lights to my shader program. Those lights contain the following data: Position (vec3) Color ...
2
votes
1answer
165 views

front and back face detection

I am trying to implement a dynamic shadow system for a 2d game using this tutorial : ...
3
votes
3answers
162 views

How do you accommodate newbies while still creating depth in the design of light/dark systems for MUDs (or other text-based games)?

I've been pondering a redesign of our MUD's light/dark system. Our current system accommodates new players by simply not saddling them with being unable to see should they happen to wander outside of ...
13
votes
2answers
2k views

How do I blend 2 lightmaps for day/night cycle in Unity?

Before I say anything else: I'm using dual lightmaps, meaning I need to blend both a near and a far. So I've been working on this for a while now, I have a whole day/night cycle set up for renderers ...
1
vote
2answers
505 views

What is the color value of daylight?

This is a very short question. I want to implement ambient light in the color of daylight from the sun. What is the color value of sun light?
6
votes
1answer
592 views

How do I reconstruct depth in deferred rendering using an orthographic projection?

I've been trying to get my world space position of my pixel but I'm missing something. I'm using a orthographic view for a 2.5d game. My depth is linear and this is my code. float3 lightPos = ...
0
votes
1answer
321 views

How can I simulate light using mask images on the iPad? [duplicate]

Possible Duplicate: Can I achieve a torchlight effect (lighter area around a light source) in a 2D game? I want to have a picture as a background, say this: Then I would like to apply a ...
1
vote
2answers
395 views

Lights system with shaders in OpenGL?

In more than just 1 occasion, i read about 2 ways of doing a light's system in OpenGL: normal way? i don't know how to call this one with the shaders ( GLSL ) The problem is i don't get the ...
0
votes
2answers
730 views

Lighting with VBO

INTRO I'm using a Java JOGL wrapper called processing.org and I have coded some environment on it and I'm quite proud of it even if it has some library stuff that I didn't know anything about it ...
2
votes
1answer
268 views

Animated light effects in games

I have been wondering now for quite some time, how certain animated texture effects are done, specifically involving light effects. Some good examples of what I mean are the green bridges in ...
0
votes
2answers
2k views

Making a Point Light follow a cube (Unity)

I'm trying to have a point light positioned directly above a cube follow wherever the cube goes. However, it doesn't move at all. This is my code for the light: using UnityEngine; using ...
2
votes
2answers
5k views

XNA a Simple 2D Point Light

I want to make a 2D Point Light in XNA, I was able to find some helpful information but it is too advance for me, since i know nothing about Shaders ...
3
votes
1answer
224 views

Is there a standard camera position / orientation?

I've come across a need to position a camera for an arbitrary (unknown) scene. The camera can be updated later, but I thought I'd give it a reasonable default, and the thought crossed my mind that ...