Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 2-Apr-2017 23:55:46

jasolo
Member
Registered: 2-Apr-2017
Posts: 20

Problem trying to execute examples in Raspberry Pi 3 Model B

I want to create an Augmented Reality app for Raspberry and Android. By the moment I'm modifying the "arcards" demo and the first test on Android was OK, but failed on a Raspberry Pi 3 Model B with a Raspberry Pi Camera v2. I'm connected to the RPi through WiFi using Putty and XMing. I get the same error with the original example "ar_piano". The DEB package is created in the Raspberry as indicated in the readme.txt in the export folder. This is the text during the execution:

pi@raspberrypi:~ $ ar-piano
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
Unable to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
PuTTY X11 proxy: Unsupported authorisation protocol
xcb_connection_has_error() returned true
PuTTY X11 proxy: Unsupported authorisation protocol
xcb_connection_has_error() returned true
Creating resource group General
Creating resource group Internal
Creating resource group Autodetect
SceneManagerFactory for type 'DefaultSceneManager' registered.
Registering ResourceManager for type Material
Registering ResourceManager for type Mesh
Registering ResourceManager for type Skeleton
MovableObjectFactory for type 'ParticleSystem' registered.
ArchiveFactory for archive type FileSystem registered.
ArchiveFactory for archive type Zip registered.
ArchiveFactory for archive type EmbeddedZip registered.
DDS codec registering
FreeImage version: 3.15.3
This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2,pfm,pct,pict,pic
PVRTC codec registering
ETC codec registering
Registering ResourceManager for type HighLevelGpuProgram
Registering ResourceManager for type Compositor
MovableObjectFactory for type 'Entity' registered.
MovableObjectFactory for type 'Light' registered.
MovableObjectFactory for type 'BillboardSet' registered.
MovableObjectFactory for type 'ManualObject' registered.
MovableObjectFactory for type 'BillboardChain' registered.
MovableObjectFactory for type 'RibbonTrail' registered.
*-*-* OGRE Initialising
*-*-* Version 1.10.0unstable (Xalafu)
Creating resource group SO3/Internal/Widgets/BitmapWidget
Installing plugin: OpenGL ES 2.0 RenderSystem
OpenGL ES 2.x Rendering Subsystem created.
Plugin successfully installed
Installing plugin: ParticleFX
Particle Emitter Type 'Point' registered
Particle Emitter Type 'Box' registered
Particle Emitter Type 'Ellipsoid' registered
Particle Emitter Type 'Cylinder' registered
Particle Emitter Type 'Ring' registered
Particle Emitter Type 'HollowEllipsoid' registered
Particle Affector Type 'LinearForce' registered
Particle Affector Type 'ColourFader' registered
Particle Affector Type 'ColourFader2' registered
Particle Affector Type 'ColourImage' registered
Particle Affector Type 'ColourInterpolator' registered
Particle Affector Type 'Scaler' registered
Particle Affector Type 'Rotator' registered
Particle Affector Type 'DirectionRandomiser' registered
Particle Affector Type 'DeflectorPlane' registered
Plugin successfully installed
Installing plugin: Octree Scene Manager
Plugin successfully installed
ArchiveFactory for archive type ScolFileSystem registered.
ArchiveFactory for archive type ScolURL registered.
CPU Identifier & Features
-------------------------
 *   CPU ID:
 *      VFP: no
 *     NEON: yes
-------------------------
Registering ResourceManager for type Texture
OverlayElementFactory for type Panel registered.
OverlayElementFactory for type BorderPanel registered.
OverlayElementFactory for type TextArea registered.
Registering ResourceManager for type Font
Unable to determine hardware version. I see: Hardware   : BCM2835
,
 - expecting BCM2708 or BCM2709.
If this is a genuine Raspberry Pi then please report this
to projects@drogon.net. If this is not a Raspberry Pi then you
are on your own as wiringPi is designed to support the
Raspberry Pi ONLY.
AL lib: (EE) alc_cleanup: 1 device not closed

The problem seems to be wiringPI not detecting the RPi3. The installed version is 2.44 and the command "gpio -v" shows the expected info. Also there are messages about putty. In a previous test with the RPi connected to a monitor, keyboard and mouse (no remote terminal) the screen got white after showing the initial logo and got frozen. Sorry, no available log from that test.

Offline

#2 3-Apr-2017 00:16:24

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,090
Website

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

Hello,
the app can't be displayed though putty or any terminal.
You must have a screen connected to the pi if you want to see any 3D output.

about the wiringpi issue it seems you are missing a config in your raspi-config
in raspi-config
- enable camera
- enable I2C (maybe this is where winring pi complains)

if this is not enough try to enable spi also

Offline

#3 3-Apr-2017 00:20:26

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,090
Website

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

Possibly it can also be a recent update of raspbian / kernel that need a more recent version of wiringpi.
I'll make some tests soon with the last raspbian version.

What is your system version ?

Offline

#4 3-Apr-2017 12:18:08

jasolo
Member
Registered: 2-Apr-2017
Posts: 20

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

Although now I'm not near the raspberry, I'm sure that the camera option is enabled but the others are disabled (I2C, spi). I'll enable them and use a screen. I suppose my system has the last version (updated a couple of days ago), but I'll check it.

Offline

#5 3-Apr-2017 13:13:02

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,090
Website

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

Maybe the last raspbian version need an update of wiringpi.
I'll rebuild this asap and provide an update.

Offline

#6 3-Apr-2017 19:24:20

jasolo
Member
Registered: 2-Apr-2017
Posts: 20

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

My version is 8.0 jessie. Same error after enabling I2C and SPI, rebooting and upgrading the raspberry.

Offline

#7 3-Apr-2017 19:29:31

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,090
Website

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

I'm building a new version with an updated version of wiringpi, the change in kernel is from december and I didn't noticed it.

I'll gives you the download links when it's done.
(It should take the all night ^^)

Offline

#8 4-Apr-2017 18:04:27

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,090
Website

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

You can download the files from here :

http://redmine.scolring.org/projects/sc … scol.armv6
http://redmine.scolring.org/projects/sc … scol.armv7

and replace in C:\Program Files (x86)\Scol Voyager\RaspberryPi
then export again.

This verion is build with the last wiring pi version that should manage BCM2835

Offline

#9 5-Apr-2017 20:15:50

jasolo
Member
Registered: 2-Apr-2017
Posts: 20

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

After replacing those files, ar-piano works in the raspberry. smile But not my modification of arcards. After the initial logo, the screen is white. It works in Windows. In my modification I've removed all the blocks except trex, pterodactylus, andy and drawfish, and replaced the mesh of trex with an OBJ with 100k faces and 65k vertices. So maybe this mesh is excesive or I should increase the memory of the RP3 dedicated to GPU.

Offline

#10 5-Apr-2017 21:45:36

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,090
Website

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

Hello,

yes you can try to change the gpu memory to 256 or more.
also test to make a simple app with just your model to find out.
maybe it gives you errors when loading the model in the console log

also I have a doubt about meshes with more than 65536 vertices by subentity on PI.

Offline

#11 6-Apr-2017 22:49:49

jasolo
Member
Registered: 2-Apr-2017
Posts: 20

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

The original ar-cards demo works with 256 MB. smile Also my modification but only the models from the demo, so now the problem seems to be the 65536 vertices limit. The log shows no warning about that and it's near identical to the ar-cards log. The first difference is:

Mesh: Loading /usr/share/PROGRAM-NAME/partition/assets/models/converted/MY-MODEL/meshes/castillomota_castillo_cartillo_mota-tan2.mesh.

Once running there are several lines like this:

Page[3]  pre: 40, aft: 40, error = 1,051564

And I think the next line appears when the marker of my model is detected, but the program doesn't show my mesh:

Material scheme converted from Default to ShaderGeneratorDefaultScheme on material : ASSET/TransShadow with group : 0.main82.trex

I replaced the trex with my mesh, so some names maintain the "trex". My mesh doesn't have textures, only colours.

For comparison, when the Andy marker is detected and Andy appears:

Material scheme converted from Default to ShaderGeneratorDefaultScheme on material : ASSET/TransShadow with group : 0.main12.andy
Material scheme switch from Default to ShaderGeneratorDefaultScheme on material : andyv2_Robot_material
Material scheme switch from Default to ShaderGeneratorDefaultScheme on material : andyv2_mass
Material scheme switch from Default to ShaderGeneratorDefaultScheme on material : andyv2_Material_shell
glGetError 0x506
GLSL ES compiled: andyv2_vsLightGENNORM0_GLSLES
Compiled
GLSL ES compiled: andyv2_fpLightGENDIFF0SPEC0NORM0_GLSLES
Compiled
glGetError 0x506
GLSL ES compiled: andyv2_fpLightGENAMB0DIFF0NORM0_GLSLES
Compiled
glGetError 0x506
GLSL ES compiled: andyv2_fpLightGENDIFF0SPEC0NORM0FresnelREFMSK_GLSLES
Compiled

Offline

#12 6-Apr-2017 23:07:18

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,090
Website

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

maybe this is not a problem with your mesh but with the material.

try to make a very simple app.
start a new project, import your 3d model and export as it.
just to know if you can see the model in this case.

second check is to make sure your model have a correct material

Offline

#13 9-Apr-2017 12:24:57

jasolo
Member
Registered: 2-Apr-2017
Posts: 20

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

I've made a simple app, but again I get a white screen (only in Raspberry, in Windows works). The last lines of the log at the console:

Creating resource group 0.mainScene
Added resource location '/usr/share/prueba/partition/' of type 'ScolFileSystem' to resource group '0.mainScene'
SO3 EXCEPTION(SExceptionInvalidParameters): SSAO technique, not supported by the graphic card! in SSsaoHandler::SeTechniqueParameterValue at /home/pi/Documents/scol-svn/scol/plugins/so3engine/src/SO3Renderer/SO3SsaoHandler.cpp (line 2521)
SO3 EXCEPTION(SExceptionInvalidParameters): SSAO technique, not supported by the graphic card! in SSsaoHandler::SeTechniqueParameterValue at /home/pi/Documents/scol-svn/scol/plugins/so3engine/src/SO3Renderer/SO3SsaoHandler.cpp (line 2521)
SO3 EXCEPTION(SExceptionInvalidParameters): SSAO technique, not supported by the graphic card! in SSsaoHandler::SeTechniqueParameterValue at /home/pi/Documents/scol-svn/scol/plugins/so3engine/src/SO3Renderer/SO3SsaoHandler.cpp (line 2521)
SO3 EXCEPTION(SExceptionInvalidParameters): SSAO technique, not supported by the graphic card! in SSsaoHandler::SeTechniqueParameterValue at /home/pi/Documents/scol-svn/scol/plugins/so3engine/src/SO3Renderer/SO3SsaoHandler.cpp (line 2521)
SO3 EXCEPTION(SExceptionInvalidParameters): SSAO technique, not supported by the graphic card! in SSsaoHandler::SeTechniqueParameterValue at /home/pi/Documents/scol-svn/scol/plugins/so3engine/src/SO3Renderer/SO3SsaoHandler.cpp (line 2521)
SO3 EXCEPTION(SExceptionInvalidParameters): SSAO technique, not supported by the graphic card! in SSsaoHandler::SeTechniqueParameterValue at /home/pi/Documents/scol-svn/scol/plugins/so3engine/src/SO3Renderer/SO3SsaoHandler.cpp (line 2521)
Creating resource group 0.main8.castillomota
Added resource location '/usr/share/prueba/partition/' of type 'ScolFileSystem' to resource group '0.main8.castillomota'
Mesh: Loading /usr/share/prueba/partition/prueba/castillomota/meshes/castillomota_castillo_cartillo_mota-tan2.mesh.

Creating resource group 0.mainScene
Added resource location '/usr/share/prueba/partition/' of type 'ScolFileSystem' to resource group '0.mainScene'
SO3 EXCEPTION(SExceptionInvalidParameters): SSAO technique, not supported by the graphic card! in SSsaoHandler::SeTechniqueParameterValue at /home/pi/Documents/scol-svn/scol/plugins/so3engine/src/SO3Renderer/SO3SsaoHandler.cpp (line 2521)
SO3 EXCEPTION(SExceptionInvalidParameters): SSAO technique, not supported by the graphic card! in SSsaoHandler::SeTechniqueParameterValue at /home/pi/Documents/scol-svn/scol/plugins/so3engine/src/SO3Renderer/SO3SsaoHandler.cpp (line 2521)
SO3 EXCEPTION(SExceptionInvalidParameters): SSAO technique, not supported by the graphic card! in SSsaoHandler::SeTechniqueParameterValue at /home/pi/Documents/scol-svn/scol/plugins/so3engine/src/SO3Renderer/SO3SsaoHandler.cpp (line 2521)
SO3 EXCEPTION(SExceptionInvalidParameters): SSAO technique, not supported by the graphic card! in SSsaoHandler::SeTechniqueParameterValue at /home/pi/Documents/scol-svn/scol/plugins/so3engine/src/SO3Renderer/SO3SsaoHandler.cpp (line 2521)
SO3 EXCEPTION(SExceptionInvalidParameters): SSAO technique, not supported by the graphic card! in SSsaoHandler::SeTechniqueParameterValue at /home/pi/Documents/scol-svn/scol/plugins/so3engine/src/SO3Renderer/SO3SsaoHandler.cpp (line 2521)
SO3 EXCEPTION(SExceptionInvalidParameters): SSAO technique, not supported by the graphic card! in SSsaoHandler::SeTechniqueParameterValue at /home/pi/Documents/scol-svn/scol/plugins/so3engine/src/SO3Renderer/SO3SsaoHandler.cpp (line 2521)
Creating resource group 0.main8.castillomota
Added resource location '/usr/share/prueba/partition/' of type 'ScolFileSystem' to resource group '0.main8.castillomota'
Mesh: Loading /usr/share/prueba/partition/prueba/castillomota/meshes/castillomota_castillo_cartillo_mota-tan2.mesh.

I also activated the log file in usm.ini. It shows the same SO3 exception and the message "Error while setting SSAO parameter!". The log when loading the 3d model is:

Sat Apr  8 22:23:19 201 : Creating resource group 0.main8.castillomota

Sat Apr  8 22:23:19 201 : Added resource location '/usr/share/prueba/partition/' of type 'ScolFileSystem' to resource group '0.main8.castillomota'

Sat Apr  8 22:23:19 201 : USING : scol_fopen : /usr/share/prueba/partition/prueba/castillomota/materials/castillomota.material

Sat Apr  8 22:23:19 201 : /usr/share/prueba/partition/ - prueba/castillomota/materials/castillomota.material - /usr/share/prueba/partition/prueba/castillomota/materials/castillomota.material

Sat Apr  8 22:23:19 201 : >>> Open archive : /usr/share/prueba/partition/prueba/castillomota/materials/castillomota.material

Sat Apr  8 22:23:19 201 : >>> Open archive : /usr/share/prueba/partition/prueba/castillomota/materials/castillomota.material

Sat Apr  8 22:23:19 201 : >>> Open archive : /usr/share/prueba/partition/prueba/castillomota/materials/castillomota.material

Sat Apr  8 22:23:19 201 : >>> Open archive : /usr/share/prueba/partition/prueba/castillomota/materials/castillomota.material

Sat Apr  8 22:23:19 201 : USING : scol_fopen : /usr/share/prueba/partition/prueba/castillomota/meshes/castillomota_castillo_cartillo_mota-tan2.mesh

Sat Apr  8 22:23:19 201 : /usr/share/prueba/partition/ - prueba/castillomota/meshes/castillomota_castillo_cartillo_mota-tan2.mesh - /usr/share/prueba/partition/prueba/castillomota/meshes/castillomota_castillo_cartillo_mota-tan2.mesh

Sat Apr  8 22:23:19 201 : Mesh: Loading /usr/share/prueba/partition/prueba/castillomota/meshes/castillomota_castillo_cartillo_mota-tan2.mesh.

Sat Apr  8 22:23:19 201 : >>> Open archive : /usr/share/prueba/partition/prueba/castillomota/meshes/castillomota_castillo_cartillo_mota-tan2.mesh

Sat Apr  8 22:23:19 201 : OGRE EXCEPTION(7:InternalErrorException): 32 bit hardware buffers are not allowed in OpenGL ES. in GLES2HardwareIndexBuffer at /home/pi/Documents/scol-svn/dependencies/Ogre/Sources/RenderSystems/GLES2/src/OgreGLES2HardwareIndexBuffer.cpp (line 50)

Sat Apr  8 22:23:19 201 : OGRE EXCEPTION(7:InternalErrorException): 32 bit hardware buffers are not allowed in OpenGL ES. in GLES2HardwareIndexBuffer at /home/pi/Documents/scol-svn/dependencies/Ogre/Sources/RenderSystems/GLES2/src/OgreGLES2HardwareIndexBuffer.cpp (line 50)

Sat Apr  8 22:23:19 201 : An exception has occurred: OGRE EXCEPTION(7:InternalErrorException): 32 bit hardware buffers are not allowed in OpenGL ES. in GLES2HardwareIndexBuffer at /home/pi/Documents/scol-svn/dependencies/Ogre/Sources/RenderSystems/GLES2/src/OgreGLES2HardwareIndexBuffer.cpp (line 50)

arkeon wrote:

second check is to make sure your model have a correct material

I'm not sure how to check it. The 3D model is an OBJ exported from Blender with the default parameters. It only has face colours.

Offline

#14 9-Apr-2017 14:38:55

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,090
Website

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

Hello,
the SSAO exceptions just means it is not supported.

The real error is : OGRE EXCEPTION(7:InternalErrorException): 32 bit hardware buffers are not allowed in OpenGL ES. in GLES2HardwareIndexBuffer

So yes this is because the model have too much vertices.

Offline

#15 9-Apr-2017 16:50:08

jasolo
Member
Registered: 2-Apr-2017
Posts: 20

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

I can try to separate my model in several models and show them with the same marker. Or decreasing the number of vertices is the only option?

Offline

#16 9-Apr-2017 17:23:59

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,090
Website

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

I've just make a change in the importer setup to split the mesh into 65535 vertex buffer.
I'll make some tests and add this in the next release.
meanwhile yes you can split your mesh into several submeshes.

But keep in mind the RPI have a low GPU performances you should use very light models no matter what.
so the best method is to optimize your model by limiting the number of faces.

Offline

#17 9-Apr-2017 17:31:15

arkeon
Admin. / Scol language & OpenSpace3D developer
From: Nantes
Registered: 30-Mar-2009
Posts: 5,090
Website

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

you can send me your obj file with materials.
I'll test my change with it and sent you back the converted mesh file

Offline

#18 15-Apr-2017 22:33:42

jasolo
Member
Registered: 2-Apr-2017
Posts: 20

Re: Problem trying to execute examples in Raspberry Pi 3 Model B

Sorry, I didn't notice your last post until now. Meanwhile I split the model in parts and a new problem appeared: the model showed no colour, although it has coloured faces (no problem in Windows or Android). The solution was to use a texture. hmm It runs smoothly in the RPi3 with all the parts adding a total of 58k vertices.

For your test, this is an old version of the mesh with near 89k vertices: https://www.dropbox.com/s/vblm8bb6dbeul … o.zip?dl=1

It is a mesh from a LDraw model, after removing many of the internal faces. The fact of being virtual bricks results on unoptimized meshes.

Offline

Board footer

Powered by FluxBB