Giter VIP home page Giter VIP logo

i3s-lib's People

Contributors

rvargasesri avatar tamrat-b avatar vsautin1 avatar whatnick avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

i3s-lib's Issues

Some confusing about convert_geometry() funciton of i3s_writer_impl.cpp.

In function i3slib::i3s::convert_geomery(), I notice that src_pos return a relative position of mesh, which should be a std::vector<Vec3d>, and the src_pos.size() should return the size of vertices. But when I use a vertices with triangluar indices, the size() function of Mesh_attrb return an index size like this:
image
so, the next step code (in row 213)
image
will always touch an assert: ERROR: mesh->size() != rel_pos.size();
I want to know, did I miss something? or the indices should not calculate like this?
image

SLPK not displaying: Bounding volume generation different than ArcGIS Pro

There is no way how to provide bounding volume via the API since the the library generates bounding volumes (both OBB and MBS) for each node on its own.

Bounding volume of a non-empty node is computed only from node's mesh (vertices) and ignores bounding volumes/geometries of node's subtree. If a more detailed nodes are larger than the their parent nodes then they are not properly visualized (at least in AGOL) because the renderer does not descend to subtree of a node that is outside of viewport.

Also, the scene's extent in 3dSceneLayer.json does not cover whole scene.

When we process a library-generated SLPK file by the ArcGIS Pro Upgrade Scene Layer tool the upgraded SLPK file does not suffer with these problems. Node's bounding volume covers node and whole its subtree. Also, the scene's extent is correct.

So, current layer export via i3s-lib is broken and deviates from the functionality provided by the ArcGIS Pro.

We have generated a sample SLPK dataset via the i3s-lib library, where:

  • Level 1 has a simple mesh of a cube (12 faces), with 10 meter half-axis.
  • At each subsequent level the cube's half-axis grows by 10 meters.
  • Bottom of the tree ends up at level 41 with cube with 410 meter half-axis.
  • All cubes share common center.

Library generated dataset suffers from the above described problems: root node has OBB with halfSize = [10, 10, 10] and MBS radius = 17.32, i.e. covering only the top-level 20x20x20 m cube.

ArcGIS Pro re-generated (upgraded) dataset has correct node bounding volumes: root node has OBB with halfSize = [410, 410, 410] and MBS radius = 710.14, i.e. covering whole subtree including the bottom 820x820x820 m cube.

Create github action to demonstrate building

Demonstrate exact process for building on at least Ubuntu 18.04/20.04 using Github Actions as CI. Various pre-requisites include.

  • New cmake required for draco
  • GCC 8 or Clang being installed

Currently building this on Ubuntu 18.04 on WSL will make a CI PR when the steps are worked out.

The generated ktx2 map seems to be incorrect

I set the program to generate the slpk data of the ktx2 format map, but in the web side call display is 0.jpg, I extracted the 0_0_2.bin.ktx.gz data into the ktx2 map loader prompt format error,What's wrong with this, please

Add sample data and obj2slpk example

I am working on an example using this library to convert SFM derived urban models to SLPK format. I have the attached model tile to donate under creative commons (CC-BY-SA) licence to this library and use as a focus for development for this functionality.

I can supply the model as a PR as well once we discuss appropriate folder structure under which testdata should sit in the repository.

The obj2slpk function proposed will follow the raster2slpk pattern:

obj2slpk input.obj input_lod1.obj input_lod2.obj ... output.slpk

To avoid extra dependencies being added to this repository it is recommended that the LOD's for the given OBJ are generated separately using tools such as.

Support for shared resources

We would like to request support for shared resources (textures), as we have many geotypical (shared) textures. Not sharing textures leads to very large slpk.

Fix for textures with alpha channel

We would like to request support for textures with alpha channel. Currently, these are not handled correctly.

From a conversation with Juan Ruiz/ESRI:

I did see some issues with rgba in i3slib::i3s::create_texture_set. The current implementation is encoding rgba as jpg, not png. I3slib::i3s::raw_to_jpg doesn’t support 4 channel textures. Support is “to do”. After updating to encode rgba as png, then there’s an issue with i3slib::i3s::raw_to_png. The implementation is also “to do.” This causes create_node to fail.

If we change the default tile size 32 to 64, the display will be incorrectl.

Hello, @rvargasESRI @whatnick @vsautin1

We tried changingthe default tile size 32 to 64, as follows:
std::vector<std::vector> grids;
grids.emplace_back(std::move(elevation_data));
build_downsampled_grids(size, grids.front().data(), 64, grids);
std::reverse(std::begin(grids), std::end(grids));

//
auto writer = create_writer(slpk_file_path);
if (!writer)
return 1;

ENU_to_WGS_transformation transformation({ -123.4583943, 47.6204856 });
i3slib::i3s::Node_id node_id = 0;

if(!process(*writer, size, cell_size, grids, textures, 64, 128, 0, 64, { 0, 0 }, 128, { 0, 0 }, node_id, &transformation))
return 1;

Then run the app and get the new slpk , and published it to be a scene service. And, it shows that the scene service display normally in the browser.

Why the exception? Did we miss any other parameter?

Looking forward to your response.

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.