Krycztij

TAW 3View — A Renderer for TAW's .3 Files

56 posts in this topic

No, seems like I disabled it. I don’t remember the reason, it was probably an oversight with some rendering modification in 2016. I’ll have a look …

Share this post


Link to post
Share on other sites

Got it.:

  1. When I added building damage to TFXplorer, it required each shape having its own parameters. (Not all buildings being demolished at the same time because they use the same parameters.)
  2. I changed the rendering code, implemented building damage, and after some weeks the feature was fine.
  3. The new code didn’t work with 3View, though.
  4. I had run out of time so I just placed a dummy which disabled the feature altogether.
6 hours ago, mikew said:

The version I'm running is built from last December's code.

Please open ThreeView SupershapeSession.cpp, find void SupershapeSession::draw() { at the bottom. Replace

static UInt1B const zeroParameters[8 * TFX::Supershape::maximalNumberOfShapes] = { };

with

// Parameters of all shapes need to be stored consecutive in memory. Reserve a region and duplicate the user’s parameters
//  into every possible slot.
UInt1B allParameters[8 * TFX::Supershape::maximalNumberOfShapes];
for(auto i = 0; i < TFX::Supershape::maximalNumberOfShapes; ++i) {
	for(auto j = 0; j < 8; ++j) {
		allParameters[8 * i + j] = parameters[j];
	}
}

Four lines below that, replace zeroParameters with allParameters. Re-compile and you should be fine!

Share this post


Link to post
Share on other sites

Thanks! I'll try that later.

I had a look at the code, but my search for 'disable_visible_damage_in_ssd_mode=1' came up empty. ;)
The reason this came up was that I wondering how easy it would be to add some extra buildings to a tile and this would be a way to see if the engine recognised them before integrating the ssd into a map.
I had assumed that you were deriving the bounding boxes for collision detection from the .3 shape rather than using the COLLISION_BOX information in the ssd...but now I'm not so sure.

Share this post


Link to post
Share on other sites

There is no collision information in .3 shapes, so I have to use the COLLISION_BOXes.

Share this post


Link to post
Share on other sites

Oh dear, seems I need to reverse engineer my reverse engineering. :(

 

Share this post


Link to post
Share on other sites

That code snippet gives the required effect. Thank you. :)

Adding some extra buildings is not a trivial job though. So, may have to park that idea for a while. :(

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now