473,545 Members | 2,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Three.js lighting problem

93 New Member
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.MeshLambe rtMaterial.

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 5838

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

Similar topics

5
3188
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; $the_items_description = $row ; $pos = stristr($the_items_description, $search_for); if ($search_for == "") {
4
2103
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 liquidity problems. The two column did well, but these 3columns, .....well, if I can just get these divs to stay positioned when liquid, in majority of...
17
2457
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 composition. Unfortunately, CMeshLoader sometimes needs to refer to private members of C3DEngine. Inheritance, friends, and composition are all swirling...
3
2444
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 underneath. Now, the rub here is that every checkbox on the page (except the "All"s)
15
2233
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 restaurant, though rarely, but it happens, that one guy from desk1 would like to pay for bills of both desk1 and desk2 (I avoid using Access term...
4
12369
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 been asked to change the code to the following:
0
1482
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 and the light, the box is completly black. I don't know what's wrong. The C# tutorial on an internet site, which I have read to write this, calls...
11
3093
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 years. This year I have been trying really hard to get a prototype model working. I need to work out how to use visual basic to 'fade' to a desired...
0
1072
by: Now You Know | last post by:
Christmas Decor Residential Commercial decoration Lighting install Los Angeles http://christmaslightinginstall.blogspot.com/
0
7484
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7675
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7928
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7440
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5997
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5344
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4963
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3470
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1030
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.