39252

Three.js - Issue to render objects using CanvasRenderer

Question:

I'm facing a issue to render cubes using CanvasRenderer, depends the camera position any cubes lost same parts and show a part of face other cube, as the below images:

In this example, there are two cubes, when the camera in front there aren't problem:

<img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/PXFBR.png" data-original="https://i.stack.imgur.com/PXFBR.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

But, when I change de camera:

<img alt="enter image description here" class="b-lazy" data-src="https://i.stack.imgur.com/ZkmdM.png" data-original="https://i.stack.imgur.com/ZkmdM.png" src="https://etrip.eimg.top/images/2019/05/07/timg.gif" />

To render I use a array of materials, this is one of:

new THREE.MeshLambertMaterial({ color: 0x006600, ambient: 0xffff00, side: THREE.DoubleSide, overdraw: 0.5 }),

Answer1:

What you are seeing is an artifact of CanvasRenderer. The best you can do is tessellate your geometry. For example,

var geometry = new THREE.BoxGeometry( 100, 100, 100, 4, 4, 4 );

Or better yet, switch to WebGLRenderer.

three.js r.70

Recommend

  • Example from three.js but how to implement using SceneKit?
  • Render face of cube map to a quad
  • Webdriver Xpath Performance
  • printout webpage with @font-face
  • Column Nullability/Optionality: NULL vs NOT NULL
  • stringify/parse edn in clojure/ClojureScript
  • Matplotlib rotate image file by X degrees
  • Shadows for Instantiated Game Object bug?
  • Find unique tuples in a relation represented by a BDD
  • Use neo4j server instead of embedded mode
  • Automapper missing type map configuration or unsupported mapping
  • Using an enum contained in a Cloud Endpoint model on a Android client
  • CKeditor stripping font tags instead of converting to span
  • Are there any libraries for Python to simulate keyboard action?
  • Laravel 4 routing not working due to .htaccess file?
  • Python ImageIO Gif Set Delay Between Frames
  • Pass Dictionary to Javascript array
  • Invalid Date on validation Date of js
  • How integrated is Collada to OpenGL ES
  • HTTP/2 streams vs HTTP/1.1 connections
  • Syntax for setting draggablecursor property in google maps api
  • What is Eclipse's Declaration View used for?
  • Sending data from AppleScript to FileMaker records
  • Join two tables and save into third-sql
  • How to model a transition system with SPIN
  • ORA-29908: missing primary invocation for ancillary operator
  • Jquery - Jquery Wysiwyg return html as a string
  • Return words with double consecutive letters
  • GridView Sorting works once only
  • Calling of Constructors in a Java
  • SVN: Merging two branches together
  • Traverse Array and Display in markup
  • Transpose CSV data with awk (pivot transformation)
  • How to get icons for entities from eclipse?
  • KeystoneJS: Relationships in Admin UI not updating
  • AngularJs get employee from factory
  • Load html files in TinyMce
  • Why can't I rebase on to an ancestor of source changesets if on a different branch?
  • Append folder name and increment by 1 using batch script
  • Converting MP3 duration time