Tag Info

New answers tagged

-1

I have the same problem. U have to set light Render priority. Click in point light (or other) in Hierarchy and in component "Light" change "Render Mode" to "Important"


0

I, you may have a look at Box2d light box2D light. The idea is to create shape in a box2D world and then use Box2D light to perform the shadow casting and light rendering. You then have to render the light on top of your scene.


0

I know its kind of old question but I see you got no answers and maybe its still relevant... why do you want to use additive blending instead of modulate blending (SDL_BLENDMODE_MOD)? with modulate the output is dstRGB = srcRGB * dstRGB, so you can make your lit areas brighter (while white is maximum lit) and dark areas are the shade. if I understood you ...


0

Im pretty sure the problem is caused by one point light being in the range of the other point light so, for lag issues Unity only renders one of these lights. This can be fixed by increasing the intensity of the light and decreasing the range of it.


1

When you want a really advanced light engine where objects create shadows, you should look into WebGL and use a 3d engine. But when you don't need accurate shading and only want objects to create cones of light which illuminate the canvas without respect to content, this is what you could do. Have two canvases, the normal scene and a second background ...


1

The easiest thing would be to create a gradient in Photoshop/Paint.NET/GIMP/whatever you use and blend that with your tile(s). If you want a more procedural approach, then take a look at Color.Lerp. A gradient with that method is simple. The first color parameter is the light shade, the second is the final dark shade and the progress is the row/column of ...


0

Fixing the table helped a lot, but the main issue I had was I was assigning the wrong AO values to the NegZ and PosZ face vertices. This meant that when I tried to fix things, other things broke as I tried to compensate for the unknown variable of the Z axis being rotated. The table in the original post is updated, but basically the side cases shouldn't ...


2

Convert them to the normalised space: float r1 = color1.r / 255.0f; float g1 = color1.g / 255.0f; float b1 = color1.b / 255.0f; float a1 = color1.a / 255.0f; float r2 = color2.r / 255.0f; float g2 = color2.g / 255.0f; float b2 = color2.b / 255.0f; float a2 = color2.a / 255.0f; and them multiply them: float r3 = r1 * r2; float g3 = g1 * g2; float b3 = b1 ...


0

The final color in Phong model depends on glossiness and specular reflectance of the material. If glossiness is very high or specular reflectance is low then the final color approaches albedo of the sphere. Otherwise the color approaches light color. If you render in low dynamic range (LDR) though you may get color saturation and unexpected results, e.g. ...


2

Unity has three kinds of lights that work in real-time: Directional, point, and spot. Point lights just sit somewhere and emit light in all directions, which sounds a lot like the sun, but you would have to put the light so far away from everything and make it so strong that it may be unreasonable. Spot lights are the same, except they emit light in a cone ...


0

I dont think that would happen, i havent use it how ever, but if u think about it, you are multiplying the light contribution with the object color as the equation you provide finalColor = ambient for light in lights: finalColor += light.specular + light.diffuse finalColor *= objectColor; and even in real live if you have a very shiny object like car ...


2

The problem isn't particularly with the additive math. Contributions from multiple light sources is resolved by addition. We can clearly see that in the rendering equation. As we see in the equation light contributions is integrated over the unit hemisphere containing all possible values for all light directions(Wi). In real time computer graphics we only ...


8

tl;dr func 1 1 - 2 * |(x mod 2) - 1| Or in your specific case: 1 - 2 * |((time % entireDay) - halfDay) / halfDay| You can even use a sinus wave instead (much more pretty). sin(x - pi/2) Sin Wave Or in your specific case: sin (- pi / 2 + 2 * pi * time / entireDay); Long tedious explaination in fine detail: If in military time: 00:00 ...



Top 50 recent answers are included