Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
Offline saviilsy  
#1 Posted : Saturday, September 10, 2011 8:14:03 PM(UTC)
saviilsy

Joined: 8/24/2011(UTC)
Posts: 95

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
Hi all!

This is a little addition to Delta Engine. PLEASE contact/post if You find bugs, performance enhancements, useful additions.

Description :

General purpose hierarchical scene graph for all Your 2D and 3D needs.
Currently it supports Geometry, Mesh and Cameras of the Delta Engine. It does not need any changes done to Delta Engine itself.

Compatibility :

Version 0.1.0.0 - Delta Engine 0.8.6

Features :

  • Caching world matrix, no need to recalculate if there's is no need to
  • Get/Set Local position/rotate/scale
  • Get World position/rotate/scale
  • Child nodes, parent, root hierarchy
  • Made to be inherited, works as a wrapper too
  • Cameras work as node children too
  • TODO : Add more features when I remember them


Changes :

10.9.2011 - 0.1.0.0
  • First preview of the scene graph, basic functionality working. Should have released it when DE 0.8.7 came BUT I COULD NOT WAIT BigGrin


License :

New BSD, please read more from the source files.

Usage :

Unpack in Samples, open the solution in SceneGraphNode/SceneGraphNode, rebuild and run to see some weird tests.

TODO : (please contribute if You can)

  • Add Axis based node rotation, can be easily done with quaternions
  • Setting of world position, rotation and scale.
  • Make GetWorldRotation more "mathematical"
  • Make DE particle effect to work with this scene graph (if possible)
  • Make DE model class work as it comes

Edited by user Saturday, September 10, 2011 8:30:14 PM(UTC)  | Reason: Not specified

File Attachment(s):
SceneGraphNode.zip (25kb) downloaded 18 time(s).

You cannot view/download attachments. Try to login or register.

Wanna join the discussion?! Login to your forum accountregister a new account. Or Connect via Facebook Twitter Google

Offline Benjamin  
#2 Posted : Saturday, September 10, 2011 8:20:27 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Good stuff, will take a look later and try to add it into v0.8.7, but if it does not make it (maybe too many changes would be required on my side) it will come later ..
Offline saviilsy  
#3 Posted : Saturday, September 10, 2011 8:25:29 PM(UTC)
saviilsy

Joined: 8/24/2011(UTC)
Posts: 95

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: Benjamin Nitschke Go to Quoted Post
Good stuff, will take a look later and try to add it into v0.8.7, but if it does not make it (maybe too many changes would be required on my side) it will come later ..


No problemos, hopefully it will be useful for some people. Add it if You wish, or don't - it works nicely as an addon too. I will keep updating it though either way.

Now that the scene graph is ready, I will port all my code from Unity to DE as it has become my main engine now :) Hopefully You all see some secret stuff before winter Cool
Offline Amer  
#4 Posted : Wednesday, September 14, 2011 9:30:28 AM(UTC)
Amer

Joined: 8/21/2011(UTC)
Posts: 28

Thanks: 1 times
Nice stuff, i have nice idea about great scene graph.
- Basically it will work in this way, you'll have main SceneNode which is the root.
- Root can have lot of children which in meanwhile can have another scene nodes.
- Every scene node can attached given objects (Box,Sphere,Animated mesh, billboard, camera etc).

Still need to be planned but something can be combined here, officially is not small task, and probably
will be added into 0.9.0, what do you think about?
Anyway, nice work you've done.
Offline saviilsy  
#5 Posted : Wednesday, September 14, 2011 7:15:42 PM(UTC)
saviilsy

Joined: 8/24/2011(UTC)
Posts: 95

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: Amer Go to Quoted Post
Nice stuff, i have nice idea about great scene graph.
- Basically it will work in this way, you'll have main SceneNode which is the root.
- Root can have lot of children which in meanwhile can have another scene nodes.
- Every scene node can attached given objects (Box,Sphere,Animated mesh, billboard, camera etc).

Still need to be planned but something can be combined here, officially is not small task, and probably
will be added into 0.9.0, what do you think about?
Anyway, nice work you've done.


Thanks Amer that sounds good.

Just as the hierarchy is clear and You can implement own nodes/entities that have custom Render() method I think we can do everything we need with a scene graph. I think I'll update this scene graph over the weekend if I find time to add those matrix calculations (it's been AWHILE since I've calculated "raw" matrices and built a scene graph from beginning).

Best way to use my scene graph is to always override the Render method and do some culling there. As Mesh class don't have (nor does it need to) bounding box or similar it is always the user that should do the culling calculations. The graph performs ok as it is, but I presume there will need to be culling code for slower platforms with lots of data. I think there can be couple of performance hacks that can improve my scene graph - yet it's simple enough for people to hack their own from it if necessary.

I've been hacking a custom file type/protocol that can also be used with Delta Engine. Will release some info about it when I can show something cool from it (it's a hybrid between json like format and binary format that has type safety and great performance).
Offline saviilsy  
#6 Posted : Sunday, November 13, 2011 8:43:44 PM(UTC)
saviilsy

Joined: 8/24/2011(UTC)
Posts: 95

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
New version of the scene node is done, if You wish some features to be in the next release, now it's the time to discuss it. I will release the version after I do some testing (most of the math was redone).

Sneak preview of the features :
Code:

/*
 * Changes :
 * xx.11.2011 : Release of the 0.2.0.0 version
 *   + Added Visible property for easy control whether node and it's children are to be rendered.
 *   + Added set and offset world scale (offset is kinda useless, but it's still there).
 *   + Added set and offset world rotation.
 *   + Added set and offset world position.
 *   + Added Axis/angle rotation for all local and world rotations and offset rotations.
 *   + Added OffsetLocalScale.
 *   + Added OffsetLocalRotation.
 *   + Added CullingSolution to the node.
 *   + Added CulledCount to get the idea how many objects were indeed culled.
 *   * Changed the worldrotation to use quaternions, and added a varible for storing it for later use. Scaling and Translation need not to have
 *     own separate variables as they can be extracted from world matrix.
 *   * Changed rotation to use quaternions.
 *   * Changed Render method to be protected and named RenderImplementation as everything needs to be done with the public Render method
 *     to keep everything in sync.
 *   * Changed lock(this) to lock(lockObject) in Render since it is more correct way to do locking.
 */


I will not add any logic code to the scenenode. I mean that there will be no controller or such things in the node, only things that are close to rendering, culling and scene hierarchy. This is because almost every time You still need to subclass a node class to add custom logic to it and controllers seem to be a little much there. Moreover not everything needs to be updated, You have more control how to update nodes and such performance++. Though in the future I might add controllers and some cool logic to keep track of updatable things, but this comes when DE is more mature and I have a better grasp what is needed. Feel different about this? Give me reasons to do it, and I might just put it in the next release...

Vector class should btw have Divide that results a vector. Meaning that Vector result = Vector.Divide(new Vector(4,4,4), new Vector(2,2,2)); would result result being (2,2,2). Now I just added a class VectorExt that has this single method.
Offline Benjamin  
#7 Posted : Sunday, November 13, 2011 10:06:46 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Cool stuff, will include it into the Nightly releases once you are done. Maybe you could push your code yourself on CodePlex as a Fork (just to try out that feature and make it easier in the future) :)
Offline saviilsy  
#8 Posted : Monday, November 14, 2011 8:39:08 AM(UTC)
saviilsy

Joined: 8/24/2011(UTC)
Posts: 95

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: Benjamin Nitschke (DeltaEngine) Go to Quoted Post
Cool stuff, will include it into the Nightly releases once you are done. Maybe you could push your code yourself on CodePlex as a Fork (just to try out that feature and make it easier in the future) :)


Will do/try. I will just add the controller code (ALTHOUGH I SAID I WOULD NOT BUT I WAS WRONG!) and test it.

BTW. Updating to 0.9.0, extracting the package, opening solution and hitting build I have tons of errors in vanilla build :| 0.8.6 built right out of the box. Errors seem to relate to external libraries...
Offline Benjamin  
#9 Posted : Monday, November 14, 2011 10:33:44 AM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Yeah, sorry about that. v0.9.0 had some problems. The nightly releases will start soon (actually all bugs are fixed and features are closed, we are just doing some extra testing) and then issues will disappear much more quickly ;)
Offline saviilsy  
#10 Posted : Saturday, March 10, 2012 3:04:39 PM(UTC)
saviilsy

Joined: 8/24/2011(UTC)
Posts: 95

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
Hi all,

I just forked the Delta Engine nightly to add the scenegraph related code into that source tree - it'll take some time to backport the new scenegraph back to DE but it will be done hopefully by the end of next week.

Some features were missing from DE when I did some additions to the SceneGraphNode and ported the project to XNA to make the changes there, now it seems that DE can handle it so I will backport it to DE and continue the development in that environment.

There are some great changes in SceneGraphNode I have made :

  • Culling can now be done
  • Controller logic, now external mutator objects can be attached to node to change their data and can be hooked to different phases of the update process (pre/post-transform etc). Now one can create fe. a rotator controller that spins object and use that same controller for multiple object (also think physics controllers...)
  • More control when update and render of each child node can happen
  • Fixed bugs
  • Removed couple of non necessary methods
  • Changed rotation to use quaternions
  • Added helper methods
  • Improved calculation for extra performance
  • Everything can now be transformed local to world AND world to local
  • Multithreaded updater(!!!!) that uses thread pool and branches the update process, in very large scenes this drops the update time to 25% of the original (in my quad core setup). Made using the .NET classes that should be available for all the DE platforms
  • Other stuff I do not remember


This will be a somewhat breaking update as some methods have changed names and so on. This is why I will backport it carefully to try to make every stuff in the new version necessary so that it will not break compatibility in the future (although every change is minimal one at best...).

Fun times, please be patient it will take some time to do this properly (plus all the coding conventions DE requires BigGrin )
Offline Benjamin  
#11 Posted : Saturday, March 10, 2012 3:43:53 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Good stuff, I just created a task to merge the fork back into the public repo Cool
Offline saviilsy  
#12 Posted : Sunday, March 11, 2012 6:58:55 PM(UTC)
saviilsy

Joined: 8/24/2011(UTC)
Posts: 95

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
A small update : I managed to port most parts to the DE in short time (as I said before, DE and XNA are almost identical when it comes to math).

The code compiles ok.

I still need to do tests/comments etc, but so far so good.

I did however run into a problem that You guys could help me with (opinion) : Do we need a culling method or just partition based query method?
Let me explain a bit more. If one needs a flexible and usable scenegraph, the scenegraph almost always needs a partition scheme (think oct/quad trees or similar).
With partition scheme culling tests become obsolete as scenegraph can query all nodes within fe. specific bounding box and render those. Without partition scheme the renderer needs to go through all of the nodes and build the render list.

Partition scheme also comes in handy with collision tests too as one object can query nearby objects and so on...

So :

CullingSolution equals less work but becomes obsolete fast.
PartitionSolution equals more work but better for future.

Which one? :)
Offline Benjamin  
#13 Posted : Sunday, March 11, 2012 10:50:42 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
I vote for the Partition Solution. It will be more flexible and useable in the long run. I think some culling or other optimizations should be done for a specific game, not for the engine or a library in general.
Offline saviilsy  
#14 Posted : Sunday, March 11, 2012 11:35:49 PM(UTC)
saviilsy

Joined: 8/24/2011(UTC)
Posts: 95

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
I agree on that, however users must now have to define bounding area somehow. I guess bounding box is sufficient for basic/more advanced needs. I could do oriented bounding box/sphere too, but OBB could be a bit much for the mobile platforms.

Benjamin, could there be more ref based calculations on vectors/quaternions/matrices? We could gain few nano seconds that way Cool

Also it's a bit weird that quaternion has Invert() method as a void. Is it a mutable struct? If it would return inverted quaternion it would be easier to use, or better yet Quaternion.Invert(out target) for performance... Just a thought.
Offline saviilsy  
#15 Posted : Monday, March 12, 2012 11:50:27 AM(UTC)
saviilsy

Joined: 8/24/2011(UTC)
Posts: 95

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
Here's the current idea :

All subnode/child functions are removed from SceneGraphNode altogether.

Each scenegraphnode can have a SceneGraphNodeModel within to handle the childs.
You can init a model such as this(pseudo) :
Code:

SceneGraphNode root = new SceneGraphNode();
SceneGraphNodeModelOctTree oct = root.SetModel<SceneGraphNodeModelOctTree>();
oct.Add(new SceneGraphNode());

So if you want to add childs to scenegraphnode you must do it via the model that describes how the child nodes are partitioned.

Now the ISceneGraphNodeModel is described as something like this :
Code:

public interface ISceneGraphNodeModel
{

  SceneGraphNode Parent
  {
    set;
  }
  // Get all the nodes for update
  IEnumerator<SceneGraphNode> NodeEnumerator
  {
    get;
  }
  // Query nodes based on bounding area
  IEnumerator<SceneGraphNode> QueryNodes(ref BoundingRect rect);
}

And you can access the model via SceneGraphNode.Model

This requires though that people define Bounding Rect/Sphere for each node.

SceneGraphNode also has events when child is added or removed so that grouping nodes can somehow updateir THEIR bounding areas...

This needs a bit work since all the child node handling must be redone as well as do more event based handling.
Offline Benjamin  
#16 Posted : Monday, March 12, 2012 5:52:25 PM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Originally Posted by: Santtu Syrjä Go to Quoted Post
I agree on that, however users must now have to define bounding area somehow. I guess bounding box is sufficient for basic/more advanced needs. I could do oriented bounding box/sphere too, but OBB could be a bit much for the mobile platforms.


Yes, I would just use bounding boxes or maybe provide generics with help of the IContains interface (which can then be used by BoundingBox, BoundingSphere, etc.).

Originally Posted by: Santtu Syrjä Go to Quoted Post

Benjamin, could there be more ref based calculations on vectors/quaternions/matrices? We could gain few nano seconds that way Cool

Also it's a bit weird that quaternion has Invert() method as a void. Is it a mutable struct? If it would return inverted quaternion it would be easier to use, or better yet Quaternion.Invert(out target) for performance... Just a thought.


We basically always add more methods whenever we need them or performance needs to be improved somewhere. Feel free to add your additions. I would say for Vector, Color, Matrix, Point, Size, Rectangle (which are the most used database classes) there won't be much that can still be optimized as we have improved them over and over again. Quaternions have not been used much, so they might lack a bit (no ref, some methods like Invert not returning the result, etc.) I have written down a few bug reports to get this solved in the future.
Offline saviilsy  
#17 Posted : Monday, March 12, 2012 10:33:41 PM(UTC)
saviilsy

Joined: 8/24/2011(UTC)
Posts: 95

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
Could be a bit nitpicking but performance wise should it be faster to use ref methods in for example IContains interface?
Meaning that all BoundingBox, -Sphere and Vector are structs, they are copied each time contains is called.

Some things are missing in the Vector static functions such as Vector.Multiply(ref v1, ref v2, out result), I'll add these as I go through the code before committing the first version.

I did not inherit the IContans based style in the Model because almost always one needs to query object with bounding box constructed from view frustum (I made a method for this in the BaseCamera : void GetViewFrustumBoundingBox(out toSet) ). Making all cases like vector and sphere does not make sense in that matter.

Btw, I tested performance abit with structs and static methods awhile ago and got the result that method like this
SomeStruct.StaticFunction(ref, ref, out)
is about 33% faster(release build, MS .NET) than
SomeStruct.DoSomethingThatReturnsSomething(ref, out)

But these are micro optimizations which are considered evil by some. I however like to push every single calculation to the max :)
Offline Benjamin  
#18 Posted : Tuesday, March 13, 2012 8:16:01 AM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
That is the thing with micro-benchmarks: It can make a huge difference (up to 2x times faster) using ref, but there are hardly any use-cases when it matters.

For example the Vector.VectorTests.TestNormalize tests calling "vector = Vector.Normalize(vector)" vs "Vector.Normalize(ref vector)" and it almost makes no difference because the normalize code eats up all the CPU cycles plus the way we have to call it negates any benefit. The difference is greater when calling Vector.Normalize with Vector.Zero because the method will early out:
Code:

TestNormalize : Passed (Release Mode)
149ms for Vector.Normalize (10 million calls)
148ms for Static Vector.Normalize (10 million calls)
143ms for Vector.Normalize Zero (10 million calls)
82ms for Static Vector.Normalize Zero (10 million calls)


The results get even stranger when the Vector.Normalize methods (static or instance version) call another framework. All the extra overhead makes them twice as slow, which is why we rarely call XnaVector.Normalize, etc. The Build System has also a much easier time to optimize just one way of calling code than supporting both static and instance call optimizations. For example physics, geometry and other low level platform calls can be optimized by exchanging Vector calls to whatever the library or framework uses (XNA vectors, SlimDX, SharpDX, etc.) OpenTK datatypes are never used because they seem to be always slower.

But you are totally right to check and double-check and see if anything is slow and should use ref instead. That is why I said before feel free to modify the Delta.Utilities.Datatypes classes and commit your fork on CodePlex so others can benefit as well and we might merge it if it makes sense. In your code you might use a lot more math code, which could need more optimization than a typical game, so it might be more important for you to optimize than for others. Keep in mind we also tried to keep the number of methods low in all high level classes (mostly less than 10 methods you see when Intellisense opens, so it fits in the initial suggestions), which is obviously not so easy with a struct like Vector, which has to provide lots of functionality.

Still, we tried to keep the number of methods low and avoided duplicates in v0.7 (the ZombieParty version). However each game team was annoyed to be forced to use ref calls, so we added the slower non-ref calls again, which caused several game teams to use really slow code. Then in v0.8.3 (after the Soulcraft Tech Demo) we added Obsolete attribute warnings for all calls that are bad, so people could optimize their code. It still did only annoy people and they turned the warnings of or removed the Obsolete attributes ^^ So we finally settled in v0.8.6 (last internal beta release) to remove the Obsolete warnings and just write comments in the Xml summary of the slow methods (like Matrix.operator *). Plus we are also able to catch some unoptimized code in the build system and replace it with faster code, which seems to be more productive in the long run. Usually it does not make a game or application much better when the developer has to worry about which method to call every time he just wants to multiply some matrices or calculate some rotations, etc. I certainly don't think much about it anymore. Performance issues are usually much higher level (geometry, material optimizations, shaders, etc.)

Here is the source code for Vector.VectorTests.TestNormalize (changed it a bit for testing):
Code:

			[Test]			
			public static void TestNormalize()
			{
				Vector testVector1 = new Vector(10, 20, 30);

				// Results (Release)
				// -------
				// 2010-04-08
				//  Delta:   150 ms
				//  XNA:     350 ms
				//  OpenTK:  450 ms
				//  SlimDx:  330 ms

				Vector vector = One;
				PerformanceTester.Profile10MilionTimes("Vector.Normalize",
					delegate
					{
						vector = Normalize(testVector1);
					});
				Assert.Equal(vector, Normalize(testVector1));

				// Do the same test with a static call
				PerformanceTester.Profile10MilionTimes("Static Vector.Normalize",
					delegate
					{
						vector = One;
						Vector.Normalize(ref vector);
					});
				Assert.Equal(vector, Normalize(One));

				// And finally test it again with Zero, which returns faster
				vector = Zero;
				PerformanceTester.Profile10MilionTimes("Vector.Normalize Zero",
					delegate
					{
						vector = Normalize(testVector1);
					});
				Assert.Equal(vector, Normalize(testVector1));

				// And finally test it again with Zero, which returns faster
				PerformanceTester.Profile10MilionTimes("Static Vector.Normalize Zero",
					delegate
					{
						Vector zeroVector = Zero;
						Vector.Normalize(ref zeroVector);
					});
			}
Offline Benjamin  
#19 Posted : Tuesday, March 13, 2012 8:48:52 AM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Btw: I also created a feature request to add more ref calls to the BoundingBox and BoundingSphere classes (they have none yet) and also ref calls to the underlying data structures they use (if it makes sense).
Offline saviilsy  
#20 Posted : Tuesday, March 13, 2012 9:00:09 AM(UTC)
saviilsy

Joined: 8/24/2011(UTC)
Posts: 95

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
You are absolutely right, I must keep in mind that other people might well use this, so clean API is more preferred than 2 nano seconds in the long run - I DON'T MAKE THESE THINGS JUST FOR ME :)

I won't add anything drastic, and I try to make the scenegraph api more DE like/easy than extra efficient that no-one will ever use because it's awkward.

At the moment I miss friend classes from C++ :( I try to hide stuff the user to make clean api but this is hard. I will just have to make changes to overall api to achieve this.
Good example is that I must make Parent{ Set; } public - it will break everything if user decides to change node's parent for some reason. I must make events that the underlying model will react to this change or something.

I thought about just forgetting about model stuff and separate group nodes and the actual renderable nodes but that would be bad too : If I have a hand model which itself is a mesh, but it will have finger meshes as it's child nodes, so it would require to subclass or implement two different interfaces or subclass group node and add render method to that. With model's approach is far easier : just crate the hand mesh, add model that is fastest/best suitable for finger nodes and add fingers to that one. No need to subclass anything.

The model approach is however far harder to design, but it will ultimately be the most customizable solution there is. You can for example have a normal oct tree based model that describes the outdoor world and use portals and mix something like bsp model in indoor world.
Offline saviilsy  
#21 Posted : Sunday, March 18, 2012 5:43:35 PM(UTC)
saviilsy

Joined: 8/24/2011(UTC)
Posts: 95

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
I'm now doing last bits before pushing the new version changes to my fork of the DE.

DE team note : DO NOT MERGE YET TO THE NIGHTLY, I DO NOT CONSIDER THIS STABLE YET, NEED MORE TESTS.
I'll do pull request when I think it is ready.

Currently I have just done one model (indexed). When this is more stable, I will include a oct tree model before doing the pull request to nightly branch.
Tests work (the de logo test), I added some things to make it more complex (such as demo of controllers via delegates, controller object, multithreaded update and basic usage of models).

Changes I made to DE :
+ Added IsInsideViewFrustum to BaseCamera
+ Added Extract and Construct to BoundingBox

So just pull the branch and run the scenenode tests and see the code.

THIS CODE WILL BREAK ALL THE CODE USING THE OLD SCENEGRAPH. The changes are not that big but it will not compile out of the box with old projects, please see the test codes.

I'll update to this thread when one call pull the branch to test it : Ready as of now (please be gentle ;).

Edit 1 :
Oh yea, the camera node don't work yet, have to create quaternion to euler transformation first to DE datatypes so I can update the camera.
Edit 2 :
Just a thought : I did not modify the monodevelop project so USE VSEXPRESS ONE until further notice.

Edited by user Sunday, March 18, 2012 6:03:01 PM(UTC)  | Reason: Not specified

Offline Benjamin  
#22 Posted : Monday, March 19, 2012 2:30:39 AM(UTC)
Benjamin

Medals: Admin

Joined: 8/20/2011(UTC)
Posts: 1,421
Location: Hannover

Thanks: 18 times
Was thanked: 97 time(s) in 92 post(s)
Wow, that is a huge commit in your Fork. Good stuff, compiles and works (please notice your text files did not check in because of the .hgignore settings, you can still force them to check in in your fork). Don't worry about the merge, it is planed for the v0.9.5 release, which is in 2-3 weeks and obviously it will only be merged if it works and is useful ^^

Since Kirsten and me are also participating in a book (called Game Tool Gems) and writing about 3D Format Conversions (FBX, Collada) in the next 4 weeks we will also do some 3D Model stuff (modeling and trying to import and use them via the Delta Engine) in that time. Obviously your Scene Graph code will be useful for some advanced tests (lots of balls ^^) if we get to it.

BTW: The content for the Delta.Rendering.SceneGraphTests project is a bit messed up. I tried to fix it, but only ran into more trouble. If you still have good local content, you probably won't notice, but other users might experience missing InputSettings, etc. I have written down a bug for myself. Good that I catched this on such a simple project (it has no content on its own, just fallback content from the Engine project) since other users have reported this for much more complex projects and I could not reproduce the issues yet.

Also your SceneGraphTests.BasicMeshSceneNode test seems to crash after a while when pressing A, W, S a few times (but you probably know this):
Code:

06.642 Warning: 	Inner Exception for the next Error: Delta.Utilities.Assert+AssertException: The value was not 'true' as expected
	C:\code\DeltaEngine\Utilities\Assert.cs(343,1): at Delta.Utilities.Assert.True(Boolean expectedTrueValue)
	C:\code\DeltaEngine\Rendering\SceneGraphTests\SceneGraphTests.cs(137,1): at Delta.Rendering.SceneGraphTests.SceneGraphTests.<>c__DisplayClassf.
Offline saviilsy  
#23 Posted : Monday, March 19, 2012 8:41:34 AM(UTC)
saviilsy

Joined: 8/24/2011(UTC)
Posts: 95

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: Benjamin Nitschke (DeltaEngine) Go to Quoted Post
Wow, that is a huge commit in your Fork. Good stuff, compiles and works (please notice your text files did not check in because of the .hgignore settings, you can still force them to check in in your fork). Don't worry about the merge, it is planed for the v0.9.5 release, which is in 2-3 weeks and obviously it will only be merged if it works and is useful ^^


Ah ok, I gotta check the force settings on tortoisehg, thanks for the info tho :)

Benjamin Nitschke (DeltaEngine) wrote:

Since Kirsten and me are also participating in a book (called Game Tool Gems) and writing about 3D Format Conversions (FBX, Collada) in the next 4 weeks we will also do some 3D Model stuff (modeling and trying to import and use them via the Delta Engine) in that time. Obviously your Scene Graph code will be useful for some advanced tests (lots of balls ^^) if we get to it.


Hope my code helps :)

Benjamin Nitschke (DeltaEngine) wrote:

BTW: The content for the Delta.Rendering.SceneGraphTests project is a bit messed up. I tried to fix it, but only ran into more trouble. If you still have good local content, you probably won't notice, but other users might experience missing InputSettings, etc. I have written down a bug for myself. Good that I catched this on such a simple project (it has no content on its own, just fallback content from the Engine project) since other users have reported this for much more complex projects and I could not reproduce the issues yet.


Ok I haven't noticed this, I can check tho, but the only thing I changed on the tests project was that I put it as a startup project when testing. After the testing I put the blocks beck as a startup project.

Benjamin Nitschke (DeltaEngine) wrote:

Also your SceneGraphTests.BasicMeshSceneNode test seems to crash after a while when pressing A, W, S a few times (but you probably know this):
Code:

06.642 Warning: 	Inner Exception for the next Error: Delta.Utilities.Assert+AssertException: The value was not 'true' as expected
	C:\code\DeltaEngine\Utilities\Assert.cs(343,1): at Delta.Utilities.Assert.True(Boolean expectedTrueValue)
	C:\code\DeltaEngine\Rendering\SceneGraphTests\SceneGraphTests.cs(137,1): at Delta.Rendering.SceneGraphTests.SceneGraphTests.<>c__DisplayClassf.


This actually is a stupid testcase on my end. I hide one scenegraph node behind camera to test the culling with rendered node count and if You move the camera with the keys the hidden node will become visible and the node count assert will fail. I'll change this (basically no need to assert/test the node count) what so ever... Maybe do a test for IsInsideView or similar.
Offline saviilsy  
#24 Posted : Tuesday, March 20, 2012 3:00:36 PM(UTC)
saviilsy

Joined: 8/24/2011(UTC)
Posts: 95

Thanks: 6 times
Was thanked: 2 time(s) in 2 post(s)
Pretty good, seems like 8000 transparent objects are more taxing than the scenegraph which means that it's pretty much done. I will add oct trees, then You all can hack it as You wish and go though the code/comments.

Performance test
Rss Feed  Atom Feed
Users browsing this topic
OceanSpiders 2.0
2 Pages12>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2023, Yet Another Forum.NET
This page was generated in 0.279 seconds.