Skip to content

.obj models not displaying materials #7346

@bsack23

Description

@bsack23

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

1.11.0

Web browser and version

130.0.6723.70

Operating system

mac os 14.7

Steps to reproduce this

Steps:

  1. load .obj file as model
  2. in draw() call normalMaterial() for example
  3. call model(yourModel)

Snippet:

let teapot;

function preload() {
 teapot = loadModel("teapot.obj"); 
}

function setup() {
  createCanvas(400, 400, WEBGL);
}

function draw() {
  background(20);
  normalMaterial();
  scale(50);
  translate(0, 1.5, 0);
  rotateX(PI);
  model(teapot);
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions