Coder Social home page Coder Social logo

rlofc / scene-viewer Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 10.0 170 KB

GamePlay 3D Blender Scene Viewer

Home Page: http://randomlinesofcode.com/blog/articles/gameplay-scene-viewer/

License: Apache License 2.0

Python 11.85% C 0.50% C++ 26.58% CMake 5.54% Makefile 3.10% GLSL 52.43%

scene-viewer's People

Contributors

bosoni avatar loris-p avatar mecwerks avatar rlofc 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scene-viewer's Issues

Linking Problem: vorbisfile

I use Arch Linux 64bit. When attempting to make scene-viewer I would get linking errors for undefined ov_* references. After I added "vorbisfile" to GAMEPLAY_LIBRARIES within the CMakeLists.txt file, the linking errors disappeared.

Problem with libraries NOT FOUND

My Errors are theses:

-- Library Found: GLEW Path: /usr/lib64/libGLEW.so
-- Library Found: lua Path: /usr/lib64/liblua.so
-- Library Found: png Path: /usr/lib64/libpng.so
-- Library Found: BulletDynamics Path: FOUND_LIB_BulletDynamics-NOTFOUND
-- Library Found: BulletCollision Path: FOUND_LIB_BulletCollision-NOTFOUND
-- Library Found: LinearMath Path: FOUND_LIB_LinearMath-NOTFOUND
-- Library Found: openal Path: /usr/lib64/libopenal.so
-- Library Found: vorbis Path: /usr/lib64/libvorbis.so
-- Library Found: ogg Path: /usr/lib64/libogg.so
-- Library Found: z Path: /usr/lib64/libz.so
-- Library Found: GL Path: /usr/lib64/libGL.so
-- Library Found: m Path: /usr/lib64/libm.so
-- Library Found: X11 Path: /usr/lib64/libX11.so
-- Library Found: dl Path: /usr/lib64/libdl.so
-- Library Found: rt Path: /usr/lib64/librt.so
-- Library Found: pthread Path: /usr/lib64/libpthread.so
-- Library Found: gtk-x11-2.0 Path: /usr/lib64/libgtk-x11-2.0.so
-- Library Found: gobject-2.0 Path: /usr/lib64/libgobject-2.0.so
-- Library Found: glib-2.0 Path: /usr/lib64/libglib-2.0.so

But GamePlay is one level down. Why for example /usr/lib64/liblua.so this?

missing Boolean returns

Hey
in function : bool SceneViewer::checkScene(Node* node, Ray* ray)
add return false and false so it looks like this :
bool SceneViewer::checkScene(Node* node, Ray* ray)
{
Model* model = node->getModel();
if (model)
{
BoundingBox worldSpaceBoundingBox(model->getMesh()->getBoundingBox());
worldSpaceBoundingBox.transform(node->getWorldMatrix());

  float distance = FLT_MAX;
  if( (distance = ray->intersects(worldSpaceBoundingBox)) != Ray::INTERSECTS_NONE )
  {
     _selected = node;
     _bPlaySelected->setText(node->getId());
     _bPlaySelected->setEnabled(true);
     return true;  // ADD THIS 
  }

}
return false; // ADD THIS ALSO
}

also in this function SceneViewer::startAnims(Node* node):
missing return false
bool SceneViewer::startAnims(Node* node)
{
if (node->getModel()) {
this->playNodeAmination(node);
}
return false; // ADD THIS
}

without them it not passing VS compilation

Viewer is not showing nothing, cannot locate the problem

I have successfully compiled both Gameplay3D engine and the viewer. I could as well install the add-on on blender.
When I click on preview, the viewer pops up but it does not show the scene, it shows only the UI and a grid, I can unlock the camera and change its position, change the background color, but no objects of the scene, I am using Blender 2.78.

Could you please give some suggestion about this. What went wrong ?

Best regards

Permission denied

I'm having a problem with scene viewer, what am i doing wrong? i selected the encode and viewer to the correct files


FBX export starting... '/home/alexandre/Documentos/programming/C/gameplay3d/scene-viewer/build/bin/linux/res/.fbx'
FBX export prepare: Wrapping Objects...
    Done (0.000304 sec)

FBX export prepare: Wrapping Data (lamps, cameras, empties)...
    Done (0.000405 sec)

FBX export prepare: Wrapping Meshes...
    Done (0.000182 sec)

FBX export prepare: Wrapping ShapeKeys...
    Done (0.000039 sec)

FBX export prepare: Wrapping Armatures...
    Done (0.000030 sec)

FBX export prepare: Wrapping World...
    Done (0.000181 sec)

FBX export prepare: Wrapping Materials...
    Done (0.000202 sec)

FBX export prepare: Wrapping Textures...
    Done (0.000077 sec)

FBX export prepare: Wrapping Animations...
    Done (0.000062 sec)

FBX export prepare: Generating templates...
    Done (0.000119 sec)

FBX export prepare: Generating Connections...
    Done (0.000076 sec)

FBX export fetch empties (0)...
    Done (0.000028 sec)

FBX export fetch lamps (1)...
    Done (0.000170 sec)

FBX export fetch cameras (1)...
    Done (0.000532 sec)

FBX export fetch meshes (1)...
    Done (0.000445 sec)

FBX export fetch objects (3)...
    Done (0.000606 sec)

FBX export fetch remaining...
    Done (0.000280 sec)

FBX export fetch animations...
    Done (0.000037 sec)

export finished in 0.0101 sec.
Traceback (most recent call last):
  File "/home/alexandre/.config/blender/2.78/scripts/addons/scene-viewer.py", line 218, in execute
    subprocess.call(args)
  File "/home/alexandre/blender/2.78/python/lib/python3.5/subprocess.py", line 560, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/home/alexandre/blender/2.78/python/lib/python3.5/subprocess.py", line 950, in __init__
    restore_signals, start_new_session)
  File "/home/alexandre/blender/2.78/python/lib/python3.5/subprocess.py", line 1544, in _execute_child
    raise child_exception_type(errno_num, err_msg)
PermissionError: [Errno 13] Permission denied

location: <unknown location>:-1

location: <unknown location>:-1

Cant fine scene.gpb?

Hi

I am trying to use your tool but hitting a wall here. I am on Lin 64 and compiled GP3d and SV. This is the error I get

FBX export starting... '/DEV/GIT/scene-viewer/build/bin/linux/res/scene.fbx'
[(None, None)]
507 507
export finished in 0.0431 sec.
/DEV/GIT/GamePlay/bin/linux/gameplay-encoder: error while loading shared libraries: libfbxsdk.so: cannot open shared object file: No such file or directory
GLX version: 1.4
GL version: 3.0
create -- Failed to open file 'res/scene.gpb'.

Using getLightDirection/setLightDirection which no more exists & png related problem

After cloning and running Cmake as in your video there are some errors related to lacking getter and setter for LightDirection on the Scene class:

Scanning dependencies of target scene-viewer
[ 33%] Building CXX object CMakeFiles/scene-viewer.dir/src/SceneViewer.cpp.o
/home/syjgin/Загрузки/scene-viewer/src/SceneViewer.cpp: In member function ‘virtual void SceneViewer::initialize()’:
/home/syjgin/Загрузки/scene-viewer/src/SceneViewer.cpp:26:23: error: ‘class gameplay::Scene’ has no member named ‘setLightDirection’
/home/syjgin/Загрузки/scene-viewer/src/SceneViewer.cpp:38:25: error: ‘class gameplay::Scene’ has no member named ‘getLightDirection’
/home/syjgin/Загрузки/scene-viewer/src/SceneViewer.cpp: In member function ‘virtual void SceneViewer::controlEvent(gameplay::Control*, gameplay::Control::Listener::EventType)’:
/home/syjgin/Загрузки/scene-viewer/src/SceneViewer.cpp:130:31: error: ‘class gameplay::Scene’ has no member named ‘getLightDirection’
/home/syjgin/Загрузки/scene-viewer/src/SceneViewer.cpp:132:18: error: ‘class gameplay::Scene’ has no member named ‘setLightDirection’
/home/syjgin/Загрузки/scene-viewer/src/SceneViewer.cpp:135:31: error: ‘class gameplay::Scene’ has no member named ‘getLightDirection’
/home/syjgin/Загрузки/scene-viewer/src/SceneViewer.cpp:137:18: error: ‘class gameplay::Scene’ has no member named ‘setLightDirection’
/home/syjgin/Загрузки/scene-viewer/src/SceneViewer.cpp:140:31: error: ‘class gameplay::Scene’ has no member named ‘getLightDirection’
/home/syjgin/Загрузки/scene-viewer/src/SceneViewer.cpp:142:18: error: ‘class gameplay::Scene’ has no member named ‘setLightDirection’
make[2]: *** [CMakeFiles/scene-viewer.dir/src/SceneViewer.cpp.o] Error 1
make[1]: *** [CMakeFiles/scene-viewer.dir/all] Error 2
make: *** [all] Error 2

After commenting all variables related to light direction, there are error related to libpng or gtk(as I think - but in my system I have installed development files for both):

/home/syjgin/Загрузки/GamePlay/build/gameplay/libgameplay.a(PlatformLinux.cpp.o): In function `gameplay::Platform::displayFileDialog(unsigned long, char const*, char const*, char const*, char const*)':                                                              
PlatformLinux.cpp:(.text+0x36e2): undefined reference to `gtk_init_check'                                                                                                                                                                                              
PlatformLinux.cpp:(.text+0x37a6): undefined reference to `gtk_file_chooser_dialog_new'                                                                                                                                                                                 
PlatformLinux.cpp:(.text+0x37b2): undefined reference to `gtk_file_filter_new'                                                                                                                                                                                         
PlatformLinux.cpp:(.text+0x3895): undefined reference to `gtk_file_filter_add_pattern'                                                                                                                                                                                 
PlatformLinux.cpp:(.text+0x38db): undefined reference to `gtk_file_chooser_get_type'                                                                                                                                                                                   
PlatformLinux.cpp:(.text+0x38f0): undefined reference to `g_type_check_instance_cast'
PlatformLinux.cpp:(.text+0x3902): undefined reference to `gtk_file_chooser_set_filter'
PlatformLinux.cpp:(.text+0x3920): undefined reference to `g_get_current_dir'
PlatformLinux.cpp:(.text+0x394f): undefined reference to `g_free'
PlatformLinux.cpp:(.text+0x3981): undefined reference to `gtk_file_chooser_get_type'
PlatformLinux.cpp:(.text+0x3996): undefined reference to `g_type_check_instance_cast'
PlatformLinux.cpp:(.text+0x39a1): undefined reference to `gtk_file_chooser_set_current_folder'
PlatformLinux.cpp:(.text+0x39b0): undefined reference to `gtk_file_chooser_get_type'
PlatformLinux.cpp:(.text+0x39c5): undefined reference to `g_type_check_instance_cast'
PlatformLinux.cpp:(.text+0x39d2): undefined reference to `gtk_file_chooser_set_do_overwrite_confirmation'
PlatformLinux.cpp:(.text+0x39d7): undefined reference to `gtk_file_chooser_get_type'
PlatformLinux.cpp:(.text+0x39ec): undefined reference to `g_type_check_instance_cast'
PlatformLinux.cpp:(.text+0x39f9): undefined reference to `gtk_file_chooser_set_current_name'
PlatformLinux.cpp:(.text+0x39fe): undefined reference to `gtk_dialog_get_type'
PlatformLinux.cpp:(.text+0x3a13): undefined reference to `g_type_check_instance_cast'
PlatformLinux.cpp:(.text+0x3a1b): undefined reference to `gtk_dialog_run'
PlatformLinux.cpp:(.text+0x3a2a): undefined reference to `gtk_file_chooser_get_type'
PlatformLinux.cpp:(.text+0x3a3f): undefined reference to `g_type_check_instance_cast'
PlatformLinux.cpp:(.text+0x3a47): undefined reference to `gtk_file_chooser_get_filename'
PlatformLinux.cpp:(.text+0x3a76): undefined reference to `g_free'
PlatformLinux.cpp:(.text+0x3a85): undefined reference to `gtk_widget_destroy'
PlatformLinux.cpp:(.text+0x3a8c): undefined reference to `gtk_main_iteration'
PlatformLinux.cpp:(.text+0x3a91): undefined reference to `gtk_events_pending'
/home/syjgin/Загрузки/GamePlay/build/gameplay/libgameplay.a(Image.cpp.o): In function `gameplay::Image::create(char const*)':
Image.cpp:(.text+0x365): undefined reference to `png_set_longjmp_fn'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/linux/scene-viewer] Error 1
make[1]: *** [CMakeFiles/scene-viewer.dir/all] Error 2
make: *** [all] Error 2

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.