Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

247
Views
¿Cómo extraer normales de un mapa de desplazamiento en three.js?

En three.js cargo un mapa de desplazamiento como este

 // ADD MAP const loader = new THREE.TextureLoader(); const height = loader.load(GAME_CONTEXT.height_map_link); const texture = loader.load(GAME_CONTEXT.texture_map_link); const normal = loader.load(GAME_CONTEXT.normal_map_link); const map_geometry = new THREE.PlaneBufferGeometry(GAME_CONTEXT.width, GAME_CONTEXT.height, 64, 64); const map_material = new THREE.MeshStandardMaterial({ color:'orange', //side: THREE.DoubleSide, map:texture, displacementMap: height, displacementScale: GAME_CONTEXT.scale, normalMap : normal //alphaMap: alpha, //transparent:true }); const map_plane = new THREE.Mesh(map_geometry, map_material); map_plane.position.x += GAME_CONTEXT.width/2; map_plane.position.y += GAME_CONTEXT.height/2; scene.add( map_plane ); map_geometry.computeVertexNormals(); map_geometry.computeTangents(); var normals = map_geometry.attributes.normal.array; for(var i1 = 0, l1 = normals.length; i1 < l1; i1 += 3){ var n = new THREE.Vector3(normals[i1], normals[i1+1], normals[i1+2]); console.log(n); }

El mapa se carga, pero ahora estoy tratando de obtener las normales en cada posición del mapa. O simplemente calcúlelo en cualquier posición abstracta (x, y). Estoy mirando a través de las normales, pero todas son (0,0,1). ¿Cómo puedo obtener las normales reales?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!