Author Topic: Storm Engine 2 update  (Read 11202 times)

0 Members and 1 Guest are viewing this topic.

motorsep

  • Hero Member
  • *****
  • Posts: 1,094
  • Karma: +78/-134
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Storm Engine 2 update
« Reply #45 on: October 14, 2018, 02:16:31 PM »
@bitterman

The issue with vehicles that loading a savegame with vehicle crashes the engine. That's really the main issue with SE2 at this time.

Speaking of vehicles, played RAGE last night. Noticed that sometimes vehicles are spawned above the ground and dropped after loading a savegame. As if they not really saving vehicles, but only save its stats and location/rotation of the entity and re-initialize / re-spawn it after loading of the savegame is done.

SE2 currently saves all the physics and constraints of the vehicle/suspension as far as I recall.

bitterman

  • Sr. Member
  • ****
  • Posts: 381
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: Storm Engine 2 update
« Reply #46 on: October 19, 2018, 11:00:57 AM »
Do you see Q4 code (about vehicle stuff)?
It may be useful.

P.S. just as example:

Code: [Select]
/*
================
rvVehicleAnimated::Save
================
*/
void rvVehicleAnimated::Save ( idSaveGame *savefile ) const {
savefile->WriteVec3( storedPosition );

savefile->WriteStaticObject ( physicsObj );

savefile->WriteAngles ( viewAngles );
savefile->WriteFloat ( turnRate );

// why are we writing out the viewAxis here???
savefile->WriteMat3 ( viewAxis );

// TEMP
animator.Save( savefile );
}

/*
================
rvVehicleAnimated::Restore
================
*/
void rvVehicleAnimated::Restore ( idRestoreGame *savefile ) {
savefile->ReadVec3( storedPosition );

physicsObj.SetSelf( this );
physicsObj.SetClipModel( new idClipModel( GetPhysics()->GetClipModel() ), 1.0f );
savefile->ReadStaticObject ( physicsObj );
RestorePhysics ( &physicsObj );
physicsObj.EnableClip();

savefile->ReadAngles ( viewAngles );
savefile->ReadFloat ( turnRate );

savefile->ReadMat3 ( viewAxis );

// TEMP - restore animator, because it was cleared when loading the AF
animator.Restore( savefile );
animator.GetJoints( &renderEntity.numJoints, &renderEntity.joints );
animator.GetBounds( gameLocal.time, renderEntity.bounds );
// TEMP

additionalDelta.Zero();
}


You remind me about D3 SDK.
« Last Edit: October 19, 2018, 12:09:11 PM by bitterman »

motorsep

  • Hero Member
  • *****
  • Posts: 1,094
  • Karma: +78/-134
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Storm Engine 2 update
« Reply #47 on: October 21, 2018, 08:49:43 PM »
Well, feel free to fix it and submit pull request to the github repo. :)

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 1,028
  • Karma: +46/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: Storm Engine 2 update
« Reply #48 on: October 22, 2018, 01:09:33 PM »
The vehicle code in the Q4 SDK was (is?) near identical to the stuff in the D3 SDK, and it's not GPL so it can't be combined with the D3 codebase either way.  ETQW was the same.  Everything seems to have changed in the engines for those games (and ETQW didn't have saves too, so that was a non-issue for them).

bitterman

  • Sr. Member
  • ****
  • Posts: 381
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: Storm Engine 2 update
« Reply #49 on: October 23, 2018, 05:36:19 AM »
mt how to use 'glow' stage in buggy.mtr?
Is it implenented from RB? Is it really glow (even in the dark)?

THF, it can be used as analogue, I belive. And even reworked.
« Last Edit: October 23, 2018, 07:47:47 AM by bitterman »

motorsep

  • Hero Member
  • *****
  • Posts: 1,094
  • Karma: +78/-134
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Storm Engine 2 update
« Reply #50 on: October 23, 2018, 09:31:55 AM »
I sent you the material, so it's all there. It is indeed a glow (Image-based Bloom) with halo.

And no, it's not from RB. In fact, RB was used as base, before tr3b added bunch of fancy things.

bitterman

  • Sr. Member
  • ****
  • Posts: 381
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: Storm Engine 2 update
« Reply #51 on: October 23, 2018, 09:56:47 PM »
I sent you the material, so it's all there.

Nope, you forgot :)
It was recreated by me from .md5mesh.
Sorry :)

I see this fragment in to Code, but not sure about syntax.

Somethings like
Code: [Select]
{

glow
map textures/glow.tga
}
?
« Last Edit: October 23, 2018, 10:15:26 PM by bitterman »

motorsep

  • Hero Member
  • *****
  • Posts: 1,094
  • Karma: +78/-134
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Storm Engine 2 update
« Reply #52 on: October 23, 2018, 10:47:46 PM »
Material:

https://pastebin.com/HGKasY1q

_glow.tga is the same as _lights.tga, but half the resolution (512^2 is for lights and 256^2 is for glow)

bitterman

  • Sr. Member
  • ****
  • Posts: 381
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: Storm Engine 2 update
« Reply #53 on: October 24, 2018, 11:44:51 AM »
Done!

motorsep

  • Hero Member
  • *****
  • Posts: 1,094
  • Karma: +78/-134
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Storm Engine 2 update
« Reply #54 on: October 24, 2018, 12:39:56 PM »
Doesn't look like it's working. Or maybe screenshot is too small. I don't see any halo/bloom around headlights.

You might want to check r_* cvars to see if HDR is on and glow is on.

bitterman

  • Sr. Member
  • ****
  • Posts: 381
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: Storm Engine 2 update
« Reply #55 on: October 25, 2018, 09:34:16 AM »
Yep

motorsep

  • Hero Member
  • *****
  • Posts: 1,094
  • Karma: +78/-134
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Storm Engine 2 update
« Reply #56 on: October 25, 2018, 11:28:57 AM »
Yep, now we are talking  8)

bitterman

  • Sr. Member
  • ****
  • Posts: 381
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: Storm Engine 2 update
« Reply #57 on: October 26, 2018, 02:30:22 AM »
Btw funny fact about vehicles:

In D3 main part of vehicle's code located in AFEntity.cpp and it can get control via impulse_40 from Player.cpp.

Looks like AFEntity.cpp from D3BFG (and perhaps from RB too) has same stuff but impulse_40 was excluded from Player.cpp so vehicle's code can not get control either way.

In SE2 impulse_40 was reverted back, replaced with BUTTON_USE and stuff from AFEntity.cpp significantly extended (added new 4wd spawnclass, exhaust particle system etc).

P.S. Now I try to understand what is autodriving, waypoints and related stuff. In SE2 test map I see only vanilla 'path_corner'.

« Last Edit: October 26, 2018, 02:34:13 AM by bitterman »

motorsep

  • Hero Member
  • *****
  • Posts: 1,094
  • Karma: +78/-134
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Storm Engine 2 update
« Reply #58 on: October 26, 2018, 09:12:28 AM »
Vehicle auto-drives between path_corners.

bitterman

  • Sr. Member
  • ****
  • Posts: 381
  • Karma: +9/-5
  • Doom Newbie
    • View Profile
Re: Storm Engine 2 update
« Reply #59 on: October 30, 2018, 11:13:32 AM »
Yes, the vehicle auto-drives along path_corner at start if path_corner set as "target" for vehicle's entity.

Is there a way to bring back normal view in editor's window?

Not sure what is cause for this distortion.