473,320 Members | 2,164 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Three.js lighting problem

93 64KB
Hello! I'm trying to set up a scene in THREE.js using some different lighting sources, but the "floor" only reacts to AmbientLight (removed in three.js scene) and should be lit about the same as in the blender view. I've verified the normals on the model point outwards and the material has default blender material settings as THREE.MeshLambertMaterial.

Light settings:
Expand|Select|Wrap|Line Numbers
  1. const spotLight = new THREE.SpotLight('#ffffff');
  2. spotLight.position.set(0, 10, 0);
  3. spotLight.angle = Math.PI / 4.5;
  4. spotLight.intensity = spotLightIntensity / 2;
  5. spotLight.penumbra = 0.5;
  6. this.scene.add(spotLight);
  7. const spotLight2 = new THREE.SpotLight('#ffffff');
  8. spotLight2.position.set(0, 5, 0);
  9. spotLight2.angle = Math.PI / 7;
  10. spotLight2.intensity = 1;
  11. spotLight2.penumbra = 0.5;1505d2299138ef64a8fa667388a2e36419f
  12. this.scene.add(spotLight2);
Please state if any more information is needed.
Does anyone have any idea as of why?

Three.js scene:



Blender 3dview:



Default material settings:

Sep 30 '21 #1
0 5821

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Matthew Robinson | last post by:
Can anybody see what is wrong with this code? apparently i have an 'empty delimiter' on the line that sets $pos - can anybody see what is wrong with it? $search_for = $_GET;...
4
by: theo | last post by:
I'm having problems with 3column css (several rows), and am wondering if you guys might recommend a good solution. Try Opening these then stretch and shrink (resize) the window to see the...
17
by: Dave | last post by:
Hi I'm making a 3D Engine which consists of the class C3DEngine. Part of this engine is a file loader, a class called CMeshLoader. I have made an instance of CMeshLoader in C3DEngine, ie...
3
by: Adam Toline | last post by:
In reference to the following: http://www.bellecose.com/form.htm At the top of each column there is a box for "All". When one is checked I need to check all of (and only) those boxes...
15
by: Paul T. RONG | last post by:
Hello, I am making a restaurant database (it is much more complicated than I thought before!), now it comes to the last stage and I come across a problem. I will explain it in detail. In a...
4
by: randy1200 | last post by:
I have a SideForm. If the use presses a button on the main form, the side form comes up by executing the following: SideForm sf = new SideForm() sf.ShowDialog(); This works perfectly. I've...
0
by: Sin Jeong-hun | last post by:
There's a sample project in the DirectX SDK that draws a revolving triangle. From it, I've written a simple program that draws a revolving box. The problem is, even though I have set the material...
11
by: drumsticksplinter | last post by:
Hi, I'm quite new to all this so please forgive my lack of technical description. Project background: Basically I have had the vision of creating a home lighting control system for the last 3...
0
by: Now You Know | last post by:
Christmas Decor Residential Commercial decoration Lighting install Los Angeles http://christmaslightinginstall.blogspot.com/
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.