Comments (14)
Could you please specify the following:
-What, specifically, is occurring? (i.e. What pointlights are currently doing to the plane mesh)
-What, specifically, did you expect to happen instead? (i.e. What are pointlights doing to the pyramid that they aren't doing to the plane)
-A detailed step by step process to reproduce the issue
Thanks!
from 3dgameengine.
- I can't see the pointlights at all on the plane while I can see them perfectly on the pyramid mesh
- I expect to see the pointlights apply their light to the plane (which they don't right now)
- When you uncomment the first vertex and int array (the pyramid mesh) and comment the second vertex and int array (the plane mesh) you'll see the pointlights, but when you comment the pyramid mesh again and uncomment the plane mesh you can't see the pointlights.
from 3dgameengine.
I had the same problem.
You should try to:
- try to calc the normals by hand
from 3dgameengine.
Well, I thought it had something to do with the normals, so I downloaded Benny's code and looked at the calculated normals (by printing it using .toString()) which matched up with my normals. I don't think it has something to do with that.
from 3dgameengine.
ups..
- it fixed it for me to turn of cull facing.
In the end this was the Problem and solution:
the calc normals method from benny adds all normals on one vertex just together. But if you do that on a plane you just end up with a 0- Vector -> no direction is up -> no light at all is reflected.
To solve this problem I implemented a check if the angle between the two normals is too big.
If it is i add a new Vertex vith ist own normal and change the index of the triangle.
I have re-written bennys method but I have not tested it jet.
Hope I could help.
from 3dgameengine.
Is the Plane just dark or is it bright but not light by the pointlight?
from 3dgameengine.
It's dark, but I can't see the pointlight on it.
from 3dgameengine.
in wich class do you test it? i just downloaded the engine...
from 3dgameengine.
and its not the source code. You uploaded the compiled files...
from 3dgameengine.
How about this one? http://ikbenerik.nl/Engine2.rar
I tested it in the Mesh class.
from 3dgameengine.
sorry i cannot find any mistake in your code at the moment.
I will look at it later again. :)
from 3dgameengine.
Here's something that's stood out to me:
In your phong vertex shader, you're calculating the worldPosition from the vertex normal rather than the vertex position. I don't know if that's your issue, but it probably isn't what you intended to do.
from 3dgameengine.
Thanks Benny, that actually fixed it!
from 3dgameengine.
In that case, issue closed :)
from 3dgameengine.
Related Issues (18)
- F# discrepancy HOT 3
- Fix Y-axes camera HOT 5
- finalize method HOT 5
- Mesh-Optimisation HOT 3
- Your Input class is unneeded. HOT 3
- Texture flipping HOT 3
- Weird If statement HOT 3
- sampling.glh missing HOT 4
- Unneeded re-declaration of lights HOT 2
- No Compatible Shaders for Mac HOT 2
- #8 No Triangle Displayed HOT 1
- Mesh Rendering HOT 5
- seg fault HOT 1
- cannot convert from 'const 4-component vector of highp float' to 'FragUserData 3-component vector of highp float' HOT 1
- After tutorial 47, the camera has inheritance issues
- Camera's orientation gets locked into place HOT 1
- IDEA Dont sees src as a source folder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 3dgameengine.