-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export issue in I3dm.export #35
Comments
It seems something goes wrong when writing the tiles. Did you follow the getting started? One thing I noticed the coordinates are different: Yours: Sample: |
I get the same error. I used this sample to setup the databse: And then I use this box renamed to tree.glb: This is the output: |
if you follow the getting started document there is an input table of 60K features (it should work), when using the sample database setup script (https://github.com/Geodan/i3dm.export/blob/main/testdata/create_testdata.sql) there is something going wrong |
Thanks for your response. |
the issue occurs when very few cmpt tiles are generated (like 1 or 5). When working with a small dataset you can decrease max_features_per_tile (default 1000) so more tiles are generated. |
The getting started works for me as well. However I needed to add this to be able to get it to work: Sounds great that this will be fixed in an upcoming release! |
Thanks. Got the code to work. The output however is not creating proper json. file |
@ashitoshp somehow a ?github? webpage ended up in the 4_7_8.cmpt file... Maybe try again |
@sweco-sekrsv that should not be necessary when following the getting started... what error do you get? |
I got this error: |
You mean in this sql query? https://github.com/Geodan/i3dm.export/blob/main/docs/getting_started.md#create-instances-table. Cannot reproduce that. |
Yes tats my bad! Im able to convert to i3dm now. Just wanted to confirm that the Z value is also taken into consideration while conversion to i3dm. |
yes should be |
issue is fixed in 2.4.3 |
I see column 'geom' is null. Is PostGIS installed? Check with select postgis_full_version() |
How did you import the data? Using ogr2ogr? |
Ok, one thing to check: is column geom in table taffic_sign_instances all null? If so check the step for creating this table https://github.com/Geodan/i3dm.export/blob/main/docs/getting_started.md#create-instances-table Another thing to check: the database name is 'postgis_34_sample', but you didn't specify it in the i3dm.export command (parameter dbname is missing) |
Also I see there is an error when running ogr2ogr:
This looks like not compatible versions. I'm using QGIS 3.38, ogr2ogr --version GDAL 3.9.2, PostgreSQL 16.0, PostGIS version 3.4 |
@qwork2010 ok great its working now. Rotation is horizontal limited indeed when creating 3D Tiles 1.0 I3dm/cmpt. |
This GPU instance method is in development, not yet much documentation. But the process is the same, you have to fill the rotations in columns 'roll', 'pitch' and 'yaw' (in radians) and add the --use_gpu_instancing true option. |
|
try azimuth in yaw column, elevation in roll column |
One thing I notice the rotation angles should be in radians not in degrees. Maybe the instances are below the terrain? You can test by switching the terrain off in Cesium. If no luck attach the table (export as geopackage in qgis/gdal) and the used model, I can take a look |
Hi, I did a quick test with the data. Created view:
Created Intanced 3D Tiles with 1.0 method (so cmpt files are created):
Result in CesiumJS: Conclusion: Guardrails are drawn, only the horizontal rotation are wrong. With 3D Tiles 1.0 Instanced tiles only the column 'rotation' is used for horizontal rotations. For example with rotation = 90: So as I see it, there is no need to use --use_gpu_instancing true because only a horizontal rotation is needed. The values of the rotation column should be calculated per point based on the direction of the road and relation to the road (left or right). |
I don't understand the question. I've used model 'Guardrail.gltf', and data from hl2.gpkg to create instance 3D Tiles. The file hl2_i5.gpkg is empty somehow. |
Yeah they load fine but are rotated on 3 axis: when you use zero for angles (see the view in #35 (comment)) there is no rotation (only horizontal angle should be adjusted). Yes ''tileset.debugShowBoundingVolume = true;' is a setting in CesiumJS |
Hi, Option tileset_version has nothing to do with this, it's some metadata in tileset.json for setting a version (v10-test for example) About the check: In 2.9 there is an error when you use both: --use_gpu_instancing true (meaning the output is glb files instead of cmpt/i3dm) and --use_i3dm true (meaning output is I3dm not cmpt) |
How can I download? Get some errors (git lfs is installed).
|
Download zip gives an empty project.zip file :-( Maybe use https://wetransfer.com/ or so?) |
This comment was marked as resolved.
This comment was marked as resolved.
Inspected the project, the 3D tiles in folder 'outputhl2i5' do visualize well in CesiumJS 1.118.2 (rotated but that's expected): In the project 'hulan-project' nothing is visualized (but the glb's and subtree files are requested). I think it's related to the Cesium version used (1.99) - its quite old (current version is 1.122). Can you upgrade (maybe also dependency vite-plugin-cesium) and try again? |
what tool did you use create the desired result? |
can you try using latest version? 2.10 |
@qwork2010 ok good luck! |
@bertt |
looks like something with accuracy, have to inspect it more. It only happens with I3dm's not with GPU instancing (glb's)? |
Hi, I tried to reproduce with a 1m * 1m *1m cube (no rotations) on Amsterdam Dam square, but was unable to do so. 1] I3dm.Export - I3dm on POINT Z(4.893688 52.372817 0.5) 2] I3dm.Export - GPU instancing on POINT Z(4.893688 52.372817 0.5) 3] Adding cube in Cesium on Cesium.Cartesian3.fromDegrees(4.893688, 52.372817, 0.5). Code:
So not sure what's the issue here. |
@bertt |
I've created release 2.11.0 with ellipsoid parameters as found in Cesium. #91 |
|
I have imported your Sample to PostGIS and tried the command as below
i3dm.export -c "Host=172.16.0.213;Username=postgres;Password=postgres;Database=3Dmodels;Port=5432" -t i3dm.mydata
Getting System.ArgumentOutOfRangeException error
Stacktrace as below
Tool: I3dm.export
Version: 2.4.1.0
Exporting i3dm's from i3dm.mydata...
Bounding box for table (WGS84): 4.6981, 52.4227, 4.722, 52.4823
Heights for bounding volume: [0 m, 50 m]
Maximum instances per tile: 1000
Creating tile: ./output/content/0_0_0.cmpt Writing 1 subtree files...
Unhandled exception. System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'index')
at System.Linq.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument)
at System.Linq.Enumerable.ElementAt[TSource](IEnumerable
1 source, Int32 index) at i3dm.export.Program.<>c.<Main>b__0_1(Options o) in D:\dev\github.com\geodan\i3dm.export\src\Program.cs:line 82 at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult
1 result, Action`1 action)at i3dm.export.Program.Main(String[] args) in D:\dev\github.com\geodan\i3dm.export\src\Program.cs:line 25
The text was updated successfully, but these errors were encountered: