NFSAddons Forums

Mar 28, 2024, 6:58 AM

T3ED Updates (NFS4 Track Editor) by JimDiabolo

This is a discussion for the topic T3ED Updates (NFS4 Track Editor) by JimDiabolo on the board Editing Projects.

Author Topic: T3ED Updates (NFS4 Track Editor) by JimDiabolo  (Read 138235 times)

Reply #225
on: Dec 25, 2022, 8:00 PM
Hero Member
Posts: 267 Joined: June 09, 2018

  • *****
HS Extra Unknow1 first 4 bytes are always FF FF FF FF except when there is a shortcut.
I've messed around with the VRoad unknown data and found out that the 9th and 10th bytes of unknown data for each slice controls whether it's an open area (ergo, weather can affect it) or a closed area (like a tunnel, for example; those often have a value of 02). There's more to it I don't quite understand since there also appears to be a value that controls the width of the "roof" of the slice (for example, the Atlantica Civic Center turn in Atlantica has a roofed half and an exposed half), but I don't know which one could be it since I've tried to fix the issue in Last Resort's beachwalk section where the right sidewalk area is marked as roofed area where it shouldn't.
I always thought the roofed area issue would be height related because there's always the very same height when looking at roofed track parts, i think it was 21.25 or something like that.

Reply #226
on: Dec 26, 2022, 1:30 AM
Hero Member
Posts: 263 Joined: February 04, 2009

  • *****
New in Version 4.3.0 (409):
- Type 6 extra objects:
  Mass of the object can be changed. (Unknown data byte 0-3)
  Hitbox of object will be recalculated, when converting from extra to global object. (Unknown data byte 40-51)
  Thanks to AJ_Lethal for discovering this.

To test it, I converted global type 6 into extra objects, enlarged it and changed the mass.
This seems to be working fine.
https://youtu.be/il-I5GsNa98
Get T3ED, Stock & Expansion Pack from Magenta Cloud.

Reply #227
on: Dec 26, 2022, 12:18 PM
Hero Member
Posts: 332 Joined: May 24, 2008

  • *****
  • Personal Text
    Stupid blunt claws.
Excellent update! Although I have to report a couple of bugs:
  • T3ed crashes when exporting NFS3 VRoad data to a CSV (tested on W10, W7 Virtualbox VM and Windows XP Virtualbox VM)
  • Polygon Virtual Road Flags dialog is quite bugged when dealing with flags and drive-over behavior: scrolling past any option beyond 16 and selecting one option and choosing one will roll back your choice by 16 places, it also messes with some data when attempting to reselect the desired option, leading to effects such as missing tire skids or weather not affecting the track polygon (which means there are either flags controlling those behaviors or that drive-over behavior is more customizable than previously thought)
« Last Edit: Dec 26, 2022, 4:17 PM by AJ_Lethal »

Reply #228
on: Dec 27, 2022, 3:17 AM
Hero Member
Posts: 263 Joined: February 04, 2009

  • *****
   
  • Polygon Virtual Road Flags dialog is quite bugged
That must be a very old bug. I can't remember changing anything there in all those years. I think it's always been there. But you're right there is some more data.

typedef struct POLYVROADDATA  // vroad data associated with a polygon
{
   unsigned char vroadEntry;
   unsigned char flags;
   unsigned char unknown[6];
   unsigned char hs_minmax[4];
   unsigned char hs_orphan[4];
   unsigned char hs_unknown;
   bool virtualroadedge;
} POLYVROADDATA;[/list]

I tested all tracks yesterday, the six "unsigned char unknown[6]" are always 0 on every trackpolygon of every track. Only the "hs_unknown" seems to have any information.
« Last Edit: Jan 01, 2023, 12:18 AM by JimDiabolo »
Get T3ED, Stock & Expansion Pack from Magenta Cloud.

Reply #229
on: Dec 31, 2022, 2:57 AM
Hero Member
Posts: 263 Joined: February 04, 2009

  • *****
Excellent update! Although I have to report a couple of bugs:
  • T3ed crashes when exporting NFS3 VRoad data to a CSV (tested on W10, W7 Virtualbox VM and Windows XP Virtualbox VM)
  • Polygon Virtual Road Flags dialog is quite bugged when dealing with flags and drive-over behavior: scrolling past any option beyond 16 and selecting one option and choosing one will roll back your choice by 16 places, it also messes with some data when attempting to reselect the desired option, leading to effects such as missing tire skids or weather not affecting the track polygon (which means there are either flags controlling those behaviors or that drive-over behavior is more customizable than previously thought)
I hope I fixed it. :)

New in Version 4.3.0 (410):
- Modified Polygon Virtual Road Flags: 
   Fixes a bug for "Drive over behavior",
   Added "Disable weather effects (NFS4 Only)". Bit 5 isn't used in NFS3.
- Added Ex & Import "Virtual Road, heights, spdfa spdra" for NFS3. I had only made the NFS4 version.

This is the first time I've changed something there. Didn't understand everything that's happening there, but it seems to be working better now. It's really interesting that, compared to NFS3, a bit is suddenly evaluated there, that was previously unused.

@pete9516: Debug version is in source.7z
« Last Edit: Dec 31, 2022, 3:07 AM by JimDiabolo »
Get T3ED, Stock & Expansion Pack from Magenta Cloud.

Reply #230
on: Jan 16, 2023, 9:24 AM
Hero Member
Posts: 267 Joined: June 09, 2018

  • *****
Excellent update! Although I have to report a couple of bugs:
  • T3ed crashes when exporting NFS3 VRoad data to a CSV (tested on W10, W7 Virtualbox VM and Windows XP Virtualbox VM)
  • Polygon Virtual Road Flags dialog is quite bugged when dealing with flags and drive-over behavior: scrolling past any option beyond 16 and selecting one option and choosing one will roll back your choice by 16 places, it also messes with some data when attempting to reselect the desired option, leading to effects such as missing tire skids or weather not affecting the track polygon (which means there are either flags controlling those behaviors or that drive-over behavior is more customizable than previously thought)
I hope I fixed it. :)

New in Version 4.3.0 (410):
- Modified Polygon Virtual Road Flags: 
   Fixes a bug for "Drive over behavior",
   Added "Disable weather effects (NFS4 Only)". Bit 5 isn't used in NFS3.
- Added Ex & Import "Virtual Road, heights, spdfa spdra" for NFS3. I had only made the NFS4 version.

This is the first time I've changed something there. Didn't understand everything that's happening there, but it seems to be working better now. It's really interesting that, compared to NFS3, a bit is suddenly evaluated there, that was previously unused.

@pete9516: Debug version is in source.7z
Thanks for giving us the debug version of this new update.

Reply #231
on: Feb 19, 2023, 6:27 AM
Hero Member
Posts: 263 Joined: February 04, 2009

  • *****
New in Version 4.4.0 (413):
- Zoom In/Out now works when Track View windows is active.
- Zoom In/Out Track View only (using ALT Key) is now much faster.
- Additional safety check when starting Track View.
- Light properties has now a Combobox for easy selection of track glows (values taken from Tr(N).ini) or special effects.
- Light properties has a Raytrace Light button. Maximum Light Distance will be intensity * 0.1.
- Light/Sound properties will be shown as four bytes. Byte 2 has to be zero, to be visible in game. If not, only raytracer will use it.
- Delete Light/Sound object from block properties.

- Shadow Raytracer can now calculate lights:
  * A imaginary line from each light to vertice points will be calculated. Only when nothing is in the way the light shines there.
  * Light color and intensity will be taken from tr(N).ini
  * Multiplier of light distance can be set. Light Distance will be intensity * multiplier.
  * If red, green or blue of light is higher than the color part of the point it will be replaced.
  * Flashing Lights will be ingnored.
  * Byte 2,3,4 of Light will be ignored.

 Download from Magenta Cloud or NFS Addons
« Last Edit: Feb 19, 2023, 7:38 AM by JimDiabolo »
Get T3ED, Stock & Expansion Pack from Magenta Cloud.

Reply #232
on: Feb 19, 2023, 2:51 PM
Hero Member
Posts: 332 Joined: May 24, 2008

  • *****
  • Personal Text
    Stupid blunt claws.
Wonderful update, the light raytracer mostly works as advertised but I found a bug: it doesn't apply lighting to lane/fence type polygons


Also, forgot to mention but the shadow issues between blocks are still a thing to this date, although they're a bit less frequent than before

Reply #233
on: Feb 24, 2023, 5:29 AM
Hero Member
Posts: 263 Joined: February 04, 2009

  • *****
New in Version 4.4.0 (414):
- Light Raytracing for lanes added.

I found no problem with fence polygons. I tested with "Route Adonf".
Get T3ED, Stock & Expansion Pack from Magenta Cloud.

Reply #234
on: Feb 24, 2023, 10:19 AM
Hero Member
Posts: 332 Joined: May 24, 2008

  • *****
  • Personal Text
    Stupid blunt claws.
Now the light raytracer works as it should, thanks!

Reply #235
on: Feb 25, 2023, 1:08 AM
Hero Member
Posts: 263 Joined: February 04, 2009

  • *****
I really like the night versions with light effects. It was very difficult to integrate this. I could not use the function of the normal ray tracer. In the case of a light, a point-to-point route must be checked. The "Drop" function was created from the first tests, that was a few versions ago.
The program is now very stable for me. I had improved a lot in the last versions.
Get T3ED, Stock & Expansion Pack from Magenta Cloud.

Reply #236
on: Mar 22, 2023, 9:24 AM
Hero Member
Posts: 263 Joined: February 04, 2009

  • *****
New in Version 4.4.0 (415):
- Option to show PolyVRoad for (black) trackpolygons. It should always point forward. But now it can be changed with "Polygon Virtual Road Flags".
- Bugfix when replacing blocks and using undo.

Before you ask, I don't know what the PolyVRoad is used for. But it has always been recalculated when blocks were moved.
« Last Edit: Apr 07, 2023, 12:56 AM by JimDiabolo »
Get T3ED, Stock & Expansion Pack from Magenta Cloud.

Reply #237
on: Apr 28, 2023, 9:30 AM
Sr. Member
Posts: 72 Joined: December 01, 2020

  • ***
If you're interested in OBJ import/export, take a look at https://github.com/tinyobjloader/tinyobjloader
a well maintained reader/writer that is widely used. single-header library in c++03

I never built T3Ed as I don't have access to ancient Visual Studio.

Love that track formats are still seeing meaningful research.

Reply #238
on: Apr 30, 2023, 4:36 AM
Hero Member
Posts: 267 Joined: June 09, 2018

  • *****
Before you ask, I don't know what the PolyVRoad is used for. But it has always been recalculated when blocks were moved.
Yesterday i found out, that when recalculating a single polygon VRoad to "straight", there will be no bumpy roads anymore! This is very important! Jim, can you update the "Recalculate Poly VRoad and Vectors" function so, that it won't comb through all the Poly VRoads into the same direction? But instead it should recalculate each polygon's VRoad to "straight"? Better yet would be a "Whole track" button which recalculates every polygon's Poly VRoad, so that the road would be nice and smooth to drive. I attach some example images.

Reply #239
on: May 03, 2023, 12:29 AM
Hero Member
Posts: 263 Joined: February 04, 2009

  • *****
Before you ask, I don't know what the PolyVRoad is used for. But it has always been recalculated when blocks were moved.
Yesterday i found out, that when recalculating a single polygon VRoad to "straight", there will be no bumpy roads anymore! This is very important! Jim, can you update the "Recalculate Poly VRoad and Vectors" function so, that it won't comb through all the Poly VRoads into the same direction? But instead it should recalculate each polygon's VRoad to "straight"? Better yet would be a "Whole track" button which recalculates every polygon's Poly VRoad, so that the road would be nice and smooth to drive. I attach some example images.
That is interesting. I didn't expect that there would be a difference in the straight direction from the previous recalculation.
I'll take a closer look at it.
Get T3ED, Stock & Expansion Pack from Magenta Cloud.

 


Support NFSAddons: