Giter VIP home page Giter VIP logo

t3d's People

Contributors

dependabot[bot] avatar njibhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

t3d's Issues

Some props are not being renderer by the PropertiesRenderer

How to replicate:

  1. Open explorer
  2. Load Lion's Arch
  3. Mosts of buildings and bridges are missing.

Extra information:

Few thoughts about where the bug might come from:

  • The chunk definitions haven't been updated since forever (mainly because of focused work on the new parser), these props might be using a new version. Seems unlikely though because it should raise errors in the console and from what I checked, neither geom or prp2 have been updated.
  • Textures are missing. Maybe the prop is renderered but fully transparent.
  • The LOD implementation is not very sound, might be a bug in there.

Confirmed to not be related to:

  • backculling. (Checked, this is not the source of the bug)

To help with debugging, in claw island some of the props for the wall around the fort have the same issue. This map is quite fast to load in comparison to LA.

Performance research

Merge meshes for modl pack

let materialArray = [
    new THREE.MeshBasicMaterial({color: 0xFF0000}),
    new THREE.MeshBasicMaterial({color: 0x00FF00}),
    new THREE.MeshBasicMaterial({color: 0x0000FF}),
];

const geomRoot = new THREE.Geometry();
geomRoot.merge(geom0.geometry, geom0.matrix, 0);
geomRoot.merge(geom1.geometry, geom1.matrix, 1);
geomRoot.merge(geom2.geometry, geom2.matrix, 2);

const mesh = new THREE.Mesh(geomRoot, materialArray);

https://threejs.org/docs/index.html#api/en/core/Geometry.merge

Memory leak in t3dworker.js

There's a memory leak in t3dworker.js
Now that assets are getting bigger and bigger this becomes quite a big issue.

The bug must come from the wrapper not correctly freeing memory after the inflate calls.

[Parser] Chunk names changes every version

In chunk definitions regeneration:

When chunk names contain their offset it solves the duplication issue but creates a new issue at the same time.
Every update will create a huge PR with new files for every chunks and imports need to be updated.

Solution:
Maintain a mapping list between the root name of the first version of a chunk and the short name we will use in the definitions.
When a chunk doesn't have its mapping, the generation should fail and the mapping should be updated by the maintainer.

3+ maps do not even start loading

Same issue as Gyala Delve happends with new SAB World 3 map. Those two have ID beginning with #3, by that we can clearly say the tool is unable to load 3+ maps.

[Library] Skybox code is broken

  • Fallback code is broken, ids are wrong.
  • Fallback should also not use hosted files but from the archive.

Once fallback is fixed, investigate fixing the real skyboxes

"Loading Terrain 99%" in perpetuity

A good number of maps seemingly stop loading at 99% and remain there infinitely (hours or more) until the page is refreshed. Is this a known issue?

Doesn't load almost every map anymore

Went to check this tool again after some years when I discovered it first but it seems to be stuck at loading, raising ram usage and then crash Chrome.
Only one of the maps (the dev test one) can be loaded.
I made sure to exclude all the power hungry options for faster loading too.
I wonder if this tool is even still usable or abandoned by now.

[Library/PropertiesRenderer] THREE.DirectGeometry.fromGeometry(): Undefined vertexUv

Reproduce:

  • Map rendering on Cragstead with props enabled

For Cragstead the models responsible for this error are:

  • "78877"
  • "76653"
  • "74595"

After quick investigation, this doesn't seem to produce much performance difference.

How to find out which models are causing it:

  • add a breakpoint on the log (in the threejs build)
  • check the vertices array.
  • Add logs looking for the same vertices in the vertex parsing code of the renderutils.

[Library] PropertiesRenderer mesh improvement

The properties renderer create a new THREE.Mesh for every mesh in the world.
We should use instanced meshes which would save a lot of memory.

Issue:

  • InstancedMeshes in threejs needs to know in advance how many instances will be used
  • Map only refers to 3d models, not meshes directly. Most of objects have many meshes.
  • Different objects can use the same mesh

Solution for now:
We can already improve the solution by having an instanceMesh for each meshes of a specific model. Getting instance mesh working cross object would need a big architectural change, and this would be welcome when getting the implementation fully async, but too big for now.

  • Predict amount of instances for a mesh by counting before how many times an object is used on the map.

  • Then while rendering the object itself
    -- Count how many instance of the same mesh we have on the object
    -- The THREE.MeshInstance amount is instanceOnSameMesh * objectOnMapAmount

  • We need to have a counter for knowing which instance each mesh needs to use and translate/scale/rotate.

List + loading

Several LW1 return maps are not listed as is not the new map Gyala Delve.

As for the Gyala Delve, it does not load. The loading does not even start. What could cause this is unknown yet, however it is a first map with ID starting with number "3", therefore it may be possible the viewer does not recognize IDs "3+" as maps. Fixing this is severely crucial, as it would mean no future map could be loaded.

[Explorer] Console error on page load

Uncaught TypeError: can't access property "domElement", mapRenderer.renderer is null
    [1]< index.js:391

Quick fix needs to be registered only after the renderer is setup.

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.