Ruining the classics (screenshot heavy thread)

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

Ahruman, I'm having a bit of a problem with the shader bindings, specifically a heat glow effect tied to engine_level, you mentioned in this thread https://bb.oolite.space/viewtopic.ph ... c&start=15 that you were removing the old way of accessing engine_level for the new bindings, so i've been browsing the wiki and decided to use "flightSpeed" instead, but i'm not seeing the effect in game. i've tested out the shader in rendermonkey and it seems to be ok:-
Image

and if i change the enginepower binding in the shipdata.plist to "timeElapsedSinceSpawn" i'm seeing the shader effect ingame:-
Image
is the flightSpeed property not providing high enough values to drive the shader effect? is there another bindable property reference i should be using instead?

edit: sorry, all the stuff about enginepower wasn't very clear, what i mean is, in the shaders part of the ship data.plist i have:-

Code: Select all

uniforms = 
  { 
     time = "universalTime"; 
     enginepower = "flightSpeed";
   }; 
and in the fragment shader, i have

Code: Select all


uniform float         time;
uniform float         enginepower;
have i got that right?
Last edited by Griff on Tue Aug 07, 2007 3:45 pm, edited 1 time in total.
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

WOW!
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Griff wrote:
and if i change the enginepower binding in the shipdata.plist to "timeElapsedSinceSpawn" i'm seeing the shader effect ingame:-
Image
is the flightSpeed property not providing high enough values to drive the shader effect? is there another bindable property reference i should be using instead?
speedFactor. flightSpeed should be giving too-high values. (The lists on the wiki page could probably do with a bit of reorganizing…)
Griff wrote:
edit: sorry, all the stuff about enginepower wasn't very clear, what i mean is, in the shaders part of the ship data.plist i have:-

Code: Select all

uniforms = 
  { 
     time = "universalTime"; 
     enginepower = "flightSpeed";
   }; 
and in the fragment shader, i have

Code: Select all


uniform float         time;
uniform float         enginepower;
have i got that right?
Looks right.
User avatar
Killer Wolf
---- E L I T E ----
---- E L I T E ----
Posts: 2279
Joined: Tue Jan 02, 2007 12:38 pm

Post by Killer Wolf »

Thanks Griff :-)
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

Cheers for the help Ahruman, it's still not working though even with the speedFactor binding.
i've tried giving the "boa" fuel injectors and various values of max_flight_speed in it's shipdata.plist but then effect never appears even with it whizzing along faster than my supercobra! it's like the value being passed from oolite to the shader always stays at 0.00000 except for when using the timeElapsedSinceSpawn binding, it works OK when that is used, although in the fragment shader i had to multiply the value by 0.01 so that in-game it gave me enough time to launch and get to the ship to check the shader was increasing the glow effect over time as otherwise it would get to it's maxium glow level of 1.0 in about a second!

as an experiment, i've also tried the following bindings energy, maxEnergy, mass, flightPitch, flightRoll and even though i've been chasing it all around the system none of these bindings have got the shader working either although it did attract a lot of vipers!
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Griff wrote:
Cheers for the help Ahruman, it's still not working though even with the speedFactor binding.
i've tried giving the "boa" fuel injectors and various values of max_flight_speed in it's shipdata.plist but then effect never appears even with it whizzing along faster than my supercobra! it's like the value being passed from oolite to the shader always stays at 0.00000 except for when using the timeElapsedSinceSpawn binding, it works OK when that is used, although in the fragment shader i had to multiply the value by 0.01 so that in-game it gave me enough time to launch and get to the ship to check the shader was increasing the glow effect over time as otherwise it would get to it's maxium glow level of 1.0 in about a second!
Almost exactly a second, in fact. :-)
Griff wrote:
as an experiment, i've also tried the following bindings energy, maxEnergy, mass, flightPitch, flightRoll and even though i've been chasing it all around the system none of these bindings have got the shader working either although it did attract a lot of vipers!
Set $shaderDebug to on in logcontrol.plist and check the log. If this doesn’t tell you anything, e-mail me what you’ve got.
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

is this any use?

Code: Select all

2007-08-07 20:53:23.000 oolite.exe[3408] File NSUserDefaults.m: 544. In [NSUserDefaults +standardUserDefaults] Improper installation: No language locale found
2007-08-07 20:53:23.000 oolite.exe[3408] [unclassified.MyOpenGLView]: initialising SDL
2007-08-07 20:53:23.000 oolite.exe[3408] [unclassified.JoystickHandler]: init: numSticks=1
2007-08-07 20:53:23.000 oolite.exe[3408] [unclassified.MyOpenGLView]: CREATING MODE LIST
2007-08-07 20:53:23.000 oolite.exe[3408] [unclassified.MyOpenGLView]: Unknown architecture, defaulting to 1024x768
2007-08-07 20:53:23.000 oolite.exe[3408] [unclassified.MyOpenGLView]: Added res 1280 x 1024
2007-08-07 20:53:23.000 oolite.exe[3408] [unclassified.MyOpenGLView]: Added res 1152 x 864
2007-08-07 20:53:23.000 oolite.exe[3408] [unclassified.MyOpenGLView]: Added res 1024 x 768
2007-08-07 20:53:23.000 oolite.exe[3408] [unclassified.MyOpenGLView]: Added res 800 x 600
2007-08-07 20:53:23.000 oolite.exe[3408] [unclassified.MyOpenGLView]: Added res 640 x 480
2007-08-07 20:53:23.000 oolite.exe[3408] [unclassified.MyOpenGLView]: Added res 512 x 384
2007-08-07 20:53:23.000 oolite.exe[3408] [unclassified.MyOpenGLView]: Added res 480 x 360
2007-08-07 20:53:23.000 oolite.exe[3408] [unclassified.MyOpenGLView]: Added res 400 x 300
2007-08-07 20:53:23.000 oolite.exe[3408] [unclassified.MyOpenGLView]: Added res 320 x 240
2007-08-07 20:53:24.000 oolite.exe[3408] [unclassified.MyOpenGLView]: drawRect calling initialiseGLWithSize
2007-08-07 20:53:24.000 oolite.exe[3408] [unclassified.MyOpenGLView]: Creating a new surface of 1024 x 768
2007-08-07 20:53:24.000 oolite.exe[3408] [unclassified.MyOpenGLView]: no universe, clearning surface
2007-08-07 20:53:24.000 oolite.exe[3408] [cpuInfo.cpuCount]: 2 processors detected.
2007-08-07 20:53:24.000 oolite.exe[3408] [rendering.opengl.version]: OpenGL renderer version: 2.1.1 ("2.1.1")
Vendor: NVIDIA Corporation
Renderer: GeForce 8800 GTS/PCI/SSE2
2007-08-07 20:53:24.000 oolite.exe[3408] [rendering.opengl.extensions]: OpenGL extensions (144):
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_bindable_uniform GL_EXT_depth_bounds_test 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_EXT_framebuffer_object GL_EXTX_framebuffer_mixed_formats 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_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_array GL_EXT_texture_buffer_object 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_sRGB GL_EXT_texture_shared_exponent 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_buffer_float 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_geometry_shader4 GL_NV_gpu_program4 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_parameter_buffer_object 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_transform_feedback 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 
2007-08-07 20:53:24.000 oolite.exe[3408] [dataCache.found]: Found data cache.
2007-08-07 20:53:24.000 oolite.exe[3408] [searchPaths.dumpAll]: ---> OXP search paths:
(oolite.app/Resources, AddOns, AddOns/griff_boa.oxp)
2007-08-07 20:53:24.000 oolite.exe[3408] [dataCache.rebuild.explicitFlush]: Cache explicitly flushed with shift key. Rebuilding from scratch.
2007-08-07 20:53:24.000 oolite.exe[3408] [script.load.world.listAll]: Loaded 6 world scripts: "oolite-cloaking-device" 1.69.1, "oolite-constrictor-hunt" 1.69.1, "oolite-nova" 1.69.1, "oolite-thargoid-plans" 1.69.1, "oolite-trumbles" 1.69.1, "Spawn-griff_boa" 1.0.1
2007-08-07 20:53:26.000 oolite.exe[3408] [dataCache.willWrite]: About to write data cache.
2007-08-07 20:53:26.000 oolite.exe[3408] [dataCache.write.success]: Wrote data cache.
2007-08-07 20:53:26.000 oolite.exe[3408] [rendering.opengl.error]: OpenGL error: "invalid enumerant" (1280), context: Universe before doing anything
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "time" -- could not interpret definition:
{type = binding; value = universalTime; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "entity_personality_int" -- could not interpret definition:
{type = binding; value = entityPersonalityInt; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "hull_heat_level" -- could not interpret definition:
{type = binding; value = hullHeatLevel; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "laser_heat_level" -- could not interpret definition:
{clamped = YES; type = binding; value = laserHeatLevel; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "entity_personality" -- could not interpret definition:
{type = binding; value = entityPersonality; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "engine_level" -- could not interpret definition:
{type = binding; value = speedFactor; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x6e7a020>{0: int tex0 = 0;}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x6e79e78>{1: int tex1 = 1;}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x6e79980>{2: int tex2 = 2;}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "time" -- could not interpret definition:
{type = binding; value = universalTime; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "entity_personality_int" -- could not interpret definition:
{type = binding; value = entityPersonalityInt; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "hull_heat_level" -- could not interpret definition:
{type = binding; value = hullHeatLevel; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "laser_heat_level" -- could not interpret definition:
{clamped = YES; type = binding; value = laserHeatLevel; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "entity_personality" -- could not interpret definition:
{type = binding; value = entityPersonality; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "engine_level" -- could not interpret definition:
{type = binding; value = speedFactor; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x6e79488>{0: int tex0 = 0;}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x6e78250>{1: int tex1 = 1;}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "time" -- could not interpret definition:
{type = binding; value = universalTime; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "entity_personality_int" -- could not interpret definition:
{type = binding; value = entityPersonalityInt; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "hull_heat_level" -- could not interpret definition:
{type = binding; value = hullHeatLevel; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "laser_heat_level" -- could not interpret definition:
{clamped = YES; type = binding; value = laserHeatLevel; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "entity_personality" -- could not interpret definition:
{type = binding; value = entityPersonality; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "engine_level" -- could not interpret definition:
{type = binding; value = speedFactor; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x33e87e8>{3: float time = [<ShipEntity 0x36fd090> universalTime];}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x33e8640>{0: int tex0 = 0;}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x33e82f0>{1: int tex1 = 1;}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x3424f48>{2: int tex2 = 2;}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "time" -- could not interpret definition:
{type = binding; value = universalTime; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "entity_personality_int" -- could not interpret definition:
{type = binding; value = entityPersonalityInt; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "hull_heat_level" -- could not interpret definition:
{type = binding; value = hullHeatLevel; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "laser_heat_level" -- could not interpret definition:
{clamped = YES; type = binding; value = laserHeatLevel; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "entity_personality" -- could not interpret definition:
{type = binding; value = entityPersonality; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "engine_level" -- could not interpret definition:
{type = binding; value = speedFactor; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x36c0f20>{0: int tex0 = 0;}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x36c0f80>{1: int tex1 = 1;}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "time" -- could not interpret definition:
{type = binding; value = universalTime; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "entity_personality_int" -- could not interpret definition:
{type = binding; value = entityPersonalityInt; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "hull_heat_level" -- could not interpret definition:
{type = binding; value = hullHeatLevel; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "laser_heat_level" -- could not interpret definition:
{clamped = YES; type = binding; value = laserHeatLevel; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "entity_personality" -- could not interpret definition:
{type = binding; value = entityPersonality; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "engine_level" -- could not interpret definition:
{type = binding; value = speedFactor; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x3635dd0>{0: int tex0 = 0;}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x3635e30>{1: int tex1 = 1;}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "time" -- could not interpret definition:
{type = binding; value = universalTime; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "entity_personality_int" -- could not interpret definition:
{type = binding; value = entityPersonalityInt; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "hull_heat_level" -- could not interpret definition:
{type = binding; value = hullHeatLevel; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "laser_heat_level" -- could not interpret definition:
{clamped = YES; type = binding; value = laserHeatLevel; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "entity_personality" -- could not interpret definition:
{type = binding; value = entityPersonality; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "engine_level" -- could not interpret definition:
{type = binding; value = speedFactor; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x127bee0>{0: int tex0 = 0;}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x127bf40>{1: int tex1 = 1;}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "time" -- could not interpret definition:
{type = binding; value = universalTime; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "entity_personality_int" -- could not interpret definition:
{type = binding; value = entityPersonalityInt; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "hull_heat_level" -- could not interpret definition:
{type = binding; value = hullHeatLevel; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "laser_heat_level" -- could not interpret definition:
{clamped = YES; type = binding; value = laserHeatLevel; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "entity_personality" -- could not interpret definition:
{type = binding; value = entityPersonality; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.badDescription]: ----- Warning: could not bind uniform "engine_level" -- could not interpret definition:
{type = binding; value = speedFactor; }
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x4a8bf48>{0: float engine_power = [<ShipEntity 0x327fec8> speedFactor];}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x4a8c0f8>{3: float time = [<ShipEntity 0x327fec8> universalTime];}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x4a8c2a0>{1: int tex0 = 0;}
2007-08-07 20:53:31.000 oolite.exe[3408] [shader.uniform.set]: Set up uniform <OOShaderUniform 0x4a8cb00>{2: int tex1 = 1;}
2007-08-07 20:53:31.000 oolite.exe[3408] [testscript.spawn]: Generated 1 griff_boa for testing purposes.
Edit: sorry, first time i posted the log i had the glowing_alloy oxp installed which had it's own shaders appearing in the debug report, i've removed them nowq and reposted the debug log with only the problematic griff_boa.oxp installed.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

It tells me two things:
1) The uniforms you’re setting up (engine_power = speedFactor, time = universalTime) are being bound properly. They ought to be working. :-/
2) The support for legacy non-bound uniforms that was supposed to be in 1.69/1.69.1 isn’t actually working, because the syntax in material-defaults.plist is wrong. Oh, well.
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

I've uploaded the griff_boa.oxp here:-
http://www.box.net/shared/eipirjmmp8 (4.1MB)
blimey! 4.1MB for 1 ship.

Edit: here's a more optimised version created following ahrumans advice (a few posts below)
http://www.box.net/shared/4rm3dqsclr 1.3MB

If you're on windows and have directx9.0 and a shader supporting graphics card installed I've included a resources folder in the zip file with all the files needed and a quick quide on how to load in the models & shaders from this oxp into rendermonkey and how to swap out the textures and models for your own designs.

No worries about the shader bindings Ahruman. although i did notice that if the shipdata.plist is in OpenStep format the ship's turrets didn't work properly in that they were often pointing in odd directions and firing off the occasional potshot at nothing at all, having the shipdata.plist in xml made them much more aggressive and accurate, i've put both format .plists in a folder in the download if you want to check - possible somethingi've done wrong with the initialiseTurret setup_action in the openstep format .plist?

Edit: forgot to mention it's a non-player ship ship, plus it's stupidly sized at the moment, the plan is to have it park outside stations and use smaller ships to ferry cargo onboard them.
Last edited by Griff on Sat Aug 18, 2007 9:44 am, edited 2 times in total.
User avatar
Dr. Nil
---- E L I T E ----
---- E L I T E ----
Posts: 983
Joined: Thu Sep 28, 2006 5:11 pm
Location: Nearest Hoopy Casino
Contact:

Post by Dr. Nil »

Image

:shock:

The title of this thread is misleading!
Image

300 billboards in Your Ad Here!
Astromines and more in Commies.
AVAILABLE HERE along with other Oolite eXpansion Packs.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Griff wrote:
No worries about the shader bindings Ahruman.
Don’t say silly things like that. :-) These things won’t fix themselves. Turns out that shader uniforms in subentities weren’t being bound to the parent entity as intended (now fixed).
Griff wrote:
although i did notice that if the shipdata.plist is in OpenStep format the ship's turrets didn't work properly in that they were often pointing in odd directions and firing off the occasional potshot at nothing at all, having the shipdata.plist in xml made them much more aggressive and accurate, i've put both format .plists in a folder in the download if you want to check - possible somethingi've done wrong with the initialiseTurret setup_action in the openstep format .plist?
It appears to be because no thrust is specified in the OpenStep version. Thrustless objects can’t turn, so the turrets can’t track. (They maintain an absolute orientation; really ought to be parent-relative, but that could be complicated.)

BTW, I like the skull. :-)
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

A problem with this ship is load time. This is what happens when you use a dozen textures for one ship.

An easyish fix to this is, well, use fewer textures. (This will also save on texture memory.) This can be done by using channels that are currently unused. For example, you could put the specular intensity for griff_boa_illuminated_subents.fragment into the alpha channel of griff_boa_illuminated_subents_diffuse.png, hard-code the specular exponent (which is constant), chuck out one texture and still have a channel to spare:

Code: Select all

   vec4 colorMap = texture2D(tex0, texCoord);
   vec4 glowMapFullOn = texture2D(tex1, texCoord);

   float specExponent = 2.12; // pow(2, (39/255) * 8) = 21.2235
   float specIntensity = colorMap.a * 1.5;
   colorMap.a = 1.0; // no transparency
This would also increase efficiency – the pow() calculation, texture lookup, and binding of a third texture unit all cost.

Similarly, you could merge griff_boa_subents_specular.png and griff_boa_turrets_specular.png by using the b and a channels for one of the shaders.
Last edited by JensAyton on Fri Aug 10, 2007 3:14 pm, edited 1 time in total.
User avatar
Cmdr Wyvern
---- E L I T E ----
---- E L I T E ----
Posts: 1649
Joined: Tue Apr 11, 2006 1:47 am
Location: Somewhere in the great starry void

Post by Cmdr Wyvern »

TGHC wrote:
WOW!
...And wow, and wow, and wow s'more!

Griff, you're scary good. 8)
Running Oolite buttery smooth & rock stable w/ tons of eyecandy oxps on:
ASUS Prime X370-A
Ryzen 5 1500X
16GB DDR4 3200MHZ
128GB NVMe M.2 SSD (Boot drive)
1TB Hybrid HDD (For software and games)
EVGA GTX-1070 SC
1080P Samsung large screen monitor
ovvldc
---- E L I T E ----
---- E L I T E ----
Posts: 344
Joined: Sat Apr 02, 2005 9:32 am
Location: Netherlands

Post by ovvldc »

I don't want to ruin a perfectly good model, but unless you are actually going to put working turrets on the ship, shouldn't these be removed? Unless they are nonfunctional on a rusty ship or such.
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2483
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

that's odd, the turrets should be working, they're not in the screen shot i posted a few posts back (the quaternions were giving me problems) but they should be in the version i put up for download... there was a problem with me not giving the turrets a 'thrust' value in their shipdata.plist, ahruman pointed out that this stopped them from being able to track targets but i thought i'd fixed that. there's no turrets on the front and underside of the ship so it can't get you if you hide there, try popping around the back and fire a few lasers into it's engines.

i seriously need to scale down the 1024x1024 texture and merge some of the effects maps together, i totally didn't realise we could use the alpha channel as well *studies photoshop help files to find out how to use the alphachanel* i think i might remove the specular exponent maps and just give it a fixed value in the shader, i'm not really using it much and it's taking up space.
i'll change the pow calculation to the other example you posted in the shaders outpost thread ahruman, the quadratic curve, you did warn that the pow one was expensive to use, i forgot to change it when saving out the final fragment shaders from rendermonkey.
Post Reply