lighting

How do I resolve this lighting bug in Unity?

社会主义新天地 提交于 2019-12-24 18:46:20
问题 This lighting issue in the top right corner of the picture provided is very annoying and not very good looking the light is supposed to look like all of the other ones around the scene but randomly some of them will appear like this. Does anyone know why and how to fix it. The lights are just spotlights shinning onto a place that is parallel to the source direction. 回答1: Thats because you have only 4 "pixel" lights. Go to Quality settings and increase that number :) 来源: https://stackoverflow

DirectX Lighting

不羁岁月 提交于 2019-12-24 00:59:39
问题 Hi. I've got a small game using directX10 and C++. However, I started making it using the meshloaderfromOBJ10 direct X sample and I have just been building on it. However, my objects are all looking just plain black althought they have colour. I know this is because of the light, but seemingly changing any of the code to do with the light does nothing from this sample. I was wondering if anyone knows a simple(ish) method to just light everything, as in make it bright everywhere. I don't care

Lighting and OpenGL ES

随声附和 提交于 2019-12-23 02:48:05
问题 I'm working on getting a simple lighting right on my OpenGL ES iPhone scene. I'm displaying a simple object centered on the origin, and using an arcball to rotate it by touching the screen. All this works nicely, except I try to add one fixed light (fixed w.r.t. eye position) and it is badly screwed: the whole object (an icosahedron in this example) is lit uniformly, i.e. it all appears in the same color. I have simplified my code as much as possible so it's standalone and still reproduces

In a TBN Matrix are the normal, tangent, and bitangent vectors always perpendicular?

泪湿孤枕 提交于 2019-12-20 02:32:25
问题 This is related to a problem described in another question (images there): Opengl shader problems - weird light reflection artifacts I have a .obj importer that creates a data structure and calculates the tangents and bitangents. Here is the data for the first triangle in my object: My understanding of tangent space is that the normal points outward from the vertex, the tangent is perpendicular (orthogonal?) to the normal vector and points in the direction of positive S in the texture, and

OpenGL Lighting on texture plane is not working

主宰稳场 提交于 2019-12-17 22:28:22
问题 I want to light to the texture plane but this is not work. Light on solid sphere is very well, but texture plane is not light. Whole Image Lighting on solid-sphere is working well. But, lighting on texture plane is not working. (GL_DECAL, GL_REPLACE; I also tried GL_MODULATE) This is a snippet of my rendering code. (Whole code on GitHub) Loading texture. sf::Image image; if (!image.loadFromFile(path)) return false; glGenTextures(1, &id); glBindTexture(GL_TEXTURE_2D, id); glTexImage2D( GL

OpenGL ES 1.1 is it possible to have both - vertexColors AND lighting?

瘦欲@ 提交于 2019-12-13 04:58:12
问题 If I have a mesh that uses vertexColors and then enable GL_LIGHTING, then the vertexColors will be ignored and replaced by the calculated lighting. Is there a way in OpenGL ES 1.1 to have both at the same time - vertex colors & dynamic lighting? thanks! 回答1: You can use glEnable(GL_COLOR_MATERIAL); to have the material parameters track the current color. On desktop OpenGL implementations there is also glColorMaterial to configure if the color is to be applied as the ambient of diffuse value,

Libgdx 3D - Point Light shows black box & rect (PointLight not working)

旧时模样 提交于 2019-12-13 00:59:45
问题 I am creating a 3d scene currently a box and rect, and trying to enable lighting. When i create a PointLight and add it to Environment everything turns to black color? all i want to do is create a 3d scene and enable point light, like a sun or rays coming from a point and shading the objects. Code: environment = new Environment(); environment.add(new PointLight().set(1f, 1f, 1f, 0, 0, 20f, 100f)); modelBatch=new ModelBatch(); .. square=new ModelBuilder().createBox(300,300,300,new Material

3D Lighting (OpenGl)

强颜欢笑 提交于 2019-12-12 17:09:24
问题 I already asked this question but I didn't get my answer. Btw I found some thing new.I want to show a 3D model from a wrl file exported by solid works.The file contains triangle's vertices and I am drawing them with glBegin(GL_TRIANGLES), But it doesn't looks nice and doesn't seems quite 3D! I tried gluSphere to draw an sphere in that scene with same lighting setting and it seems very nice and 3D!!!! Is there some thing about Glu ? Should I use Glu for draw triangles? 回答1: To get a good

Unity3D - Light deactivated when facing opposite direction

橙三吉。 提交于 2019-12-12 04:47:11
问题 I placed a light in my scene. It is lighting the ground when i'm facing that light but when I turn the opposite direction, the light on the ground vanishes. I think this might be some Unity's default behaviour. Is there a way I can solve this issue? 回答1: Unity uses frustum culling to save performance, so it only draws items that are within the camera's viewing area. As a result of this, the particles behind you are not drawn, and any lights attached to them aren't either. Scene-crucial lights

Three.js: object light & displacementMap

僤鯓⒐⒋嵵緔 提交于 2019-12-12 04:30:39
问题 I'm trying to make a realistic silver ring like this: with different colors and size. This is my result at this moment: As you can see my ring is not smooth. I don't know if it's a problem of the model, or of the code: There are my models ( i'm using 2 model, one for the light silver and another for the dark one ) light: http://www.websuvius.it/atma/myring/assets/3d/anello-1/interno.obj dark: http://www.websuvius.it/atma/myring/assets/3d/anello-1/esterno.obj This is part of my code: ... scene