Jump to content
  • Advertisement

paic

Member
  • Content Count

    934
  • Joined

  • Last visited

Community Reputation

645 Good

About paic

  • Rank
    Advanced Member
  1. I had totally forgotten about this entry in Ysaneya's journal ! (his journal's in my bookmarks :p) thanks for reminding ! That will be of great help for the next part of my implementation. But for the moment, I'm mostly interested in rain fall. Any suggestion / idea ?
  2. Hi ! I'm currently doing some researches on rain effects in realtime. I've found a paper which contains basically everything what I need (more than what I need in fact) here : http://developer.amd.com/media/gpu_assets/Tatarchuk-Rain.pdf I'm only interested in the precipitation and windchield effects. I don't need all the other stuff presented in the paper (lightning, puddles and dropplets, glow & mist and wet reflections) The problem is that the paper is a bit vague on implementation, and I'd like to have a better idea of the algorithms before trying to implement them. So, if anyone has read this paper in the past, or has done a similar rain effect, I would greatly appreciate any help the part concerning the rainfall. It starts at page 26. What I don't really understand is how the rain is animated : is it through an animated texture (which is tiled and deformed to take into account the rain direction, strength, and the parallax) ?? Or is it only through the parameters ? And I also have a little trouble understanding how it handles the multiple layers of rain. Well, I know I'm being a bit vague myself, but I have trouble understanding such papers (I prefer more academic style papers with lots of details, etc :p) so feel free to leave a comment (any links to other techniques / papers, threads speaking about rain, explanations about the Tatarchuk paper, etc. :p) Thx in advance.
  3. Hi there ! (and happy new year :p) I have trouble using NVPerfHUD recently. Here is my "setup" : Win7 32 bits, the project is in managed C++ (with /clr) and using a pure C++ .lib. In the project, I create a form, in this form I add a panel which I use to create my D3D device, and render. My graphic card is a GTX 285 and I use the 195.62 NVidia drivers. I've been working on this project for quite a long time, and been using NVPerfHUD from the beginning. But recently I started to have troubles. First, a few months ago, the NVidia drivers were causing a bug and making NVPerfHUD to crash. And then, each time I tries to use it, I have an exception with this message : Consultez la fin de ce message pour plus de détails sur l'appel du débogage juste-à-temps (JIT) à la place de cette boîte de dialogue. ************** Texte de l'exception ************** System.InvalidOperationException: Échec de l'inscription DragDrop. ---> System.Threading.ThreadStateException: Le thread actuel doit être en mode STA (Single Thread Apartment) avant que des appels OLE puissent être effectués. Assurez-vous que votre fonction Main est marquée comme STAThreadAttribute. à System.Windows.Forms.Control.SetAcceptDrops(Boolean accept) --- Fin de la trace de la pile d'exception interne --- à System.Windows.Forms.Control.SetAcceptDrops(Boolean accept) à System.Windows.Forms.Control.OnHandleCreated(EventArgs e) à System.Windows.Forms.Control.WmCreate(Message& m) à System.Windows.Forms.Control.WndProc(Message& m) à WeifenLuo.WinFormsUI.Docking.DockPaneStripBase.WndProc(Message& m) à System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) à System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) ************** Assemblys chargés ************** mscorlib Version de l'assembly : 2.0.0.0 Version Win32 : 2.0.50727.3603 (GDR.050727-3600) CodeBase : file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll ---------------------------------------- AMEditor - Release - NVPerfHUD Version de l'assembly : 1.0.3658.21178 Version Win32 : CodeBase : file:///D:/SVN/DEV/AMEngine/AMEditor/bin/AMEditor%20-%20Release%20-%20NVPerfHUD.exe ---------------------------------------- msvcm90 Version de l'assembly : 9.0.30729.4148 Version Win32 : 9.00.30729.4148 CodeBase : file:///C:/WINDOWS/WinSxS/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.4148_x-ww_d495ac4e/msvcm90.dll ---------------------------------------- System.Windows.Forms Version de l'assembly : 2.0.0.0 Version Win32 : 2.0.50727.3053 (netfxsp.050727-3000) CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll ---------------------------------------- System Version de l'assembly : 2.0.0.0 Version Win32 : 2.0.50727.3053 (netfxsp.050727-3000) CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll ---------------------------------------- System.Drawing Version de l'assembly : 2.0.0.0 Version Win32 : 2.0.50727.3053 (netfxsp.050727-3000) CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll ---------------------------------------- IToolPanel Version de l'assembly : 1.0.0.0 Version Win32 : 1.0.0.0 CodeBase : file:///D:/SVN/DEV/AMEngine/AMEditor/bin/IToolPanel.DLL ---------------------------------------- WeifenLuo.WinFormsUI.Docking Version de l'assembly : 2.3.1.26519 Version Win32 : 2.3.1.0 CodeBase : file:///D:/SVN/DEV/AMEngine/AMEditor/bin/WeifenLuo.WinFormsUI.Docking.DLL ---------------------------------------- System.Xml Version de l'assembly : 2.0.0.0 Version Win32 : 2.0.50727.3082 (QFE.050727-3000) CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll ---------------------------------------- System.Windows.Forms.resources Version de l'assembly : 2.0.0.0 Version Win32 : 2.0.50727.3053 (netfxsp.050727-3000) CodeBase : file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_fr_b77a5c561934e089/System.Windows.Forms.resources.dll ---------------------------------------- ZedGraph Version de l'assembly : 5.1.2.878 Version Win32 : 5.1.2.878 CodeBase : file:///D:/SVN/DEV/AMEngine/AMEditor/bin/ZedGraph.DLL ---------------------------------------- mscorlib.resources Version de l'assembly : 2.0.0.0 Version Win32 : 2.0.50727.3603 (GDR.050727-3600) CodeBase : file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll ---------------------------------------- ************** Débogage JIT ************** Pour activer le débogage juste-à-temps (JIT), le fichier de configuration pour cette application ou cet ordinateur (machine.config) doit avoir la valeur jitDebugging définie dans la section system.windows.forms. L'application doit également être compilée avec le débogage activé. Par exemple : <configuration> <system.windows.forms jitDebugging="true" /> </configuration> Lorsque le débogage juste-à-temps est activé, les exceptions non gérées seront envoyées au débogueur JIT inscrit sur l'ordinateur plutôt que d'être gérées par cette boîte de dialogue. (sorry for the french message ... hope there are some infos you might use ...) Basically, it says that if failed registering for DragAndDrop ... and I should mark my main function with [STAThread]. But it's already the case. The NVPerfHUD samples works fine (whereas with the driver problem they weren't) and the problem also occurs on WinXP. So, is there any known problem with using NVPerfHUD on C++/CLR projects ? Any idea on what might cause this exception ? And a solution to correct it ? Thx in advance for any help. Edit: ok, a quick edit to say that I was using the latest NVPerfHUD (6.6) and as I didn't know what to do, I tried earlier versions ... it works fine with 6.1. I'm trying 6.5 now ... Edit2: works with 6.51. So that's probably a bug with 6.6 ... I hope it will be corrected in the next release. [Edited by - paic on January 6, 2010 9:58:47 AM]
  4. Sorry, but virtual textures and clipmaps are absolutely not the same :) A clipmaps can be described as a sort of "small window" (the part visible on screen, stored as a texture used by the renderer) on a very big texture (the one stored on the hard drive, or compressed in memory) And the update of the "window" is done incrementally as it shifts position. That's the whole point of the algorithm : for smooth movements, it's perfect since you only need to update a very small portion of the texture each frame. But obviously it's not good when it comes to "teleportation" since you then need to update the whole window. Whereas a virtual texture is more like a very big texture atlas, regrouping all the texture of the scene. You basically render your scene twice : the first one to determine which parts of the virtual texture you will need, then the result is analysed by the CPU. That's where you decide to page in or out parts of the VT. And then you render the scene a second time using the pages (and a little shader to convert the texture coordinates into page textures coordinates, of course :)) But it suffers from the same problem than the clipmaps : when jumping between 2 points very far away, you end up updating the whole pages, and that's not good for performances. So, to sum up : Virtual Textures (good) : - can be used for everything (terrain, static geometry) - can have an area of the terrain with very high resolution and the rest with "standard resolution", or good resolution everywhere, you decide exactly where to put the details. Virtual Textures (bad) : - jumps result in a little "freeze" (needs to update the whole pages) - render the terrain twice (a little less efficient than clipmaps) Clipmaps (good) : - very (very) efficient and easy to implement Clipmaps (bad) : - jumps result in a freeze (need to update the whole clipmaps) - can only be used for terrain Disclaimer : I've only worked with clipmaps / geometry clipmaps. I know quite a bit about VTs because I'm thinking of implementing it and read a lot about it, but I might have said a few mistake (though I hope not :p) And for the "jump" problems, I don't think it's a real problem : since you "jump", the user wont mind waiting 20ms instead of 1ms :) And you also can avoid this problem with mipmaping.
  5. Hi ! I've got a little question : I have a 3 dimensional point (in the world space) and I'd like to compute its depth (between 0 and 1 if I'm not mistaken) And I also would like to have a confirmation : when using D3DXVec3UnProject, the 2 first values (x and y) of the input vector are the x and y coordinate in screenspace, and the z value is the desired depth ? To be a little more precise, what I want to do is : I have a "screen space" 2D point, and a "world space" 3D point. Imagine a plane containing the 3D point and parallel to the camera. I want to project the 2D point onto that plane and get the coordinates :) So I thought : get the depth of the 3D point, create a vector with the 2D point and the previously computed depth, and unproject. But it doesn't seem to work ... Any idea ? PS: If you don't understand what I asked, don't hesitate to say it, english is not my mother language, so I know I might be confusing sometimes :)
  6. Yes, exactly. And that is the cause of my problem, and I'm looking for a way to have the setter of Foo.Vec being called :) For the moment, I'm managing a delegate called ValueChanged in my Vector2 class, and I connect it to the Foo.Vec setter. But I'm wondering if there is a better (automatic) way of doing this.
  7. Nobody ever had this kind of case ? I can't believe it ! Or I am missing an obvious solution ? So obvious that nobody will bother telling me ? Or maybe there simply is no easy solution to my problem ? In any case, can you tell me ? If there's no solution except using delegate, then fine, at least I'll stop wondering if there is a simpler method :) Thx !
  8. Hi, I've got a little question about nested properties. Let's assume I have the following stuff : [TypeConverter(typeof(ExpandableObjectConverter))] public class Vector2 { [NotifyParentProperty(true)] public float X; [NotifyParentProperty(true)] public float Y; public override string ToString() { /* returns x and y in a formated string */ } } public class Foo { private Vector2 m_Vec; public Vector2 Vec { set { /* a break point here */ m_Vec = value; } get { return m_Vec; } } } Then when I display an instance of Foo in a property grid, The Vec property shows correctly, I can expand to see both X and Y properties. When I change X or Y, the Vec property is correctly updated in the property grid, but the set method of Vec is never called. Is there a simple way to make the set method be called whenever a nested property is changed ? Or should I use delegates ? [Edited by - paic on September 9, 2009 8:45:49 AM]
  9. Thanks a lot cignox1 !! That's exactly the kind of things I was looking for !!! I don't even have to make my factory global anymore, nore having a register method ! I like voodoo magic stuff like that, it makes my life so much easier :D Well, the only drawback is that I have to use the class' names as ids instead of a nice human readable string, but that's worth the befefit. Thx again !
  10. Quote:Original post by Ron AF Greve Hi, As far as I can see you still need one line for initialization somewhere. Only in one case you do it in the factory class itself and the other you call the factory class externally. The difference in the method I wrote is that once your factory is written, you can add as many new types as you want without editing it ever again ! The line you need to add to register the new type is present in the type .cpp file. So, imagine you're adding a new type of action to an editor, you absolutely don't have to care about updating the factory. You only focus on creating your stuff, and add the registration line at the top of the .cpp file, add it to the project, done. I know it's not a very big deal, but I will have 100s of types added while the functionalities of the editor I'm working on are added, and if I can avoid having the Factory code clutered by #include's and ->Register lines, that would be great :) @cignox1 : I will look at it. I'm quite new to .NET stuff, so I don't know all the ways of doing things :)
  11. Hi, Sorry if the title is not really clear, I couldn't find a good one for my problem :) Here is what I have : - I have a global object factory (be it a singleton, a global, a static variable, whatever) This factory register a string with a function pointer which points to a fonction creating the object described by the string. - I have a lot of object of different types to register. I could register them by hand in the object factory, simply #include'ing all the objects headers, and writing stuff like : this->Register("foo", &foo::Create); this->Register("bar", &bar::Create); // etc. But on top of having a lot of #include's, each time I want to add a new object type, I need to edit the object factory. So, is there any way to sort of automate this process ? For example, a few years back, I've found this implementation : // in foo.cpp namespace { // I don't remember if it was const bool or bool only, but that's the idea. const bool registered = Factory::Instance()->Register("foo", &foo::Create); } This way, for each new object type, you simply have to provide the .h and the .cpp with this little line, and you never have to touch the factory. Unfortunately, it doesn't work in my project because I'm using managed C++ (with winforms) and registered is not initialized until actually used. So, my actual questions : what are the other possibilities to achieve this kind of automatic registration ??
  12. Hi, first, thx for the replies. But I think I know now why it doesn't work. And it's related to the way the designer works. From what I understand, when designing a form / component / etc. the designer obviously can't instanciate the class we're designing. So what it does is create an instance of the parent class. Of course, if the parent class is not instanciable (containing pure virtual methods or something else) the designer will fail and report an error. But in my case, the class can be instanciated as is. What happens here is that my parent class is in the project as plain .cpp / .h files. And the designer can't instanciate code that wasn't compiled ! That's why it works when I compile my parent class in a separate .dll, and then add it as a reference into my project. Only then can the designer execute the code for my parent class and instanciate it. That sucks, but that's how the designer works :(
  13. Hi ! First of all, this problem happens with Visual C++. So I don't really know if it applies to C# or VB. So, my problem is the following : I have a class which inherits from System::Windows::Forms::Form and implement a few methods. Let's call it IToolPanel. Then, in my program, each time I want to create a new form, instead of inheriting from System::Windows::Forms::Form, I make it inherit from my IToolPanel class. Problem is, when I do that, the designer refuses to launch. Why ? Because apparently, the designer can't load the IToolPanel class ... The project compiles and execute perfectly fine, the header of IToolPanel is correctly included, but the designer can't load it. If I want it to work, I need to create another project, put IToolPanel into it, and then, in my previous project, add a reference to IToolPanel's dll. Then and only then the designer is happy. ... this is really frustrating. Why can't it load a class when it's on the same project, and can when it's part of another .dll or .exe and loaded as a reference ??? Is there a more convenient way to make the designer work ? Is this a known bug or a limitation of the designer ?? Thx in advance for any help
  14. Well, no one came saying this is the most ridiculous idea they ever heard, so I guess I will try this approach :) I hesitated mainly because of the transformation of vertices : to draw everything in one DIP, I need to transform each vertices before copying them. I hope it won't cost too much CPU :) Thx ! (and if anyone has another approach to this problem ... feel free to share :)
  15. Hi, I'd like to know if any of you have experience in this kind of problem : I have a lot (from 100s to 1000s) of small objects (from 4 to a few 10s of triangles) to display. The list can change from frame to frame, so I can't really create a big static mesh. How do most engines deal with those kind of small props ? I thought I could create a bunch of dynamic buffers, and just before rendering I would parse the list of objects to render, and batch all the small ones into the big buffers. But that would mean a lot of locking / copying (and transforming the vertices) / unlocking ... so I'm not sure it would be very usefull ... Any idea ?
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!