Results 1 to 9 of 9

Thread: Models and particles demo

  1. #1

    Models and particles demo

    The progress on the model and particle systems is going well.

    So i've decided to upload a small demo showing some of the features.

    The demo uses a bunch of particle systems, per pixel lighting and multitexturing, Custom color on the ship, even through no way to change it atm and some other stuff. Note the debris that appears when you move the ship.

    The jumphole particle system uses a gravity affector, the debris system a distance fading affector and the engine trails is just simple systems that are attatched to tags in the ship models.

    http://www.phoenixlib.net/files/phxModels.zip


    The controls are
    • F1 = toggle between software and hardware skinning
      Enter = toggle ship control
      R = reload missile
      Mouse wheel = zoom (in ship mode)
      Space = fire


    There's a few optimisations more that can be used to speed up the rendering more, there's no frustrum culling whatsoever for instance.

    Requres somewhat modern hardware, tested on WinXP and vista
    Amnoxx

    Oh, and this code appears to be an approximate replacement for return(random() & 0x01);

    Phoenix Wiki
    http://www.phoenixlib.net/

    Phoenix Forum
    http://www.pascalgamedevelopment.com/viewforum.php?f=71

  2. #2

    Models and particles demo

    Looks very cool. Textures and ships-models are looking very nice

    An improvement would be to use other sky geometry. The box doesn't look too good.

    You could also give the planet a few layers of atmosphere (with alpha blending) and let them rotate around the center. If it doesn't decrease FPS too much.

    Good luck.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  3. #3

    Models and particles demo

    Quote Originally Posted by chronozphere
    Looks very cool. Textures and ships-models are looking very nice

    An improvement would be to use other sky geometry. The box doesn't look too good.

    You could also give the planet a few layers of atmosphere (with alpha blending) and let them rotate around the center. If it doesn't decrease FPS too much.

    Good luck.
    Nah the sky box is not that good, but it's a top down thing really so it's only there to give some background using the freecam, the flight mode is the view mode its made for, freecam is more a debug help and feature study thing.

    The planet uses a single alpha blended cloud layer, but i find it hard to get planets good locking, just havnt came up with a good way of making it look detailed enough and so forth.
    Amnoxx

    Oh, and this code appears to be an approximate replacement for return(random() & 0x01);

    Phoenix Wiki
    http://www.phoenixlib.net/

    Phoenix Forum
    http://www.pascalgamedevelopment.com/viewforum.php?f=71

  4. #4

    Models and particles demo

    I'm afraid, the sample did not work for me. I'm currently using a somewhat dated videocard, so I'm guessing that's what's causing this error.

    Code:
    18:20:43 phxBase: Initializing Phoenix...
    18:20:43 phxBase: Phoenix version: 1.01
    18:20:43 phxBase: Phoenix build  : 2007-08-15
    18:20:43 phxScreen.init: Initializing GLFW.
    18:20:44 phxScreen.init: GLFW version: 2.5.0
    18:20:44 phxTexture: Creating FreeImage texture loader.
    18:20:44 phxTexture: FreeImage version: 3.9.2
    18:20:44 TPHXScreen.Open: Opening the window: 800x600 WINDOWED
    18:20:44 TPHXScreen.Open: Initializing OpenGL.
    18:20:44 TPHXScreen.Open: OpenGL vendor    : ATI Technologies Inc.
    18:20:44 TPHXScreen.Open: OpenGL renderer  : Radeon 7000 DDR x86/SSE2
    18:20:44 TPHXScreen.Open: OpenGL version   : 1.3.2438 WinXP Release
    18:20:44 TPHXScreen.Open: OpenGL extensions: GL_ARB_multitexture GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_transpose_matrix GL_ARB_vertex_blend GL_ARB_window_pos GL_S3_s3tc GL_ATI_envmap_bumpmap GL_ATI_texture_mirror_once GL_ATI_vertex_streams GL_ATIX_texture_env_combine3 GL_ATIX_texture_env_route GL_ATIX_vertex_shader_output_point_size GL_EXT_abgr GL_EXT_bgra GL_EXT_clip_volume_hint GL_EXT_compiled_vertex_array GL_EXT_draw_range_elements GL_EXT_fog_coord GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_stencil_wrap GL_EXT_texgen_reflection GL_EXT_texture_env_add GL_EXT_texture3D 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_lod_bias GL_EXT_texture_filter_anisotropic GL_EXT_texture_object GL_EXT_vertex_array GL_KTX_buffer_region GL_NV_texgen_reflection GL_NV_blend_square GL_SGI_texture_edge_clamp GL_SGIS_texture_border_clamp GL_SGIS_texture_lod GL_SGIS_generate_mipmap GL_SGIS_multitexture GL_WIN_swap_hint WGL_EXT_extensions_string WGL_EXT_swap_control 
    18:20:44 TPHXPixelShader.LoadShader: Loading shader: mesh
    18:20:47 Unhandled exception: Exception EAccessViolation in module Models.exe at 00000000.
    Access violation at address 00000000. Read of address 00000000.
    
    18:20:49 Unhandled exception: Exception Exception in module Models.exe at 0001740C.
    Unhandled exception: Exception EAccessViolation in module Models.exe at 00000000.
    Access violation at address 00000000. Read of address 00000000.

  5. #5

    Models and particles demo

    I'm also getting an error when the program runs.
    I see one error in the Log file :


    20:37:01 phxBase: Initializing Phoenix...
    20:37:01 phxBase: Phoenix version: 1.01
    20:37:01 phxBase: Phoenix build : 2007-08-15
    20:37:01 phxScreen.init: Initializing GLFW.
    20:37:01 phxScreen.init: GLFW version: 2.5.0
    20:37:01 phxTexture: Creating FreeImage texture loader.
    20:37:01 phxTexture: FreeImage version: 3.9.2
    20:37:01 TPHXScreen.Open: Opening the window: 800x600 WINDOWED
    20:37:01 TPHXScreen.Open: Initializing OpenGL.
    20:37:01 TPHXScreen.Open: OpenGL vendor : NVIDIA Corporation
    20:37:01 TPHXScreen.Open: OpenGL renderer : GeForce 7950 GT/PCI/SSE2
    20:37:01 TPHXScreen.Open: OpenGL version : 2.1.1
    20:37:01 TPHXScreen.Open: OpenGL extensions: GL_ARB_color_buffer_float GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_half_float_pixel GL_ARB_imaging GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shadow GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_transpose_matrix GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader 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_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_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_object GL_EXT_gpu_program_parameters GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D 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_lod GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_sRGB GL_EXT_timer_query GL_EXT_vertex_array GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_copy_depth_to_color GL_NV_depth_clamp 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_half_float GL_NV_light_max_exponent GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_primitive_restart GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_texgen_reflection GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_expand_normal GL_NV_texture_rectangle GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_vertex_array_range GL_NV_vertex_array_range2 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_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

    20:37:01 TPHXPixelShader.LoadShader: Loading shader: mesh
    20:37:01 TPHXPixelShader.Build: Fragment shader compilation error:
    (14) : warning C7011: implicit cast from "int" to "float"

    20:37:01 TPHXImage.LoadImage: Loading image: Textures\particles.png
    20:37:01 TPHXTextureManager.BuildTexture: Texture size 128x128 (4096) Format GL_RGBA
    20:37:01 TPHXImage.LoadImage: Loading image: Textures\debris.png
    20:37:01 TPHXTextureManager.BuildTexture: Texture size 128x128 (4096) Format GL_RGBA
    20:37:01 TPHXImage.LoadImage: Loading image: Textures\fighter.jpg
    20:37:01 TPHXTextureManager.BuildTexture: Texture size 512x512 (4096) Format GL_RGB
    20:37:01 TPHXImage.LoadImage: Loading image: Textures\Fighter_Primary.png
    20:37:01 TPHXTextureManager.BuildTexture: Texture size 512x512 (4096) Format GL_RGB
    20:37:01 TPHXImage.LoadImage: Loading image: Textures\sparse_green_nebula.jpg
    20:37:01 TPHXTextureManager.BuildTexture: Texture size 512x512 (4096) Format GL_RGB
    20:37:01 TPHXImage.LoadImage: Loading image: Textures\shiphull.jpg
    20:37:01 TPHXTextureManager.BuildTexture: Texture size 1024x1024 (4096) Format GL_RGB
    20:37:01 TPHXImage.LoadImage: Loading image: Textures\f24.BMP
    20:37:01 TPHXTextureManager.BuildTexture: Texture size 128x128 (4096) Format GL_RGB
    20:37:01 TPHXImage.LoadImage: Loading image: Textures\Terrain02.png
    20:37:01 TPHXTextureManager.BuildTexture: Texture size 1024x512 (4096) Format GL_RGBA
    20:37:01 TPHXImage.LoadImage: Loading image: Textures\PlanetCloud.png
    20:37:01 TPHXTextureManager.BuildTexture: Texture size 512x256 (4096) Format GL_RGB
    20:37:01 TPHXImage.LoadImage: Loading image: Textures\PlanetDetail0.png
    20:37:01 TPHXTextureManager.BuildTexture: Texture size 512x512 (4096) Format GL_RGB
    20:37:01 : Loading particles..
    20:37:01 : Loading meshes..
    20:37:01 : Creating objects..
    20:37:02 : Creating effects..
    20:37:02 : Loading complete..
    Check out my Delphi programs, music and writing.
    <br />http://digitalfunnybone.com/Programming.html

  6. #6

    Models and particles demo

    Quote Originally Posted by Traveler
    I'm afraid, the sample did not work for me. I'm currently using a somewhat dated videocard, so I'm guessing that's what's causing this error.
    I'm afraid it's just to old, dont seems it supports GLSL at all. Hovever it would probably be to slow to run the demo in software skinning anyhow.

    I'm loading the shaders even if using the software skinning, just to be able to change it on the fly.

    Quote Originally Posted by Bones
    I'm also getting an error when the program runs.
    I see one error in the Log file :
    Change the line 14 in mesh.frag to

    Code:
      color = &#40;1.0f - primary_factor&#41; * color + primary_factor * primary_color.rgba;
    and it should work.
    Amnoxx

    Oh, and this code appears to be an approximate replacement for return(random() & 0x01);

    Phoenix Wiki
    http://www.phoenixlib.net/

    Phoenix Forum
    http://www.pascalgamedevelopment.com/viewforum.php?f=71

  7. #7

    Models and particles demo

    Excellent work Andreaz, it runs smoothly here.

    What formats do you support currently, MS3D is bloody obvious, and how soon can I get my hands on this? Oh, and can you attach particle system to model joints? And can you get the location of a named joint/bone within a model, so like you could have a location and orientation for the weapons as they rotate?

  8. #8

    Models and particles demo

    Quote Originally Posted by Andreaz
    Quote Originally Posted by Bones
    I'm also getting an error when the program runs.
    I see one error in the Log file :
    Change the line 14 in mesh.frag to

    Code:
      color = &#40;1.0f - primary_factor&#41; * color + primary_factor * primary_color.rgba;
    and it should work.
    that fixed the startup problem, but after I fire a missile it crashes with an EAccessViolation error.

    20:33:32 phxBase: Initializing Phoenix...
    20:33:32 phxBase: Phoenix version: 1.01
    20:33:32 phxBase: Phoenix build : 2007-08-15
    20:33:32 phxScreen.init: Initializing GLFW.
    20:33:32 phxScreen.init: GLFW version: 2.5.0
    20:33:32 phxTexture: Creating FreeImage texture loader.
    20:33:32 phxTexture: FreeImage version: 3.9.2
    20:33:32 TPHXScreen.Open: Opening the window: 800x600 WINDOWED
    20:33:33 TPHXScreen.Open: Initializing OpenGL.
    20:33:33 TPHXScreen.Open: OpenGL vendor : NVIDIA Corporation
    20:33:33 TPHXScreen.Open: OpenGL renderer : GeForce 7950 GT/PCI/SSE2
    20:33:33 TPHXScreen.Open: OpenGL version : 2.1.1
    20:33:33 TPHXScreen.Open: OpenGL extensions: GL_ARB_color_buffer_float GL_ARB_depth_texture GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_half_float_pixel GL_ARB_imaging GL_ARB_multisample GL_ARB_multitexture GL_ARB_occlusion_query GL_ARB_pixel_buffer_object GL_ARB_point_parameters GL_ARB_point_sprite GL_ARB_shadow GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine GL_ARB_texture_env_dot3 GL_ARB_texture_float GL_ARB_texture_mirrored_repeat GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_transpose_matrix GL_ARB_vertex_buffer_object GL_ARB_vertex_program GL_ARB_vertex_shader 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_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_draw_range_elements GL_EXT_fog_coord GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_object GL_EXT_gpu_program_parameters GL_EXT_multi_draw_arrays GL_EXT_packed_depth_stencil GL_EXT_packed_pixels GL_EXT_pixel_buffer_object GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs GL_EXT_stencil_two_side GL_EXT_stencil_wrap GL_EXT_texture3D 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_lod GL_EXT_texture_lod_bias GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_sRGB GL_EXT_timer_query GL_EXT_vertex_array GL_IBM_rasterpos_clip GL_IBM_texture_mirrored_repeat GL_KTX_buffer_region GL_NV_blend_square GL_NV_copy_depth_to_color GL_NV_depth_clamp 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_half_float GL_NV_light_max_exponent GL_NV_multisample_filter_hint GL_NV_occlusion_query GL_NV_packed_depth_stencil GL_NV_pixel_data_range GL_NV_point_sprite GL_NV_primitive_restart GL_NV_register_combiners GL_NV_register_combiners2 GL_NV_texgen_reflection GL_NV_texture_compression_vtc GL_NV_texture_env_combine4 GL_NV_texture_expand_normal GL_NV_texture_rectangle GL_NV_texture_shader GL_NV_texture_shader2 GL_NV_texture_shader3 GL_NV_vertex_array_range GL_NV_vertex_array_range2 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_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
    20:33:33 TPHXPixelShader.LoadShader: Loading shader: mesh
    20:33:33 TPHXPixelShader.Build: Fragment shader compilation error:
    (16) : warning C7502: OpenGL does not allow type suffix 'f' on constant literals
    20:33:33 TPHXImage.LoadImage: Loading image: Textures\particles.png
    20:33:33 TPHXTextureManager.BuildTexture: Texture size 128x128 (4096) Format GL_RGBA
    20:33:33 TPHXImage.LoadImage: Loading image: Textures\debris.png
    20:33:33 TPHXTextureManager.BuildTexture: Texture size 128x128 (4096) Format GL_RGBA
    20:33:33 TPHXImage.LoadImage: Loading image: Textures\fighter.jpg
    20:33:33 TPHXTextureManager.BuildTexture: Texture size 512x512 (4096) Format GL_RGB
    20:33:33 TPHXImage.LoadImage: Loading image: Textures\Fighter_Primary.png
    20:33:33 TPHXTextureManager.BuildTexture: Texture size 512x512 (4096) Format GL_RGB
    20:33:33 TPHXImage.LoadImage: Loading image: Textures\sparse_green_nebula.jpg
    20:33:33 TPHXTextureManager.BuildTexture: Texture size 512x512 (4096) Format GL_RGB
    20:33:33 TPHXImage.LoadImage: Loading image: Textures\shiphull.jpg
    20:33:33 TPHXTextureManager.BuildTexture: Texture size 1024x1024 (4096) Format GL_RGB
    20:33:33 TPHXImage.LoadImage: Loading image: Textures\f24.BMP
    20:33:33 TPHXTextureManager.BuildTexture: Texture size 128x128 (4096) Format GL_RGB
    20:33:33 TPHXImage.LoadImage: Loading image: Textures\Terrain02.png
    20:33:33 TPHXTextureManager.BuildTexture: Texture size 1024x512 (4096) Format GL_RGBA
    20:33:33 TPHXImage.LoadImage: Loading image: Textures\PlanetCloud.png
    20:33:33 TPHXTextureManager.BuildTexture: Texture size 512x256 (4096) Format GL_RGB
    20:33:33 TPHXImage.LoadImage: Loading image: Textures\PlanetDetail0.png
    20:33:33 TPHXTextureManager.BuildTexture: Texture size 512x512 (4096) Format GL_RGB
    20:33:33 : Loading particles..
    20:33:33 : Loading meshes..
    20:33:33 : Creating objects..
    20:33:33 : Creating effects..
    20:33:33 : Loading complete..
    20:33:47 Unhandled exception: Exception EAccessViolation in module Models.exe at 0187E7DC.
    Access violation at address 0187F7DC. Read of address 018BD000.
    hard to trace without the source.
    Check out my Delphi programs, music and writing.
    <br />http://digitalfunnybone.com/Programming.html

  9. #9

    Models and particles demo

    Runs everything fine here :?
    100~110fps
    A64 3500+
    1024mb
    x800gto
    XP PRO SP2
    From brazil (:

    Pascal pownz!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •