Normal maps not importing in unity using Khronos GLTF importer - gltf

When I import a gltf model that uses a normal map I get this error:
ObjectDisposedException: Cannot access a disposed object. Object name: 'Stream has been closed'. System.IO.FileStream.get_Length () (at <437ba245d8404784b9fbab9b439ac908>:0) UnityGLTF.GLTFSceneImporter+<ConstructUnityTexture>d__58.MoveNext () (at Assets/UnityGLTF/Scripts/GLTFSceneImporter.cs:643)
The export is done is using this tool: https://github.com/facebookincubator/FBX2glTF
I ran the gltf files through khronos gltf validator and got a successful validation.
Sample model https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/sourceModels/Avocado
The importer works fine if the object doesn't have any normal maps in it.

Since UnityGLTF has some open issues and is not actively maintained at the moment, I'd suggest the following:
Try an alternative. glTFast in particular supports normal maps, has better performance (disclaimer: I'm the main developer) and more features.
If you need to stick with UnityGLTF, try prefrontal cortex's fork, which has many improvements.

Related

Best way to migrate single project from Jira 5.0 to Jira 8?

I want to move a single project from a Jira 5.0 instance to a new Jira 8.0 instance being already used for other projects - so the process must not bring in configurations, workflows, etc. nor should alter existing projects.
I'm only interested in importing issues and related data:
title, description, etc (obviously)
attachments (images, files, whatever)
issue links
issue type (with mapping to new types in case they don't match)
... (other properties that I'm forgetting right now)
I've just started searching for the topic and already found several options - and it's not clear if they're all available to be, mosly due to the starting Jira version, they are:
Export to CSV and import to CSV
Export to XML
Import from JSON (though I've yet to find a JSON export)
Rest API
Import project from backup
... and surely others
Of course I'd like the most complete yet less error-prone method, though if resorting to the REST API will be the only way to be sure to import all I want, I'm ready to write a script / program.
So, what should I choose?
P.S.: I'm not sure if this fits this community, is there a more proper one?
The easiest way is to get csv export, get all attachments (jira_home/data/attachments). Then copy attachments to a new instance to jira_home/import. You'll need to edit export file to match names and paths of your attachments in order to import them successfully.
And last step is import csv to your Jira 8 instance.
I suggest trying this on dev/stage environment first because there are many small details that can affect import.
Some useful data is here:
https://confluence.atlassian.com/adminjiraserver/importing-data-from-csv-938847533.html

Mapbox GL JS : Live geoJSON overlay

I am working on a weather app in Mapbox and trying to get geoJSON files to update tornado warning polygons live on the map. (This would be done by a file called "warnings.geojson" in the same path as the html file and re-written frequently by a back end c++ app). Anyway, I found the following example on how to update live JSON files :
https://www.mapbox.com/mapbox-gl-js/example/live-geojson/
This works for what it is designed to do (and I understand what it is doing - it is what I am looking for), but I cannot seem to replace the code with my own. I would like to have it update the following test polygon file instead.
https://manidoo.000webhostapp.com/test.geoJSON
The above code is just a polygon of the Bermuda triangle. (Once I get this working, I can modify it on my own) I have tried so many variations of code that listing them here would just be a huge mess. Surely it should very simple and I am just missing it?
I believe what I should be changing is the map.addLayer() function, but I am not sure what to do. Any help would be so greatly appreciated.
The correct answer to my own question was testing the app in the wrong browser. Edge will not show geoJSON polygons that are on a local directory (atleast in this specific scenario). As MeltedPenguin pointed out - the JSON was valid. Once I uploaded my HTML and geoJSON to a server online with a http:// prefix, it worked great. Firefox showed the polygon even in offline mode.

Loading map data from highcharts.com

I am playing with Highmaps to see how it works. I notice that in its examples, all the maps are loaded from this place:
https://code.highcharts.com/mapdata/
Questions:
Is the above link for production?
Would it be better to have a copy on my own server? If yes, where to download all the maps?
Yes indeed.
The mapdata is actually the official collection of maps by Highcharts.
As described on the official docs: http://www.highcharts.com/docs/maps/map-collection
You can simply load the maps using script tags, AMD or any other way of module loading, by including the files hosted on Highcharts's servers, for instance:
<script src="http://code.highcharts.com/mapdata/custom/world.js"></script>
All of the maps in the collection are also available in geojson format and svg.
In my projects, I'd rather download the maps and load them from my server's local system.
I don't believe it really matters, but since I did not expect these maps to change any soon, I could allow myself to have a copy of my own.
The reason I did it was since I used AMD (requirejs), and with that I could load the maps as modules.

Rendering PDF in iOS

Need help on rendering PDF using CGPDFContext. I am currently using UIWebView to display PDF but would like to perform much more operation rather than just reading like Highlight Text, Search PDF, Annotate PDF. Not looking for using any Framework or library.
Any help will be beneficial. For a start, code on how to render PDF using CGPDF and displaying it instead of using UIWebView.
PDF annotations are a rabbit hole. I've been working on them since 2010. The spec is thousands of pages. It's easy to get started but it takes forever to get right with all the PDFs and variations out there. Even a simple feature like bookmarks are harder than you would think.
To date there's no open source framework that implements PDF annotations. The above linked one can be a good starting point. If you don't have months/years to build something on your own, there are a few commercial options available - like PSPDFKit, available for iOS, Android and Web, which I am building.
We have a guide article listing the most important PDF spec documents.
Searching is another tricky topic. It's quite hard to convert the PDF text data to unicode. The Adobe CIDFont spec is a good starting point.
You shoud try VFReader, it is an open source project for rendering PDF files on iOS. It can be a good starting point.

Saxon CE 1.1 - Using result-document to create a output file

I've been playing with Saxon-CE_1.1 over the last few days and have managed to create a little application that allows users to classify pictures according to a data dictionary using a select dialog. All was going really well until I tried to use the result-document() function in it's "classic" way, to create a new file in the file system containing the choices the user has made.
XML Quire is returing with a severe error stating:
XpathException in mode: '{http:saxonica.com/ns/interactiveXSLT}onclick' event: [object MouseEvent]: Expected '?select=' ir '#' at start of result document href found "filename.xml
This error seems, to me, to be stating that I must pipe the results back into the HTML using # or ?select/
Is it still possible to create "external" output using SaxonCE? If so how can I accomplish the task.
Until recently it has not been possible to read or write files in the local client machine from Javascript code running in the browser, and if Javascript can't do it, then Saxon-CE can't do it either.
This may change soon with the HTML5 FileSystem API, but as far as I'm aware support for this is still very patchy. When it appears to be more stable and widespread, we can certainly look at implementing both doc() and xsl:result-document to access local filestore (or indeed, implementing the EXPath file module).

Resources