Giter Club home page Giter Club logo

Comments (5)

alters-mit avatar alters-mit commented on September 6, 2024 1

You're getting this error repeated:

OpenGL Error: Invalid texture unit!
 
(Filename: ./Runtime/GfxDevice/opengles/DeviceStateGLES.cpp Line: 72)

Which is a known problem in Unity running on Linux with obsolete drivers.

Please do the following:

  1. Updated your graphics drivers and try again.
  2. If that doesn't work, try the following:
  • Change this line c = Controller() to `c = Controller(launch_build=False)
  • Launch the controller
  • Launch the build with an additional flag: ./~/tdw_build/TDW/TDW.x86_64 -force-glcore42

from tdw.

alters-mit avatar alters-mit commented on September 6, 2024

@ThomasSchellenbergNextCentury Thanks for raising this issue. Unfortunately, I can't reproduce this bug. Please do the following:

  1. Tell me more about your computer. What OS are you running? What GPU drivers are you using?
  2. Please re-run the controller and attach the player log here: https://docs.unity3d.com/Manual/LogFiles.html
  3. Please attach your version of the controller here (I just want to double-check that it matches the controller in the guide)

from tdw.

ThomasSchellenbergNextCentury avatar ThomasSchellenbergNextCentury commented on September 6, 2024

OS: Ubuntu 16.04
Memory: 16 GB
Processor: Intel® Core™ i7-5600U CPU @ 2.60GHz × 4
Graphics: Intel® HD Graphics 5500 (Broadwell GT2)

Here's the player log:

Player.log

Here's the controller code. The issue also happens when I run unmodified scripts from tdw/Python/example_controllers/

from tdw.controller import Controller
from tdw.tdw_utils import TDWUtils
from tdw.librarian import ModelLibrarian
from tdw.output_data import OutputData, Bounds, Images

lib = ModelLibrarian("models_core.json")
# Get the record for the table.
table_record = lib.get_record("small_table_green_marble")

c = Controller()

table_id = 0

# 1. Load the scene.
# 2. Create an empty room (using a wrapper function)
# 3. Add the table.
# 4. Request Bounds data.
resp = c.communicate([{"$type": "load_scene",
                       "scene_name": "ProcGenScene"},
                      TDWUtils.create_empty_room(12, 12),
                      {"$type": "add_object",
                       "name": table_record.name,
                       "url": table_record.get_url(),
                       "scale_factor": table_record.scale_factor,
                       "position": {"x": 0, "y": 0, "z": 0},
                       "rotation": {"x": 0, "y": 0, "z": 0},
                       "category": table_record.wcategory,
                       "id": table_id},
                      {"$type": "send_bounds",
                       "ids": [table_id],
                       "frequency": "once"}])

# Get the top of the table.
top_y = 0
for r in resp[:-1]:
    r_id = OutputData.get_data_type_id(r)
    # Find the bounds data.
    if r_id == "boun":
        b = Bounds(r)
        # We only requested the table, so it is object 0:
        _, top_y, _ = b.get_top(0)

box_record = lib.get_record("puzzle_box_composite")
box_id = 1
c.communicate({"$type": "add_object",
               "name": box_record.name,
               "url": box_record.get_url(),
               "scale_factor": box_record.scale_factor,
               "position": {"x": 0, "y": top_y, "z": 0},
               "rotation": {"x": 0, "y": 0, "z": 0},
               "category": box_record.wcategory,
               "id": box_id})

avatar_id = "a"
resp = c.communicate([{"$type": "create_avatar",
                       "type": "A_Img_Caps_Kinematic",
                       "avatar_id": avatar_id},
                      {"$type": "teleport_avatar_to",
                       "position": {"x": 1, "y": 2.5, "z": 2}},
                      {"$type": "look_at",
                       "avatar_id": avatar_id,
                       "object_id": box_id},
                      {"$type": "set_pass_masks",
                       "avatar_id": avatar_id,
                       "pass_masks": ["_img"]},
                      {"$type": "send_images",
                       "frequency": "once",
                       "avatar_id": avatar_id}])

# Get the image.
for r in resp[:-1]:
    r_id = OutputData.get_data_type_id(r)
    # Find the image data.
    if r_id == "imag":
        img = Images(r)
        
        # Usually, you'll want to use one of these functions, but not both of them:
        
        # Use this to save a .jpg
        TDWUtils.save_images(img, filename="test_img") 
        
        # Use this to convert the image to a PIL image, which can be processed by a ML system at runtime.
        # The index is 0 because we know that there is only one pass ("_img").
        pil_img = TDWUtils.get_pil_image(img, index=0)

c.communicate({"$type": "terminate"})

from tdw.

ThomasSchellenbergNextCentury avatar ThomasSchellenbergNextCentury commented on September 6, 2024

That second option worked. Thanks!

from tdw.

alters-mit avatar alters-mit commented on September 6, 2024

Great. Closing this ticket.

from tdw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.