Jump to content
The Dark Mod Forums

Object Corruption in DR


Recommended Posts

Well, I can't find the thread where greebo posted the latest version of DR with the change from float to double, so I'm posting my comment in a new thread. I'm using this latest DR version.

 

Is there anything at all that can be done about the problem of DR's math corrupting objects?

 

Here is a fresh copy of one of the Cabinet prefabs. Note the nice way the faces meet on the highlighted block at center screen.

 

post-3633-0-01145800-1343927073_thumb.jpg

 

Now here's the same cabinet after a week of DR sessions. Note how the highlighted block's faces have started moving. In a couple months, the block will be completely gone (it happened to me, which caused me to refresh all my cabinets last week).

 

post-3633-0-03921900-1343927085_thumb.jpg

Link to comment
Share on other sites

darkradiant seems to see .0000 as .0004, and after a while it become .0008, .0016, .0032, .0064, .0128, etc till it corrupts func_static objects

 

but just moving func_static objects seems to cause them to go corrupt (this is brushes that have been changed into func_static objects)

Link to comment
Share on other sites

Oh, so *THAT* explains it!

 

Back when I was working on phrase book, I noticed that some roofs I had constructed started deform in a subtle yet weird manner. I had a roof with two brush components. I had caulked the unseen sides where the slants joined. I was sure the roof was okay and cloned it around. And at some point the caulk came visible in game. I thought I had made some weird mistake. Eventually I just applied the textures onto the whole roofs instead of fixing the geometry that was subtly broken in unknown amount of roofs. So it was some weird rounding error in the end!

 

This is something ultra-critical which needs an emergency-patch soon.

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

This might also explain some of the z-fighting problems in St Lucia beta.

 

Biker is the only one seeing z-fighting with patches. Not sure what's up with that, but quite possibly a 1.08 renderer glitch.

 

The floating point issue did cause a different headache though.

Link to comment
Share on other sites

If grayman is using the one experimental build I posted in the internal forums, then DarkRadiant is basically behaving like the pre-1.6.0 versions (before I switched to single-precision floats for performance reasons). Can't do more than that at the moment, I'm pretty burnt out on coding, so if somebody else wants to take a look: be my guest. Don't wait for me to fix it.

Link to comment
Share on other sites

If grayman is using the one experimental build I posted in the internal forums, then DarkRadiant is basically behaving like the pre-1.6.0 versions (before I switched to single-precision floats for performance reasons).

 

That's the one I'm using. The plane shift shown in the OP occurred while using only this version of DR. The plane shifts I've seen over the past year+ were (of course) caused by the versions of DR available over that time.

Link to comment
Share on other sites

I had this problem often, it seems to happen mostly on small brush solids (I have plenty in my map, things like fences, wood planks, it even ruined my stair railing, I now see - there are several corruptions that actually made past my eyes and are in the released map right now). Just to make sure, the latest release (1.7.2) shouldnt suffer from this problem, is that right? Or is it common to all versions?

Edited by RPGista
Link to comment
Share on other sites

As I'd said in the other thread, the real solution here would be to sort of "freeze" the planes from brushes read at map start, and write out exactly these when the brush has not been touched in the editing session. So if it starts with 0.0000000001, it stays at 0.0000000001 forever.

 

Converting the brush planes to vertices, then converting them back at write and then writing out the value is what causes the corruption, and no amount of precision in the float/double/whatever values you use can prevent this, the best you'd only be able to achive is to make the corruption very small - but a 100 reads+writes would still ever so slightly move things away.

 

But I don't have access nor experience with the DR source tree, so I can't fix this at all. Maybe someone else can.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

  • 2 weeks later...

I did look at the map file format http://www.modwiki.net/wiki/MAP_%28file_format%29 , and noticed the following:

 

For brushDef and brushDef2 brushes, the plane is defined by a triangle instead:

( p1x p1y p1z ) ( p2x p2y p2z ) ( p3x p3y p3z ) ( ( xxscale xyscale xoffset ) ( yxscale yyscale yoffset ) ) "material" ?

 

 

It is abit unclear:

 

* can one simply exchange brushDef or brushDef2 for brushDef3?

* what is the difference between brushDef and brushDef2?

 

If these formats can be interchanged at wil, then maybe it would be better that D3 writes out the version with the 3 triangle points instead of the one with the face equations,and maybe this would fix the corruption occuring due to multiple saves?

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to comment
Share on other sites

  • 5 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 6 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...