How to load a 3D model in ogre-python Topic is solved

Problems building or running the engine, queries about how to use features etc.
Post Reply
8Observer8
Halfling
Posts: 78
Joined: Sat Feb 29, 2020 12:29 am
x 2

How to load a 3D model in ogre-python

Post by 8Observer8 »

Hello,

I try to use resources.cfg like in this example in C++.

I have these files:
FilesForOgrePython.png
FilesForOgrePython.png (3.53 KiB) Viewed 7372 times
resources.cfg
[Models]
FileSystem=.\
But the program cannot load the model:
Mesh: Loading ogrehead.mesh. Traceback (most recent call last): File "main.py", line 65, in <module> main() File "main.py", line 56, in main ent = scn_mgr.createEntity("ogrehead.mesh") #Sinbad.mesh RuntimeError: Ogre::FileNotFoundException::FileNotFoundException: Cannot locate resource ogrehead.mesh in resource group OgreAutodetect. in ResourceGroupManager::openResource at C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-fac8fhuy\OgreMain\src\OgreResourceGroupManager.cpp (line 659)
main.py

Code: Select all

import Ogre
import Ogre.Bites
import Ogre.RTShader

class KeyListener(Ogre.Bites.InputListener):
    def __init__(self):
        Ogre.Bites.InputListener.__init__(self)

    def keyPressed(self, evt):
        if evt.keysym.sym == Ogre.Bites.SDLK_ESCAPE:
            Ogre.Root.getSingleton().queueEndRendering()

        return True

def main():
    ctx = Ogre.Bites.ApplicationContext("PySample")

    ctx.initApp()

    # register for input events
    klistener = KeyListener() # must keep a reference around
    ctx.addInputListener(klistener)

    root = ctx.getRoot()
    scn_mgr = root.createSceneManager()

    shadergen = Ogre.RTShader.ShaderGenerator.getSingleton()
    shadergen.addSceneManager(scn_mgr)  # must be done before we do anything with the scene

    # without light we would just get a black screen
    scn_mgr.setAmbientLight((.1, .1, .1))

    light = scn_mgr.createLight("MainLight")
    lightnode = scn_mgr.getRootSceneNode().createChildSceneNode()
    lightnode.setPosition(0, 10, 15)
    lightnode.attachObject(light)

    # create the camera
    cam = scn_mgr.createCamera("myCam")
    cam.setNearClipDistance(5)
    cam.setAutoAspectRatio(True)
    camnode = scn_mgr.getRootSceneNode().createChildSceneNode()
    camnode.attachObject(cam)

    # map input events to camera controls
    camman = Ogre.Bites.CameraMan(camnode)
    camman.setStyle(Ogre.Bites.CS_ORBIT)
    camman.setYawPitchDist(0, 0.3, 15)
    ctx.addInputListener(camman)

    # and tell it to render into the main window
    vp = ctx.getRenderWindow().addViewport(cam)
    vp.setBackgroundColour((.3, .3, .3))

    # finally something to render
    ent = scn_mgr.createEntity("ogrehead.mesh") #Sinbad.mesh
    node = scn_mgr.getRootSceneNode().createChildSceneNode()
    node.attachObject(ent)

    root.startRendering() # blocks until queueEndRendering is called

    ctx.closeApp()

if __name__ == "__main__":
    main()
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: How to load a 3D model in ogre-python

Post by paroj »

please attach the ogre.log
8Observer8
Halfling
Posts: 78
Joined: Sat Feb 29, 2020 12:29 am
x 2

Re: How to load a 3D model in ogre-python

Post by 8Observer8 »

ogre.log
Creating resource group General
Creating resource group OgreInternal
Creating resource group OgreAutodetect
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 type 'FileSystem' registered
ArchiveFactory for type 'Zip' registered
ArchiveFactory for type 'EmbeddedZip' registered
DDS codec registering
ETC codec registering
ASTC codec registering
Registering ResourceManager for type GpuProgram
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.
MovableObjectFactory for type 'StaticGeometry' registered.
MovableObjectFactory for type 'Rectangle2D' registered.
*-*-* OGRE Initialising
*-*-* Version 13.1.1 (Tsathoggua)
Installing plugin: GL RenderSystem
OpenGL Rendering Subsystem created.
Plugin successfully installed
Installing plugin: GL 3+ RenderSystem
OpenGL 3+ Rendering Subsystem created.
Plugin successfully installed
Installing plugin: OpenGL ES 2.0 RenderSystem
OpenGL ES 2.x Rendering Subsystem created.
Plugin successfully installed
Installing plugin: Tiny RenderSystem
Tiny Rendering Subsystem created.
Plugin successfully installed
Installing plugin: D3D11 RenderSystem
D3D11: Direct3D11 Rendering Subsystem created.
D3D11: Driver Detection Starts
D3D11: "Intel(R) HD Graphics 3000"
D3D11: "NVIDIA GeForce GT 540M"
D3D11: "Microsoft Basic Render Driver (software)"
D3D11: Driver Detection Ends
Plugin successfully installed
Installing plugin: Octree Scene Manager
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
Particle Affector Type 'TextureAnimator' registered
Plugin successfully installed
Installing plugin: STB Image Codec
stb_image - v2.27 - public domain image loader
Supported formats: jpeg,jpg,png,bmp,psd,tga,gif,pic,ppm,pgm,hdr
Plugin successfully installed
Installing plugin: DotScene Loader
Plugin successfully installed
Installing plugin: Assimp
Assimp - 5.0.-1973596740 - Open-Asset-Importer
Supported formats: 3d 3ds 3mf ac ac3d acc amf ase ask assbin b3d blend bvh cob csm dae dxf enff fbx glb gltf hmp ifc ifczip irr irrmesh lwo lws lxo md2 md3 md5anim md5camera md5mesh mdl mot ms3d ndo nff obj off ogex pk3 ply pmx prj q3o q3s scn sib smd stl stp ter uc vta x x3d x3db xgl xml zae zgl

Plugin successfully installed
OverlayElementFactory for type Panel registered.
OverlayElementFactory for type BorderPanel registered.
OverlayElementFactory for type TextArea registered.
Registering ResourceManager for type Font
D3D11: RenderSystem Option: Allow NVPerfHUD = No
D3D11: RenderSystem Option: Debug Layer = Off
D3D11: RenderSystem Option: Driver type = Hardware
D3D11: RenderSystem Option: FSAA = 1
D3D11: RenderSystem Option: Full Screen = No
D3D11: RenderSystem Option: Information Queue Exceptions Bottom Level = No information queue exceptions
D3D11: RenderSystem Option: Max Requested Feature Levels = 11.0
D3D11: RenderSystem Option: Min Requested Feature Levels = 9.1
D3D11: RenderSystem Option: Rendering Device = (default)
D3D11: RenderSystem Option: Reversed Z-Buffer = No
D3D11: RenderSystem Option: VSync = Yes
D3D11: RenderSystem Option: VSync Interval = 1
D3D11: RenderSystem Option: Video Mode = 800 x 600 @ 32-bit colour
D3D11: RenderSystem Option: sRGB Gamma Conversion = No
CPU Identifier & Features
-------------------------
* CPU ID: GenuineIntel: Intel(R) Core(TM) i3-2330M CPU @ 2.20GHz
* SSE: yes
* SSE2: yes
* SSE3: yes
* SSE41: yes
* SSE42: yes
* MMX: yes
* MMXEXT: yes
* 3DNOW: no
* 3DNOWEXT: no
* CMOV: yes
* TSC: yes
*INVARIANT TSC: yes
* FPU: yes
* PRO: yes
* HT: no
-------------------------
*** Starting Win32GL Subsystem ***
RenderSystem::_createRenderWindow "PySample", 640x480 windowed miscParams: FSAA=0 colourDepth=32 displayFrequency=N/A externalWindowHandle=4131964 gamma=No sdlwin=1686036837824 vsync=Yes vsyncInterval=1
Supported WGL extensions: WGL_ARB_buffer_region WGL_ARB_create_context WGL_ARB_create_context_no_error WGL_ARB_create_context_profile WGL_ARB_create_context_robustness WGL_ARB_context_flush_control WGL_ARB_extensions_string WGL_ARB_make_current_read WGL_ARB_multisample WGL_ARB_pbuffer WGL_ARB_pixel_format WGL_ARB_pixel_format_float WGL_ARB_render_texture WGL_ATI_pixel_format_float WGL_EXT_colorspace WGL_EXT_create_context_es_profile WGL_EXT_create_context_es2_profile WGL_EXT_extensions_string WGL_EXT_framebuffer_sRGB WGL_EXT_pixel_format_packed_float WGL_EXT_swap_control WGL_EXT_swap_control_tear WGL_NVX_DX_interop WGL_NV_DX_interop WGL_NV_DX_interop2 WGL_NV_copy_image WGL_NV_delay_before_swap WGL_NV_float_buffer WGL_NV_multisample_coverage WGL_NV_render_depth_texture WGL_NV_render_texture_rectangle
GL_VERSION = 4.6.0.0
GL_VENDOR = NVIDIA Corporation
GL_RENDERER = GeForce GT 540M/PCIe/SSE2
GL_EXTENSIONS = GL_AMD_multi_draw_indirect GL_ARB_arrays_of_arrays GL_ARB_base_instance GL_ARB_blend_func_extended GL_ARB_buffer_storage GL_ARB_clear_buffer_object GL_ARB_clear_texture GL_ARB_clip_control GL_ARB_color_buffer_float GL_ARB_compressed_texture_pixel_storage GL_ARB_conservative_depth GL_ARB_compute_shader GL_ARB_compute_variable_group_size GL_ARB_conditional_render_inverted GL_ARB_copy_buffer GL_ARB_copy_image GL_ARB_cull_distance GL_ARB_debug_output GL_ARB_depth_buffer_float GL_ARB_depth_clamp GL_ARB_depth_texture GL_ARB_derivative_control GL_ARB_direct_state_access GL_ARB_draw_buffers GL_ARB_draw_buffers_blend GL_ARB_draw_indirect GL_ARB_draw_elements_base_vertex GL_ARB_draw_instanced GL_ARB_enhanced_layouts GL_ARB_ES2_compatibility GL_ARB_ES3_compatibility GL_ARB_ES3_1_compatibility GL_ARB_ES3_2_compatibility GL_ARB_explicit_attrib_location GL_ARB_explicit_uniform_location GL_ARB_fragment_coord_conventions GL_ARB_fragment_layer_viewport GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_framebuffer_no_attachments GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB GL_ARB_geometry_shader4 GL_ARB_get_program_binary GL_ARB_get_texture_sub_image GL_ARB_gl_spirv GL_ARB_gpu_shader5 GL_ARB_gpu_shader_fp64 GL_ARB_gpu_shader_int64 GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_imaging GL_ARB_indirect_parameters GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_internalformat_query2 GL_ARB_invalidate_subdata GL_ARB_map_buffer_alignment GL_ARB_map_buffer_range GL_ARB_multi_bind GL_ARB_multi_draw_indirect GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_occlusion_query2 GL_ARB_parallel_shader_compile GL_ARB_pipeline_statistics_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_polygon_offset_clamp GL_ARB_program_interface_query GL_ARB_provoking_vertex GL_ARB_query_buffer_object GL_ARB_robust_buffer_access_behavior GL_ARB_robustness GL_ARB_sample_shading GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_separate_shader_objects GL_ARB_shader_atomic_counter_ops GL_ARB_shader_atomic_counters GL_ARB_shader_bit_encoding GL_ARB_shader_draw_parameters GL_ARB_shader_group_vote GL_ARB_shader_image_load_store GL_ARB_shader_image_size GL_ARB_shader_objects GL_ARB_shader_precision GL_ARB_shader_storage_buffer_object GL_ARB_shader_subroutine GL_ARB_shader_texture_image_samples GL_ARB_shader_texture_lod GL_ARB_shading_language_100 GL_ARB_shading_language_420pack GL_ARB_shading_language_include GL_ARB_shading_language_packing GL_ARB_shadow GL_ARB_sparse_buffer GL_ARB_sparse_texture GL_ARB_spirv_extensions GL_ARB_stencil_texturing GL_ARB_sync GL_ARB_tessellation_shader GL_ARB_texture_barrier GL_ARB_texture_border_clamp GL_ARB_texture_buffer_object GL_ARB_texture_buffer_object_rgb32 GL_ARB_texture_buffer_range GL_ARB_texture_compression GL_ARB_texture_compression_bptc GL_ARB_texture_compression_rgtc GL_ARB_texture_cube_map GL_ARB_texture_cube_map_array GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_filter_anisotropic GL_ARB_texture_float GL_ARB_texture_gather GL_ARB_texture_mirror_clamp_to_edge GL_ARB_texture_mirrored_repeat GL_ARB_texture_multisample GL_ARB_texture_non_power_of_two GL_ARB_texture_query_levels GL_ARB_texture_query_lod GL_ARB_texture_rectangle GL_ARB_texture_rg GL_ARB_texture_rgb10_a2ui GL_ARB_texture_stencil8 GL_ARB_texture_storage GL_ARB_texture_storage_multisample GL_ARB_texture_swizzle GL_ARB_texture_view GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_transform_feedback_instanced GL_ARB_transform_feedback_overflow_query GL_ARB_transpose_matrix GL_ARB_uniform_buffer_object GL_ARB_vertex_array_bgra GL_ARB_vertex_array_object GL_ARB_vertex_attrib_64bit GL_ARB_vertex_attrib_binding GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_vertex_type_10f_11f_11f_rev GL_ARB_vertex_type_2_10_10_10_rev GL_ARB_viewport_array GL_ARB_window_pos GL_ATI_draw_buffers GL_ATI_texture_float GL_ATI_texture_mirror_once GL_S3_s3tc GL_EXT_texture_env_add GL_EXT_abgr GL_EXT_bgra GL_EXT_bindable_uniform GL_EXT_blend_color GL_EXT_blend_equation_separate GL_EXT_blend_func_separate GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_compiled_vertex_array GL_EXT_Cg_shader GL_EXT_depth_bounds_test GL_EXT_direct_state_access GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXTX_framebuffer_mixed_formats GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_framebuffer_object GL_EXT_framebuffer_sRGB GL_EXT_geometry_shader4 GL_EXT_gpu_program_parameters GL_EXT_gpu_shader4 GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_float GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_polygon_offset_clamp GL_EXT_provoking_vertex GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_shader_objects GL_EXT_separate_specular_color GL_EXT_shader_image_load_store GL_EXT_shader_integer_mix GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D GL_EXT_texture_array GL_EXT_texture_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_latc GL_EXT_texture_compression_rgtc GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_EXT_texture_filter_anisotropic GL_EXT_texture_integer GL_EXT_texture_lod GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_shared_exponent GL_EXT_texture_sRGB GL_EXT_texture_sRGB_decode GL_EXT_texture_storage GL_EXT_texture_swizzle GL_EXT_timer_query GL_EXT_transform_feedback2 GL_EXT_vertex_array GL_EXT_vertex_array_bgra GL_EXT_vertex_attrib_64bit GL_EXT_window_rectangles GL_EXT_import_sync_object GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KHR_context_flush_control GL_KHR_debug GL_KHR_parallel_shader_compile GL_KHR_no_error GL_KHR_robust_buffer_access_behavior GL_KHR_robustness GL_KTX_buffer_region GL_NV_alpha_to_coverage_dither_control GL_NV_bindless_multi_draw_indirect GL_NV_bindless_multi_draw_indirect_count GL_NV_blend_equation_advanced GL_NV_blend_square GL_NV_command_list GL_NV_compute_program5 GL_NV_conditional_render GL_NV_copy_depth_to_color GL_NV_copy_image GL_NV_depth_buffer_float GL_NV_depth_clamp GL_NV_draw_texture GL_NV_ES1_1_compatibility GL_NV_ES3_1_compatibility GL_NV_explicit_multisample GL_NV_fence GL_NV_float_buffer GL_NV_fog_distance GL_NV_fragment_program GL_NV_fragment_program_option GL_NV_fragment_program2 GL_NV_framebuffer_multisample_coverage GL_NV_geometry_shader4 GL_NV_gpu_program4 GL_NV_internalformat_sample_query GL_NV_gpu_program4_1 GL_NV_gpu_program5 GL_NV_gpu_program5_mem_extended GL_NV_gpu_program_fp64 GL_NV_gpu_shader5 GL_NV_half_float GL_NV_light_max_exponent GL_NV_multisample_coverage GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_parameter_buffer_object GL_NV_parameter_buffer_object2 GL_NV_path_rendering GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_primitive_restart GL_NV_query_resource GL_NV_query_resource_tag GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_shader_atomic_counters GL_NV_shader_atomic_float GL_NV_shader_buffer_load GL_NV_shader_storage_buffer_object GL_NV_texgen_reflection GL_NV_texture_barrier GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_multisample GL_NV_texture_rectangle GL_NV_texture_rectangle_compressed GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_transform_feedback GL_NV_transform_feedback2 GL_NV_uniform_buffer_unified_memory GL_NV_vertex_array_range GL_NV_vertex_array_range2 GL_NV_vertex_attrib_integer_64bit GL_NV_vertex_buffer_unified_memory GL_NV_vertex_program GL_NV_vertex_program1_1 GL_NV_vertex_program2 GL_NV_vertex_program2_option GL_NV_vertex_program3 GL_NVX_conditional_render GL_NVX_gpu_memory_info GL_NVX_multigpu_info GL_NV_shader_thread_group GL_KHR_blend_equation_advanced GL_SGIS_generate_mipmap GL_SGIS_texture_lod GL_SGIX_depth_texture GL_SGIX_shadow GL_SUN_slice_accum GL_WIN_swap_hint WGL_EXT_swap_control
**************************************
*** OpenGL 3+ Renderer Started ***
**************************************
FBO PF_UNKNOWN depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_L8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_L16 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_A8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_BYTE_LA depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R5G6B5 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_B5G6R5 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_A4R4G4B4 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_A1R5G5B5 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R8G8B8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_B8G8R8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_A8R8G8B8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_A8B8G8R8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_B8G8R8A8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_A2R10G10B10 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_A2B10G10R10 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_FLOAT16_RGB depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_FLOAT16_RGBA depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_FLOAT32_RGB depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_FLOAT32_RGBA depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_X8R8G8B8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_X8B8G8R8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R8G8B8A8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_DEPTH16 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_SHORT_RGBA depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R3G3B2 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_FLOAT16_R depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_FLOAT32_R depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_SHORT_GR depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_FLOAT16_GR depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_FLOAT32_GR depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_SHORT_RGB depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R11G11B10_FLOAT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R8_UINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R8G8_UINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R8G8B8_UINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R8G8B8A8_UINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R16_UINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R16G16_UINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R16G16B16_UINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R16G16B16A16_UINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R32_UINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R32G32_UINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R32G32B32_UINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R32G32B32A32_UINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R8_SINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R8G8_SINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R8G8B8_SINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R8G8B8A8_SINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R16_SINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R16G16_SINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R16G16B16_SINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R16G16B16A16_SINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R32_SINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R32G32_SINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R32G32B32_SINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R32G32B32A32_SINT depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R8G8 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R8_SNORM depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R8G8_SNORM depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R8G8B8_SNORM depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R8G8B8A8_SNORM depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R16_SNORM depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R16G16_SNORM depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R16G16B16_SNORM depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_R16G16B16A16_SNORM depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_DEPTH32 depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
FBO PF_DEPTH32F depth/stencil support: D0S0 D0S8 D16S0 D16S8 D24S0 D24S8 D32S0 D32S8 D32S0 D32S8 Packed-D24S8 Packed-D32S8
[GL] : Valid FBO targets PF_UNKNOWN PF_L8 PF_L16 PF_A8 PF_BYTE_LA PF_R5G6B5 PF_B5G6R5 PF_A4R4G4B4 PF_A1R5G5B5 PF_R8G8B8 PF_B8G8R8 PF_A8R8G8B8 PF_A8B8G8R8 PF_B8G8R8A8 PF_A2R10G10B10 PF_A2B10G10R10 PF_FLOAT16_RGB PF_FLOAT16_RGBA PF_FLOAT32_RGB PF_FLOAT32_RGBA PF_X8R8G8B8 PF_X8B8G8R8 PF_R8G8B8A8 PF_DEPTH16 PF_SHORT_RGBA PF_R3G3B2 PF_FLOAT16_R PF_FLOAT32_R PF_SHORT_GR PF_FLOAT16_GR PF_FLOAT32_GR PF_SHORT_RGB PF_R11G11B10_FLOAT PF_R8_UINT PF_R8G8_UINT PF_R8G8B8_UINT PF_R8G8B8A8_UINT PF_R16_UINT PF_R16G16_UINT PF_R16G16B16_UINT PF_R16G16B16A16_UINT PF_R32_UINT PF_R32G32_UINT PF_R32G32B32_UINT PF_R32G32B32A32_UINT PF_R8_SINT PF_R8G8_SINT PF_R8G8B8_SINT PF_R8G8B8A8_SINT PF_R16_SINT PF_R16G16_SINT PF_R16G16B16_SINT PF_R16G16B16A16_SINT PF_R32_SINT PF_R32G32_SINT PF_R32G32B32_SINT PF_R32G32B32A32_SINT PF_R8 PF_R8G8 PF_R8_SNORM PF_R8G8_SNORM PF_R8G8B8_SNORM PF_R8G8B8A8_SNORM PF_R16_SNORM PF_R16G16_SNORM PF_R16G16B16_SNORM PF_R16G16B16A16_SNORM PF_DEPTH32 PF_DEPTH32F
Registering ResourceManager for type Texture
RenderSystem capabilities
-------------------------
RenderSystem Name: OpenGL 3+ Rendering Subsystem
GPU Vendor: nvidia
Device Name: GeForce GT 540M/PCIe/SSE2
Driver Version: 4.6.0.0
* Fixed function pipeline: no
* 32-bit index buffers: yes
* Hardware stencil buffer: yes
- Stencil depth: 8
- Two sided stencil support: yes
- Wrap stencil values: yes
* Vertex programs: yes
- Number of floating-point constants: 4096
- Number of integer constants: 4096
- Number of boolean constants: 4096
* Fragment programs: yes
- Number of floating-point constants: 4096
- Number of integer constants: 4096
- Number of boolean constants: 4096
* Geometry programs: yes
- Number of floating-point constants: 2048
- Number of integer constants: 2048
- Number of boolean constants: 2048
* Tessellation Hull programs: yes
- Number of floating-point constants: 2048
- Number of integer constants: 2048
- Number of boolean constants: 2048
* Tessellation Domain programs: yes
- Number of floating-point constants: 2048
- Number of integer constants: 2048
- Number of boolean constants: 2048
* Compute programs: yes
- Number of floating-point constants: 2048
- Number of integer constants: 2048
- Number of boolean constants: 2048
* Supported Shader Profiles: gl_spirv glsl glsl130 glsl140 glsl150 glsl330 glsl400 glsl410 glsl420 glsl430 glsl440 glsl450 glsl460
* Read-back compiled shader: yes
* Number of vertex attributes: 16
* Textures
- Number of texture units: 16
- Floating point: yes
- Non-power-of-two: yes
- 1D textures: yes
- 2D array textures: yes
- 3D textures: yes
- Anisotropic filtering: yes
* Texture Compression: yes
- DXT: yes
- VTC: yes
- PVRTC: no
- ATC: no
- ETC1: no
- ETC2: yes
- BC4/BC5: yes
- BC6H/BC7: yes
- ASTC: no
- Automatic mipmap generation: yes
* Vertex Buffers
- Render to Vertex Buffer: yes
- Instance Data: yes
- Primitive Restart: yes
* Vertex texture fetch: yes
- Max vertex textures: 16
- Vertex textures shared: yes
* Read/Write Buffers: yes
* Hardware Occlusion Query: yes
* User clip planes: yes
* Depth clamping: yes
* Hardware render-to-texture: yes
- Multiple Render Targets: 8
- With different bit depths: yes
* Point Sprites: yes
- Extended parameters: yes
- Max Size: 189.875
* Wide Lines: yes
* Hardware Gamma: yes
* PBuffer support: no
* Vertex Array Objects: yes
* Separate shader objects: yes
- redeclare GLSL interface block: yes
* Debugging/ profiling events: yes
* Map buffer storage: yes
DefaultWorkQueue('Root') initialising on thread 2504.
Particle Renderer Type 'billboard' registered
SceneManagerFactory for type 'OctreeSceneManager' registered.
DefaultWorkQueue('Root')::WorkerFunc - thread 356 starting.
Parsing 'E:/ProgramFiles/Python/Python38/bin/resources.cfg'
DefaultWorkQueue('Root')::WorkerFunc - thread 7052 starting.
Creating resource group Essential
Added resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/packs/SdkTrays.zip' of type 'Zip' to resource group 'Essential'
Added resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/packs/profiler.zip' of type 'Zip' to resource group 'Essential'
Added resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/Main' of type 'FileSystem' to resource group 'OgreInternal'
Added resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/RTShaderLib/GLSL' of type 'FileSystem' to resource group 'OgreInternal'
Added resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/RTShaderLib/HLSL_Cg' of type 'FileSystem' to resource group 'OgreInternal'
Added resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/Terrain/' of type 'FileSystem' to resource group 'OgreInternal'
Parsing scripts for resource group Essential
Parsing script SdkTrays.material
Parsing script OgreProfiler.material
Parsing script SdkTrays.fontdef
Parsing script SdkTrays.overlay
Texture 'sdk_cursor.png': Loading 1 faces(PF_A8B8G8R8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,32x32x1.
Texture 'sdk_tray.png': Loading 1 faces(PF_A8B8G8R8,64x64x1) with 6 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,64x64x1.
Texture 'sdk_button_up.png': Loading 1 faces(PF_A8B8G8R8,128x32x1) with 7 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,128x32x1.
Texture 'sdk_text_box.png': Loading 1 faces(PF_A8B8G8R8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,32x32x1.
Texture 'sdk_mini_tray.png': Loading 1 faces(PF_A8B8G8R8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,32x32x1.
Texture 'sdk_track.png': Loading 1 faces(PF_A8B8G8R8,16x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,16x32x1.
Texture 'sdk_handle.png': Loading 1 faces(PF_A8B8G8R8,16x16x1) with 4 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,16x16x1.
Texture 'sdk_mini_text_box.png': Loading 1 faces(PF_A8B8G8R8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,32x32x1.
Texture 'sdk_label.png': Loading 1 faces(PF_A8B8G8R8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,32x32x1.
Texture 'sdk_separator.png': Loading 1 faces(PF_A8B8G8R8,64x16x1) with 6 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,64x16x1.
Texture 'sdk_logo.png': Loading 1 faces(PF_A8B8G8R8,128x64x1) with 7 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,128x64x1.
Texture 'sdk_shade.png': Loading 1 faces(PF_A8B8G8R8,64x48x1) with 6 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,64x48x1.
Texture 'sdk_frame.png': Loading 1 faces(PF_A8B8G8R8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,32x32x1.
Texture 'sdk_mini_text_box_over.png': Loading 1 faces(PF_A8B8G8R8,32x32x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8B8G8R8,32x32x1.
Texture 'sdk_pulse.png': Loading 1 faces(PF_B8G8R8,8x1x1) with 3 hardware generated mipmaps from Image. Internal format is PF_B8G8R8,8x1x1.
Finished parsing scripts for resource group Essential
Creating resources for group Essential
All done
Parsing scripts for resource group General
Finished parsing scripts for resource group General
Creating resources for group General
All done
Parsing scripts for resource group OgreAutodetect
Finished parsing scripts for resource group OgreAutodetect
Creating resources for group OgreAutodetect
All done
Parsing scripts for resource group OgreInternal
Parsing script ShadowVolumeExtude.program
Finished parsing scripts for resource group OgreInternal
Creating resources for group OgreInternal
All done
Mesh: Loading ogrehead.mesh.
Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/packs/oa_rpg3dm2.pk3' does not exist - skipping
Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/packs/ogretestmap.zip' does not exist - skipping
Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/thumbnails' does not exist - skipping
Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/PBR' does not exist - skipping
Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/PBR/filament' does not exist - skipping
Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/materials/textures/PBR' does not exist - skipping
Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/materials/programs/GLSL' does not exist - skipping
Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/materials/programs/GLSL120' does not exist - skipping
Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/materials/programs/GLSL150' does not exist - skipping
Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/materials/programs/GLSL400' does not exist - skipping
Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/materials/programs/GLSLES' does not exist - skipping
Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/materials/programs/SPIRV' does not exist - skipping
Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/materials/programs/Cg' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/materials/programs/HLSL' does not exist - skipping 2:14 PMWarning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/materials/programs/HLSL_Cg' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/materials/scripts' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/materials/textures' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/materials/textures/terrain' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/models' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/particle' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/DeferredShadingMedia' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/DeferredShadingMedia/DeferredShading/post' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/PCZAppMedia' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/materials/scripts/SSAO' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/materials/textures/SSAO' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/volumeTerrain' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/CSMShadows' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/packs/cubemap.zip' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/packs/cubemapsJS.zip' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/packs/dragon.zip' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/packs/fresneldemo.zip' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/packs/ogredance.zip' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/packs/Sinbad.zip' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/packs/skybox.zip' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/volumeTerrain/volumeTerrainBig.zip' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/packs/DamagedHelmet.zip' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Media/packs/filament_shaders.zip' does not exist - skipping Warning: resource location 'E:/ProgramFiles/Python/Python38/bin/../Tests/Media' does not exist - skipping Traceback (most recent call last): File "main.py", line 65, in <module> main() File "main.py", line 56, in main ent = scn_mgr.createEntity("ogrehead.mesh") #Sinbad.mesh RuntimeError: Ogre::FileNotFoundException::FileNotFoundException: Cannot locate resource ogrehead.mesh in resource group OgreAutodetect. in ResourceGroupManager::openResource at C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-fac8fhuy\OgreMain\src\OgreResourceGroupManager.cpp (line 659)
8Observer8
Halfling
Posts: 78
Joined: Sat Feb 29, 2020 12:29 am
x 2

Re: How to load a 3D model in ogre-python

Post by 8Observer8 »

I added some information above.
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: How to load a 3D model in ogre-python

Post by paroj »

it says "Parsing 'E:/ProgramFiles/Python/Python38/bin/resources.cfg'"

see this for why it ends up there:
https://ogrecave.github.io/ogre/api/lat ... 72b00ce9f8

you can manually call addResourceLocation though.
8Observer8
Halfling
Posts: 78
Joined: Sat Feb 29, 2020 12:29 am
x 2

Re: How to load a 3D model in ogre-python

Post by 8Observer8 »

Where is the "addResourceLocation" function? How to call it?
8Observer8
Halfling
Posts: 78
Joined: Sat Feb 29, 2020 12:29 am
x 2

Re: How to load a 3D model in ogre-python

Post by 8Observer8 »

Where is the FileSystemLayer class?
FileSystemLayer1.png
FileSystemLayer1.png (7.29 KiB) Viewed 7346 times
FileSystemLayer2.png
FileSystemLayer2.png (9.15 KiB) Viewed 7346 times
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: How to load a 3D model in ogre-python

Post by paroj »

8Observer8
Halfling
Posts: 78
Joined: Sat Feb 29, 2020 12:29 am
x 2

Re: How to load a 3D model in ogre-python

Post by 8Observer8 »

I see that autocomplete does not work for ogre-python in VSCode:
OgrePythonAutocomplete.png
OgrePythonAutocomplete.png (5.13 KiB) Viewed 7343 times
Okay, I will see autocomplete in C++ and use it to Python.

How to use FileSystemLayer? What I should write for constructor argument?
OgreFileSystemLayer.png
OgreFileSystemLayer.png (3.47 KiB) Viewed 7343 times
8Observer8
Halfling
Posts: 78
Joined: Sat Feb 29, 2020 12:29 am
x 2

Re: How to load a 3D model in ogre-python

Post by 8Observer8 »

paroj wrote: Tue Oct 26, 2021 12:07 pm see e.g. https://github.com/OGRECave/ogre-meshvi ... #L373-L385
Very good example. Thanks!

My solution is:

Code: Select all

    rgm = Ogre.ResourceGroupManager.getSingleton()

    rescfg = "resources.cfg"
    if ctx.getFSLayer().fileExists(rescfg):
        cfg = Ogre.ConfigFile()
        cfg.loadDirect("resources.cfg")
        for sec, settings in cfg.getSettingsBySection().items():
            for kind, loc in settings.items():
                rgm.addResourceLocation(loc, kind, sec)
    else:
        print(rescfg + " does not exist")
        return
I think this code must be in this example: https://github.com/OGRECave/ogre/blob/m ... /sample.py
PySample.png
PySample.png (30.04 KiB) Viewed 7332 times
main.py

Code: Select all

import Ogre
import Ogre.Bites
import Ogre.RTShader


class KeyListener(Ogre.Bites.InputListener):
    def __init__(self):
        Ogre.Bites.InputListener.__init__(self)

    def keyPressed(self, evt):
        if evt.keysym.sym == Ogre.Bites.SDLK_ESCAPE:
            Ogre.Root.getSingleton().queueEndRendering()

        return True

def main():
    ctx = Ogre.Bites.ApplicationContext("PySample")

    ctx.initApp()

    rgm = Ogre.ResourceGroupManager.getSingleton()

    rescfg = "resources.cfg"
    if ctx.getFSLayer().fileExists(rescfg):
        cfg = Ogre.ConfigFile()
        cfg.loadDirect("resources.cfg")
        for sec, settings in cfg.getSettingsBySection().items():
            for kind, loc in settings.items():
                rgm.addResourceLocation(loc, kind, sec)
    else:
        print(rescfg + " does not exist")
        return

    # register for input events
    klistener = KeyListener() # must keep a reference around
    ctx.addInputListener(klistener)

    root = ctx.getRoot()
    scn_mgr = root.createSceneManager()

    shadergen = Ogre.RTShader.ShaderGenerator.getSingleton()
    shadergen.addSceneManager(scn_mgr)  # must be done before we do anything with the scene

    # without light we would just get a black screen
    scn_mgr.setAmbientLight((.1, .1, .1))

    light = scn_mgr.createLight("MainLight")
    lightnode = scn_mgr.getRootSceneNode().createChildSceneNode()
    lightnode.setPosition(0, 100, 150)
    lightnode.attachObject(light)

    # create the camera
    cam = scn_mgr.createCamera("myCam")
    cam.setNearClipDistance(5)
    cam.setAutoAspectRatio(True)
    camnode = scn_mgr.getRootSceneNode().createChildSceneNode()
    camnode.attachObject(cam)

    # map input events to camera controls
    camman = Ogre.Bites.CameraMan(camnode)
    camman.setStyle(Ogre.Bites.CS_ORBIT)
    camman.setYawPitchDist(0, 0.3, 100)
    ctx.addInputListener(camman)

    # and tell it to render into the main window
    vp = ctx.getRenderWindow().addViewport(cam)
    vp.setBackgroundColour((.3, .3, .3))

    # finally something to render
    ent = scn_mgr.createEntity("ogrehead.mesh") #Sinbad.mesh
    node = scn_mgr.getRootSceneNode().createChildSceneNode()
    node.attachObject(ent)

    root.startRendering() # blocks until queueEndRendering is called

    ctx.closeApp()

if __name__ == "__main__":
    main()
8Observer8
Halfling
Posts: 78
Joined: Sat Feb 29, 2020 12:29 am
x 2

Re: How to load a 3D model in ogre-python

Post by 8Observer8 »

load-model-ogre3d-python.zip

> pip install ogre-python

> python main.py

Image

Post Reply