Oolite v1.70 - Shader binding "laserHeatLevel"

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

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

Post by Griff »

Yay it works!
Just downloaded oolite 1.71 and modified the griff_krait shipdata.plist to include the subentity binding thing and it's working great!
I've reworked the effects map to make the laser glow more of a 'flash' along the gun barrel, it looked a bit odd as a heated metal effect, but i think i actually prefer this 'flash' effect to how i originally imagined the laserheat glow would work.
I've uploaded the new version of the griff_krait here: http://www.box.net/shared/p0feglnwos
edit: fixed the link: http://www.box.net/shared/6ugzbf1ofo
Last edited by Griff on Wed Apr 23, 2008 6:33 pm, edited 1 time in total.
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:
Yay it works!
Just downloaded oolite 1.71 and modified the griff_krait shipdata.plist to include the subentity binding thing and it's working great!
Oh, good. It had just occurred to me to worry about this, since making shader bindings work at all (again) was my last-minute effort on 1.71. :-)

Your link is broken, though: “No shared files/folders found.”
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

oops, i think i uploaded the file, posted the link ,then went back to my box.net account to do a bit of spring cleaning and deleted it!
i've re-uploaded it here: http://www.box.net/shared/6ugzbf1ofo

thinking about it now, i wish i'd painted some of the laserglow effect onto the side hull of the spaceship so that when it fires, the side of the hull would 'light up' from the flash.
Anyway thanks for working this subentity binding thing into the game code Ahruman, i did moan about it quite a bit didn't i :)
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

whats the xml version of this?

Code: Select all

uniforms =	
   { 
     gun_heat = { binding = "laserHeatLevel"; bindToSubentity = YES; };
   };
is it

Code: Select all

<key>uniforms</key> 
   <dict> 
      <key>laser_heat_level</key> 
      <string>laserHeatLevel</string> 
      <key>bindToSubentity</key> 
      <string>YES</string> 
</dict>
Does the laserheat binding apply if the subentity is a plasma turret?
Basically i'm mucking about with the turrets on the space bar, they should have a heat flash effect on them and now version 1.71.1 is out i thought i'd modify the shipdata.plist to put the bindtosubentity thing in, but i can't get it working, i've also forgotten the key you press when paused to write a lot of usefull info about scripts etc into the stderr file, i thought it was pause then o but that's making the hud dissappear!
edit: aH! Pause then s dumps alot of info about shaders into the stderr, i've definately got the syntax wrong, theres lots of "Warning: could not bind uniform "bindToSubentity" for target <ShipEntity 0xb86e000>{"(nil)" ID: 0 position: (0, 0, 0) scanClass: CLASS_NOT_SET status: STATUS_IN_FLIGHT} -- could not interpret definition:
YES" going on.
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:
whats the xml version of this?

Code: Select all

uniforms =	
   { 
     gun_heat = { binding = "laserHeatLevel"; bindToSubentity = YES; };
   };

Code: Select all

<key>uniforms</key>
<dict>
    <key>gun_heat</key>
    <dict>
        <key>binding</key>
        <string>laserHeatLevel</string>
        <key>bindToSubentity</key>
        <true/>
    </dict>
</dict>
is it

Code: Select all

<key>uniforms</key> 
   <dict> 
      <key>laser_heat_level</key> 
      <string>laserHeatLevel</string> 
      <key>bindToSubentity</key> 
      <string>YES</string> 
</dict>
You’re missing the gun_heat dictionary. That’s equivalent to:

Code: Select all

uniforms =
{
    laser_heat_level = laserHeatLevel;
    bindToSubentity = YES;
}
Does the laserheat binding apply if the subentity is a plasma turret?
I’d have thought so, but I’m not sure.
User avatar
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Post by Griff »

Thanks Ahruman, that worked great! The plasma turrets are working fine with the 'bindToSubentity' stuff.
Post Reply