How to use Matc tool from google filament - google-filament

I was reading through the filament documentation and they give the comamnd to out .mat files from the jsonish material definition like this :
matc --reflect parameters filament/src/materials/skybox.mat
I have two questions, how do I install this matc tool and after making the .mat file, how do I reference it to make the renderablemesh use it?

matc is the material compiler tool which you have to download from the filament repository release page.
Download the archive for your operating system. If your os is window
then download the window variation.
Extract the archive wherever you want.
Go to the bin folder inside it.
Paste the .mat file
Run the command: matc -p mobile -a opengl -o baked_color.filamat baked_color.mat. This command is building for
mobile platform and opengl as graphics engine where input file is
baked_color.mat and the output file is baked_color.filamat.
To know more about matc commands, visit this site.

Related

How to how to install poppler from the .tar file downloaded from poppler official site

There is no useful information on the site describing how to install the file .I have tried extracting the .tar file, installing through command prompt . there is no information available on the web.OS used is windows 11. Its for a project to extract data from images, using OCR. Poppler is used for getting page numbers of the pdf file which will be converted to an image file later in the process."https://poppler.freedesktop.org/" is the site from which I downloaded the file.Is this the right site.Any answer is helpful.Thank you
Poppler source is constantly updated, and thus common for Linux and Mac users to build or brew on demand. It is not much different when using Programming Suites like Python, Ruby etc.
Windows users expect one exe, but the poppler utils were built as a spin off from non-commercial licensed xpdf and for personal 32 bit users that is often simpler.
I have given examples for how simple that xpdf unpacking can be for one exe in several posts such as https://stackoverflow.com/a/68697144/10802527 (how to scan a file list, not used here) and https://stackoverflow.com/a/73123537/10802527 (how to use to run a single file) and
https://stackoverflow.com/a/73437398/10802527 (running one exe on demand)
Poppler prebuilt binaries are available as 64bit only so the first step after making a work directory is download latest version from https://github.com/oschwartz10612/poppler-windows using most current
https://github.com/oschwartz10612/poppler-windows/releases/download/v22.04.0-0/Release-22.04.0-0.zip and save to the working folder, then you can use right click Extract All... OR
tar -m -xf Release-22.04.0-0.zip to unpack in that folder so it should look like in the binary folder
Now the exe files are in a subdirectory and when using those it is best if that folder is included on the path environment.
RESIST any means to add using set or worse setx simply add folder via system gui, note in some cases after saving the setting it may need log off and log on to stick and in very rare cases even a reboot/restart.

How to get positional data from PDF to text

I need to convert PDF files to text to extract information using Perl. But I am not getting the text file in positional format means the position of the elements in the PDF and text should be same. I tried CAM::PDF::PageText but the output is very different.
I have come across posts referring to pdftotext and Poppler but I am not able to setup any of these in my Windows 10 64-bit system.
Please let me know if there are any other ways to solve this problem.
What you really want is pdftohtml with the -xml output. You can build it on Windows.
There are 2 ways to compile poppler on Windows:
using mingw compiler under cygwin
using native Visual Studio (msvc) makefile
This document describes the second method.
...
You can download Visual Studio Community Edition subject to license terms to get the 2013 and 2015 versions of compilers and build tools along with the IDE.
Or, you can just get the Visual C++ build tools. See also Walkthrough: Compiling a Native C++ Program on the Command Line.
Sorry for the delay but finally I got a solution for this which is pdftotext by Xpdf and the best way is to download pre compiled binaries (.exe) files. And then using the commmand line invaocation we can use the various tools like pdftohtml, pdftotext etc.
Look at this page
http://www.foolabs.com/xpdf/download.html
and under the heading "Precompiled binaries" you can find that.
On command prompt you need to change directory to the place where the binary is present then call the binary with the file as parameter
Exapmle: pdftotext File1.pdf
The above command will give File1.txt in the same folder where the binary is present.

How to create image file for x86 platform in QNX Momentics 5.0 for QNX 6.6

I am new to QNX. i have to make image file in Momentics 5.0. from help i came to know about process for Momentics 4.7. there are some deviations between this two IDEs.I want to make a simple application which will stand alone run on target system.for that i have download BSP file for x86 platform from QNX website.Now i dont know how to make image file. anybody know about process for making image file in Momentics 5.0? Thanks in advance.
See ch. 13 of the IDE User's Guide (also Ch. 15 if migrating from an earlier version, this covers some of the differences between IDE versions) http://support7.qnx.com/download/download/26175/IDE_Users_Guide.pdf and Building Embedded Systems Ch. 3 http://support7.qnx.com/download/download/26170/QNX_Neutrino_RTOS_Building_Embedded_Systems.pdf
Also look at the overall documentation for working with BSPs support7.qnx.com/download/download/26189/QNX_SDP_6.6.0_BSPs.pdf and the specific docs for the BSP you are using.
Thank you very much for your help. Finally I am able to make image file for qnx6.6 using command line. steps that I have follow for x86 devices in windows :
Step -l: Download latest BSP file from QNX website.
http://community.qnx.com/sf/wiki/do/viewPage/projects.bsp/wiki/BSPAndDrivers
Step -2 :In command promote go to "qnx660" folder and set environments variables by executing “qnx660-env.bat” file.
Step -3 :In BSP folder. You will find images, install, prebuilt, install, src folder and some make files in it. Go to images folder. You will find “x86-generic.build” file. Edit this file in QNX IDE. Add file name that you want to run and binary file in any of the mentioned paths:
• qnx660\target\qnx6\x86\bin
• qnx660\target\qnx6\x86\usr\bin
• qnx660\target\qnx6\x86\opt\bin\sbin
• qnx660\target\qnx6\x86\usr\sbin
Step -4:In command promote goto images folder apply “make clean“ and “make” commands. Make command will generate” ifs-x86-generic.bin” file.
OR
You can also make '.ifs' file by command "mkifs x86-generic.build "anyname.ifs". anyone of this will work.
Step -5:Make your pen drive bootable. And put this “ifs-x86-generic.bin” or "anyname.ifs file into" “.boot” folder of the bootable pen drive.
Step -6 :Boot your system with this pen drive.
Enjoy….

Package a command line script in a Mac OS X pkg

I have a program (created by a colleague, ported from Linux but successfully compiles on Mac) that I need to deploy to lots of Mac workstations. Currently we do so by pushing out pkg files (not ones we created).
My general question (that others may find the answers to useful) is how do I go about packaging a command line program/script into a pkg file that installs the program? The usual method to package an .app file seems documented well enough, but there is scant details about taking an arbitrary program and wrapping it in a pkg installer.
The man pages for pkgbuild (etc) make a lot of assumptions - that you've already built an app with xcode, that you're intending to use an .app and can generate plists, etc. All we want to do is let the mac server install a non-app program, and it wants to use pkgs.
It would be best if the solution were scriptable so that every time we update the program we can easily create a new pkg file. If a decent resource already explaining this process can be linked that of course would also work great. The question here: Making OS X Installer Packages like a Pro - Xcode Developer ID ready pkg doesn't match the need to simply install a basic cli program.
I would recommend Packages.
It's scriptable so it can become part of your build process and generates a nice mpkg for you.
We are using it to automate the download of third-party libraries, and then the invocation of make to compile, as well as the installation of compiled files.
As a note, although this will generate a mpkg, most distributions are done with disk images, so we also use hdiutil to create a sparse image, copy the mpkg into it, convert it to a compressed read-only dmg and then distribute that.
An example of this procedure would be:
1) Create Sparse RW DMG file.
hdiutil create -size 100M -type SPARSE -volname "MyInstaller" -fs HFS+ MyInstaller.dmg.sparseimage
2) Attach to image. Note disk and mounted volume name from output (ex. /dev/disk2s1 and /Volumes/MyInstaller)
hdiutil attach MyInstaller.dmg.sparseimage
3) Copy in mpkg installer
cp -R Packages/build/My_Packages.mpkg /Volumes/MyInstaller/
4) Detech from image.
hdiutil detach -force {mounted disk} (ex. hdiutil detach -force /dev/disk2s1)
5) Create compressed read only image from writable sparse image.
hdiutil convert "MyInstaller.dmg.sparseimage" -format UDZO -o "MyInstaller.dmg" -ov -imagekey zlib-level=9

automatic reload sketches in processing

I'd like to be more efficient with processing programming, is there a way to run a sketch from the command line? maybe also with a watch for file saves?
Also, is there some autocompletion for processing? the default IDE is very limited..
Windows and Linux
Pretty much the same when you want to run the sketch from the command line.
Within your processing folder there should be a processing-java file. If you cd to it's folder, you can use
./processing-java --help
Which will show you the required parameters to running, compiling and whatnot.
If you are in a hurry, this would do (replace the $parameters with the folders you want or automate it with your editor):
$PROCESSING_DIR/processing-java --sketch=$CURRENT_DOCUMENT_DIR --output=$CURRENT_DOCUMENT_DIR/run --run --force
This is my Gedit script:
/home/otto/GameDev/processing-2.1/processing-java --sketch=$GEDIT_CURRENT_DOCUMENT_DIR --output=$GEDIT_CURRENT_DOCUMENT_DIR/run --run --force
MacOSX
Haven't had a chance to test it but it shouldn't be any harder.
Source: http://wiki.processing.org/w/Command_Line
As #erisoco mentions, using the Eclipse IDE is your best bet (especially for autocomplete/etc.) and the Proclipsing plugin makes it very easy to setup Processing projects in eclipse (including integration with external libraries)
There's also a quick video tutorial on setup if necessary.
You mentioned "watch for file saves" - that sounds along the lines of "live coding".
There are multiple options. One I've used in the past is through the FluidForms library. The library also includes some handy features for (3D) design (like parameter changer, automatic arcball for 3D scenes, STL export, etc.)
You can find a few quick video tutorials on live coding Processing with Fluid Forms libs:
Fluid-Forms-Libs ~ HelloWorld
Fluid Forms Libs Parameter Changer
FluidFormsLibs-LiveCoding
This is the command I use:
> processing-java --sketch=R:\sketch_folder --force --run
I do the coding using Visual Studio Code https://code.visualstudio.com/ with the processing extension.

Resources