Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


JorenJoestar

Member Since 28 Sep 2004
Offline Last Active Jul 23 2012 07:26 AM

Topics I've Started

Rendering design thoughts

08 February 2010 - 10:59 PM

Hello guys, I'm here to share some thoughts about rendering design! This is a really wide topic, with many different way of doing it, but rather I want to try and explore some concepts that are not known to me. Maybe you will find something interesting here! N.B. This can be considered a sort of brainstorming that I want to share! The key ideas behind the will to redesign my renderer is that, even if it is successufull from a shader management point of view (the effects are easy to implement, using cg) it lacks multithreading and scene management, even if there is some sort of culling. This is a list of keys: - Multithreading - Multiplatform (API-independent) - Data oriented - Flexible but fast The first thoughts is about multithreading, and I found in Command Buffers (as read in Emergent paper (Practical Parallel Rendering with DirectX 9 and 10, and also post on RealtimeCollisionDetection blog, or http://c0de517e.blogspot.com/2009/03/my-little-rendering-engine.html) and other really a good way of handling multithreading. The big question is : at which abstraction level is good to create commands? Gamebryo solution is to create a command recorder, that is a modified direct3ddevice, but I don't think it is the only solution. I think that it can be good also to provide many abstract-low level methods in your renderer, and then use them to provide API-indipendent rendering multi-threading. So basically design your "render device" with many low level methods that can be called as commands. Commands cannot create or destroy resources, but only set resources as current and draw. Going up in abstraction, there must me someone that submit commands (multiple queues per thread, then merged can be a solution). Who is responsible of submitting commands? The one who knows about informations to be sent. Another GREAT question: what informations can be submitted? And what relationship is between commands and those informations? How can you access them? This part is rather tricky for me. Emergent create the command buffer that really duplicates calls to direct3ddevice, so basically the command contains the stack of all the parameters to be sent to the real call. Other way of doing this is to create internal pool and use indexes (the ID???) inside these. (More post to follow...) [Edited by - JorenJoestar on February 9, 2010 5:15:59 AM]

Skinning import problems

24 January 2010 - 08:08 AM

Hi guys! Finally I moved to add skinning to my engine...but I have a really simple question for you! I create a skeleton structure based on quaternions for rotations, and I choose FBX to be my import file...and SURPRISE! I cannot find any documentations useful to understand how to import skeleton informations correctly! Actually I'm using humanoid.fbx as source, because it contains everything I need to create a basic animation system. BUT when importing it, I found the skeleton correctly...and then? How can I find informations about translations and rotations? I found the methods GetDefaultT GetDefaultR really useful, but if I try to use the raw informations from the current node, they are all messed up! the solution i found is in a method contained in one of the examples: KFbxXMatrix GetGlobalDefaultPosition(KFbxNode* pNode) { KFbxXMatrix lLocalPosition; KFbxXMatrix lGlobalPosition; KFbxXMatrix lParentGlobalPosition; KFbxVector4 lT, lR, lS; lLocalPosition.SetT(pNode->GetDefaultT(lT)); lLocalPosition.SetR(pNode->GetDefaultR(lR)); lLocalPosition.SetS(pNode->GetDefaultS(lS)); if (pNode->GetParent()) { lParentGlobalPosition = GetGlobalDefaultPosition(pNode->GetParent()); lGlobalPosition = lParentGlobalPosition * lLocalPosition; } else { lGlobalPosition = lLocalPosition; } return lGlobalPosition; } this correctly gives me informations about the translations and rotations...but they are ABSOLUTE, not RELATIVE TO THE PARENT! I'm stucked...and it is strange, I cannot found many resources around the web... Thanks guys! P.S. Do you suggest me to change from FBX to Collada? I want an intermediate format EASY to import, that later can be converted in an engine format I like. Thanks again!!!

Cross-Platform Engine Development

08 January 2010 - 11:41 PM

Hi guys, reading "Cross-Platform Graphics Engine Development" slides of the microsoft gamefest, I came along with some interesting things about INHERITANCE. After all, coding for speed, there is a need to avoid virtual methods calls during loops. Really simple question: how do you handle different classes that needs platform and api specific behaviours? Maybe usign a single class (like the Renderer class) and then use conditional macros to add api-specific code and variables and methods implementations? Or another solution could be creating a base class (WITHOUT virtuals) then forcing the override of methods by just simply calling it with the same name? I know that from a software engineering point of view is terrible, but this give more speed...and I am really interested in different points of view! In my previous engine, the inheritance was the base. Thanks! P.S. I bumped in those two links: http://codefortress.blogspot.com/2009/03/polymorphic-excision.html http://people.csail.mit.edu/rahimi/conditional-interface/ In the first the author claim (if I understand well) that has obtained this behaviour using multiple inheritance...and the second is a good link to multiple inheritance.

Multithreading update

05 January 2010 - 05:23 AM

Hi guys! Finally I decided to move to multithread my framework, so I came up writing from scratch in some parts. After some reading around the web, I finally came up with a solution (really simple) that involves a scheduler, tasks and worker threads. My framework has PC as target (for a small game). Then problems began...the first one is: how can I handle the different updates coming from AI, physics to graphics? I mean...reading about the Smoke framework, there is a state manager that distributes changes among systems. I don't feel very comfortable about that solution. I also read this article: http://www.gamedev.net/community/forums/topic.asp?topic_id=525951 and found the update phase still open to questions. I've tried to think also of something like a producer/consumer pattern between systems, but I cannot find a suitable solution. Maybe a small queue (4 elements) of positions and rotations and every system use the last one? I'm really interested in hearing other voices, as always, THANKS ANYBODY!

Fast Delegates

18 December 2009 - 03:34 AM

Hi guys, searching for function pointers in C++ I bumped in different topics around, and I found many people talking about "fast delegates" to be used with pointers to member functions (ehm...methods)! I have seen the main implementation here: http://www.codeproject.com/KB/cpp/FastDelegate.aspx then I bumped onto those new one: http://www.codeproject.com/KB/cpp/ImpossiblyFastCppDelegate.aspx http://www.codeproject.com/KB/cpp/fd.aspx In the last the author claim that it is the fastes and c++ compliant also with not-so-much-new-compilers. Are you using one of this fast delegates? Currently I want to use them to overwhelm some branching here and there: the profiling is really good with pointer-to-member-functions, faster than code with if (A) doB(); else doC(); Thanks!

PARTNERS