Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Ultimate 3D 2.1.2 beta; Some minor new features, many bug fixes
Topic Started: Sep 15 2009, 01:32 AM (1,290 Views)
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
Hi everybody,

it is term break, so I actually have had the time and found the motivation to finish the next version of Ultimate 3D for Game Maker. As announced it is discontinued, so there will never be any major new features again. Though this version has some minor new features and many bug fixes. Making it was significantly more work than Ultimate 3D 2.1.1. Summed up it probably has been around ten days of intense work. Since I have changed quite many things it is a beta for now. Please verify that your bugs have been fixed and inform me, if they haven't been fixed.

Here is the list of new features:

  • There are functions called GetTextureWidth(...) and GetTextureHeight(...) now, which return the size the texture actually has after loading. This is useful to ensure that UI elements are drawn at the right size on all systems.
  • There is a function to specify LoD factors for every single LoD of a terrain now (it is called SetTerrainLODFactors(...)).
  • It is no longer necessary to call Draw3DText(...) in the draw event. It can be called anywhere and will be rendered in the next frame. Additionally the drawn text no longer covers 2D graphics.
  • I have migrated the improved algorithm for the computation of mesh to tangent space matrices from Ultimate 3D 3.0. This means that AddInverseTangentSpaceMatrices(...) and ApplyParallaxAndBumpMapping(...) do not have problems with creases and double vertices anymore. The new algorithm regards the normals. Besides it does not modify the normals of the mesh anymore, so using environment mapping or per vertex lighting on other materials in the same model does not cause problems anymore. The new system is designed to work well with normal maps baked in Blender. The only problem that is left in this context is that Blender mirrors its mesh to tangent space matrices sometimes. If anybody is interested I can write a GML script, that adapts ensures complete compatibility to Blenders normal maps.

Here is a list of bugs, which should be fixed now:

  • Portals can no longer lead to room changing, when the camera moves parallel to them (reported by skarik).
  • Texture coordinates are exported correctly to *.u3d files now (reported by MysteriXYZ).
  • The terrain renderer no longer makes textures invisible on particular tiles, when they are still opaque enough to be seen (reported by matrebatre).
  • Stencil shadows now work fine for all skinned models, even when the shadows intersect other shadows (reported by Fartface_McGiggles). Additionally there should not be z-fighting artifacts on the lit side of self-shadowing shadow casters anymore.
  • A memory leak in SaveTerrainHeightMap(...) has been fixed (reported by MysteriXYZ).
  • subdivide_texture now works correctly (reported by 57E).
  • SetBoneRotation(...) can no longer lead to crashes (reported by hepolite).
  • SaveTerrainHeightMap(...) is going to work correctly in the GEX (once I have this ready for download) (reported by 3da).

Additionally I have done some things to make the problems with shadow casters getting into the far clipping plane less annoying. There are some bug reports, which could not be reproduced:

  • Animated billboards worked fine and there was nothing suspicious in the application sent for reproduction (reported by Despellanion).
  • Setting up a render target texture as custom terrain light map works as expected (reported by skarik).
  • Light source colors are not flipped when normal mapped per pixel lighting with three light sources is being used (reported by Eanbro).

Besides all these things there are some changes in the documentation (currently only in the CHM version in the SDK download below). The new features are documented, broken links are fixed, the longitude/latitude mix up has been corrected and SetPortal(...) is documented correctly now.

This is already quite much, but it is not all. There is still the special surprise. While debugging some complex projects I created something that is so useful, that it has to be released. I have migrated some logging modules from Ultimate 3D 3.0 over to Ultimate 3D 2.1.2 and used them to make special modified DLLs. They are distributed as Analysis Pack. To use them you simply replace the Ultimate3D.dll by one of these two DLLs. Then your Ultimate 3D application will create a file called PerformanceLog.txt whenever it runs. This file usually gets very huge. It contains one line for every call to an Ultimate 3D function. For every call there is additional information. It logs when the call happened and how long it took to finish it. If you use the Ultimate3DParameterLog.dll instead of the Ultimate3DPerformanceLog.dll it also outputs the values, which have been passed for the parameters in these calls (passwords are censored). As an example here is an extract from the log you get, if you use the Ultimate3DParameterLog.dll with the SDK.
Spoiler: click to toggle

Using the Ultimate3DPerformanceLog.dll the comment="..." parts would be missing, but other than that it would be the same. These files can be processed very well with applications like OpenOffice.org Calc. You can use them for debugging and for performance analysis. For example you can use OpenOffice.org Calc to sort the sheet by the function names, take the sums of the lengths for all functions and find out where most time is spent. The results can be visualized in charts, which eases the analysis.

Anyway this was enough talking. Here are the download links. The downloads on Ultimate3D.org are not updated yet. I will update them once the beta phase is over.
SDK
Analysis Pack

With friendly regards,
Dr. Best
Offline Profile Quote Post Goto Top
 
Synexn-Prime
Member Avatar
Sierra Prime GF32 : Unit 7
[ *  *  *  *  *  * ]
Nice. As soon as I upload my Calc HW from my pen and decide if I wanna do tomorrow's, I'm totally testing this out.

Something I found interesting in the sample log, though.
Code:
 
LightStep 0.008451ms


In Game Maker, that measured to be 2 ms. I think that says something. I mean, a big something. Neato surprise.

I'll check to see if all the bugs I reported are still there, and I'll reply to the PM about the additive mode thingy later.

Edit: Muahaha, the district broke my online class again so the assignments are postponed. Forums there work awesome. I'm probably going to be graded down from how much I post, though.
Edited by Synexn-Prime, Sep 15 2009, 02:32 AM.
Synexn-Prime, the Bigger Sister. Prepare to watch her fly.
Watch that tear shatter the steel. 2012.
Posted ImagePosted Image
Current Stone: Water : Prepare to help her survive. June 2010.
formerly known as skarik
Offline Profile Quote Post Goto Top
 
ashrat3000
Member Avatar
u3d raytracer
[ *  *  *  *  *  * ]
Quote:
 
There are functions called GetTextureWidth(...) and GetTextureHeight(...) now
YES.

That performance log could be really useful to figure out which functions are slowing things down and what to put in loops etc.
Which I'm going to use to speed up my ray tracing. hehe

Oh, does this log shader performance as well? I'm not even sure if thats possible.


-downloads-

그대를 사랑해


Offline Profile Quote Post Goto Top
 
Synexn-Prime
Member Avatar
Sierra Prime GF32 : Unit 7
[ *  *  *  *  *  * ]
Pros
  • Shadows are more precise
  • clipping problem isn't much of a problem now.
  • I love the special surprise.
  • No more problems with the normals with normal mapping
  • Portal problem is almost fixed

Cons
  • Shadow ZBuffer artifacts are much more pronounced. They did not go away until I scaled my camera minimum range by eight, which means I have to scale up my whole game again to remove them.
  • Performance log uses non-western line endings ;_; makes me very sad - not like I care though
  • Like I said, my portal problem is ALMOST fixed. Not entirely. It still is pretty much impossible to navigate a race track when it suddenly disappears from under you. It is certainly a problem with Ultimate 3d, not me, as it does the same thing as before, just it takes more of the same motion.


I think that's it. Very nice, man!

Question: is the internal clock set to 0.001676ms or something? That was the lowest number I got recorded. Anyhow, it turns out Game Maker delays at least 0.02ms between every call, and 0.5ms for every model update call. Everything seems to be working great.
Synexn-Prime, the Bigger Sister. Prepare to watch her fly.
Watch that tear shatter the steel. 2012.
Posted ImagePosted Image
Current Stone: Water : Prepare to help her survive. June 2010.
formerly known as skarik
Offline Profile Quote Post Goto Top
 
Despellanion
Member Avatar
The Black Curtain
[ *  *  *  *  *  * ]
Sweet. I've been waiting for this.
Posted Image

It's an MMORPG, you rtard!



Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
skarik
Sep 15 2009, 02:19 AM
Something I found interesting in the sample log, though.
Code:
 
LightStep 0.008451ms


In Game Maker, that measured to be 2 ms. I think that says something. I mean, a big something. Neato surprise.
It measures only the time that is actually spent in the DLL code. The external_call takes some additional time by itself.
skarik
 
Question: is the internal clock set to 0.001676ms or something? That was the lowest number I got recorded.
The measurement takes a bit time by itself.

ashrat3000
 
Oh, does this log shader performance as well? I'm not even sure if thats possible.
It logs the time for every function call. Shaders with a low performance will increase the length of the calls to Render() or Present().

skarik
 
Shadow ZBuffer artifacts are much more pronounced. They did not go away until I scaled my camera minimum range by eight, which means I have to scale up my whole game again to remove them.
So you get z-fighting artifacts at the back side of shadow casters? If that is it I will make the minimal offset depend on max_range and min_range to reach a more reliable behavior.

skarik
 
Performance log uses non-western line endings ;_; makes me very sad - not like I care though
Well, yeah I use Linux style LF instead of CR+LF or CR. Most editors adapt to this correctly, but some do not (e.g. notepad). If anybody does not have an editor that handles this correctly he may want to download Notepad++.

skarik
 
Like I said, my portal problem is ALMOST fixed. Not entirely. It still is pretty much impossible to navigate a race track when it suddenly disappears from under you. It is certainly a problem with Ultimate 3d, not me, as it does the same thing as before, just it takes more of the same motion.
Thanks, I will have a look at the code again.
Offline Profile Quote Post Goto Top
 
luenardi
Member Avatar
LEVEL 50 FIREFLY
[ *  *  *  *  *  * ]
I found a BUG!
Put several transparent objects behind each other. no use very low ambient lighting.
any secondary objects have strange look to them, it's as if the light values or the alpha rendering screws up. almost as if the objects are being highlighted with black... noticed this in the second room of recall with the blue chairs and table.. it that right or am i crazy.
similar things happen with textures with alpha. i should have said something sooner. further.. god bless DR. BEST
Better! Faster! Stronger!


-_/The Coded One is coming!\_-
Posted Image
Blink.............. and youll miss it!
Posted Image

Still known as luenardi.
Offline Profile Quote Post Goto Top
 
DudeX92
Member Avatar
Forum Leader
[ *  *  *  *  * ]
Need to try this out when i had time.
Offline Profile Quote Post Goto Top
 
Synexn-Prime
Member Avatar
Sierra Prime GF32 : Unit 7
[ *  *  *  *  *  * ]
Quote:
 
So you get z-fighting artifacts at the back side of shadow casters? If that is it I will make the minimal offset depend on max_range and min_range to reach a more reliable behavior.
That's right. On the back side. That will be cool. Thank you.

Quote:
 
Well, yeah I use Linux style LF instead of CR+LF or CR. Most editors adapt to this correctly, but some do not (e.g. notepad). If anybody does not have an editor that handles this correctly he may want to download Notepad++.
That's what I ended up using and why I don't care.

Quote:
 
Quote:
 
PORTALS
Thanks, I will have a look at the code again.
Thanks for doing that!

I'm thinking, to make an engine like this is a lot of work, and I really can't say how thankful I am.
Synexn-Prime, the Bigger Sister. Prepare to watch her fly.
Watch that tear shatter the steel. 2012.
Posted ImagePosted Image
Current Stone: Water : Prepare to help her survive. June 2010.
formerly known as skarik
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
luenardi
Sep 15 2009, 03:07 PM
I found a BUG!
Put several transparent objects behind each other. no use very low ambient lighting.
any secondary objects have strange look to them, it's as if the light values or the alpha rendering screws up. almost as if the objects are being highlighted with black... noticed this in the second room of recall with the blue chairs and table.. it that right or am i crazy.
similar things happen with textures with alpha. i should have said something sooner. further.. god bless DR. BEST
So it is a combination of multiple semi-transparent layers covering each other and stencil shadows right? This is an awful combination. I may toy around with it a bit, but I can not promise a fix. Direct3D 8.1 simply does not provide the features needed for something like this.

skarik
 
I'm thinking, to make an engine like this is a lot of work, and I really can't say how thankful I am.
Now imagine how it is to make Ultimate 3D 3.0 :D .
Offline Profile Quote Post Goto Top
 
Gandalf20000
Member Avatar
DirectX Newbie
[ *  *  *  *  *  * ]
I think I might have found a bug. When you try to use the shadow LODs, you get artifacts. Not because of the lower quality, but actual artifacts, like the weird stripes.
A website about my dad's books
Offline Profile Quote Post Goto Top
 
luenardi
Member Avatar
LEVEL 50 FIREFLY
[ *  *  *  *  *  * ]
Dr. Best
Sep 16 2009, 01:28 AM
luenardi
Sep 15 2009, 03:07 PM
I found a BUG!
Put several transparent objects behind each other. no use very low ambient lighting.
any secondary objects have strange look to them, it's as if the light values or the alpha rendering screws up. almost as if the objects are being highlighted with black... noticed this in the second room of recall with the blue chairs and table.. it that right or am i crazy.
similar things happen with textures with alpha. i should have said something sooner. further.. god bless DR. BEST
So it is a combination of multiple semi-transparent layers covering each other and stencil shadows right? This is an awful combination. I may toy around with it a bit, but I can not promise a fix. Direct3D 8.1 simply does not provide the features needed for something like this.

skarik
 
I'm thinking, to make an engine like this is a lot of work, and I really can't say how thankful I am.
Now imagine how it is to make Ultimate 3D 3.0 :D .
Agreed it makes sense "damb.. thats why john carmack used open gl"
on the note from skarik "you said it brother! i think that i might have gone nuts after releasing 2.1.2 only to find more problems"
Better! Faster! Stronger!


-_/The Coded One is coming!\_-
Posted Image
Blink.............. and youll miss it!
Posted Image

Still known as luenardi.
Offline Profile Quote Post Goto Top
 
Reikyrr
Member Avatar
-
[ *  *  *  *  *  * ]
"With every solution there come more problems."
|R03l0R<|>R3ikyrr|
Offline Profile Quote Post Goto Top
 
Dr. Best
Member Avatar
Administrator
[ *  *  *  *  *  * ]
@ Gandalf20000
Well, apparently my LoD generation algorithm can generate three sided edges. In Ultimate 3D 3.0 you could use custom LoDs. In Ultimate 3D 2.1 you are probably just screwed.

@ luenardi
I think Direct3D 10 was the first API with a general solution to alpha blending problems. I have not seen much alpha blending in Doom 3. Probably that is why it does not cause problems ^_^ .

@ everybody (and in particular @ roelor ^_^ )
MysteriXYZ reported a bug in SetTerrainLODFactors(...). You can find a DLL that fixes it here.
Offline Profile Quote Post Goto Top
 
luenardi
Member Avatar
LEVEL 50 FIREFLY
[ *  *  *  *  *  * ]
ahhh.. was that due to the Shader Model or DirectX itself? yeah almost no alpha objects are behind each other.. this is just like the lighting system i need to use it in moderation and think and look around alot to make sure this does not look odd was trying to do a specteral anomaly and it looked odd. thanx anyway. ^_^
Better! Faster! Stronger!


-_/The Coded One is coming!\_-
Posted Image
Blink.............. and youll miss it!
Posted Image

Still known as luenardi.
Offline Profile Quote Post Goto Top
 
Go to Next Page
« Previous Topic · Announcements · Next Topic »
Add Reply