Jump to content

ParaToxic

Members
  • Posts

    425
  • Joined

  • Last visited

Everything posted by ParaToxic

  1. Thanks I have to look for this SSGI shader here.I saw in the shaders.pak file that there is a file ssao_gi.frag. I deleted ssao and renamed it to ssao.frag. The colors shine very beautiful but the FPS is very low.... EDIT: Well I can't find any article with the shader here in the forum, maybe you can give me a link ??
  2. Hey ya I' wondering if there is a way to do GI on some objects in LE ?? I know that LE just support local lighting, but is there a way to do it the global way ?? I need some rooms, where I need object, which emit light from reflecting.Maybe there is a wa to do that precanculated. Or even when it must be realtime ( because you don't want to precanculate the whole room and it's object -> Leveldesign not possible in this room from the outside ) it works similar like SSAO or not ? Thanks for answers
  3. I have the problem now.The problem is that if you create a local variable in a function, first the entered template points to it.But when I try to call the Update or Output function of the class in a other function it points to a not existing variable----> bad output. Now I can fix that or let it ,because I wan't to display only memebr variables of a class
  4. Sorry for tripplepost but now I think I have the problem. When I create a new instance of the VariableManager class in the IConsole Initialize function , add in the same function a variable and call the output function everything works fine, but when I call the output function in a other function like Update, I become this bad values back. Can you imagine why this is so ??
  5. Ahh it works now.I have a extern class now and implements it in my console class.I don't know why it didn't work but not it does.
  6. But the exmaple at the bottom works fine, no problems.I can't understand why the other doesn't work.It is exactly the same, just that the main projekt is a win32 project. Hmmmm I can't understant that. At my first test I tried to use an other file with this classes and implement them to my console class, but I became 2 linker errors, that the class std::basic_string(....) is allready defined in the Variable class ( look at the second example ). Now I have the stuff direct in my console class. EDIT: I tested it with winmain and it works fine.I realy don't know where the problem is.....
  7. It's ready now, about 1 minute to create the game and now 15 minutes to burn it, bad technologie .....
  8. We need some programms to create Games and models. MagicGames API: Game* m = new Game("Sniper Elite V3"); m->Graphics("Super Turbo Extended"); m->Player("Best Character on the world"); m->Start(); Thats it.Is somebody interested on this projekt ???
  9. I looked at that.Add at some lines MessageBoxA.... but I have everywhere this value ( it starts at the printTo function ) Here is the code from the easy project and it is the same and works fine :/ #include <boost/lexical_cast.hpp> #include <boost/shared_ptr.hpp> #include <iostream> #include <sstream> #include <string> #include <map> #include <stdlib.h> class Variable { public: virtual void printTo(std::string& out) const = 0; }; template <typename T> class VariableImpl : public Variable { public: explicit VariableImpl(T* managed = NULL) : m_managed(managed) {} void setManaged(T* managed) { m_managed = managed; } virtual void printTo(std::string& out) const { std::stringstream ss; ss << *m_managed; out = ss.str(); } private: T* m_managed; }; template <typename T> boost::shared_ptr<Variable> make_variable(T const& var) { return boost::shared_ptr<Variable>(new VariableImpl<T const> (&var)); } class VariableManager { public: template <typename T> void addVariable(std::string name, T const& v) { m_variables[name] = make_variable(v); } std::string Out() { std::string out; for(std::map<std::string, boost::shared_ptr<Variable> >::const_iterator it = this->m_variables.begin(); it != this->m_variables.end(); ++it) { std::stringstream ss; std::string st; it->second->printTo(st); ss << (it->first) << " = " << st << std::endl; out = ss.str(); } return out; } private: std::map<std::string, boost::shared_ptr<Variable> > m_variables; }; int main() { VariableManager a; int i = 54; a.addVariable("i",i); std::string b; b = a.Out(); std::cout << a.Out(); getchar(); }
  10. Hey guy's I have a problem with a part of my new debuging console.The idea is to make a console with a listbox, where you can insert variables and the name, which were shown in the console. Something like: IConsole* console = new Console(); console->Initialize(); int b = 65; console->AddItem("b",B); console->Draw(); b = 45656; console->Draw(); // The console shows 45656 now In a second little projekt in VS I have the same as a little program to test, there it work's fine but here I get a value of -8445360 ( not a random undefined nummber, because it's allways the same ). I don't know, maybe someone can help me with that: #ifndef ICONSOLE_H_ #define ICONSOLE_H_ #pragma once #include <windows.h> #include <iostream> #include <string> #include <sstream> #include <map> #include "IComponent.h" #include "GlobalDefine.h" #include <boost/lexical_cast.hpp> #include <boost/shared_ptr.hpp> #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' "\ "version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") LRESULT CALLBACK IConsole_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); //-------------------------------------------------------------------------------// class IVariable { public: virtual void printTo(std::string& out) const = 0; }; template <typename T> class VariableImpl : public IVariable { public: explicit VariableImpl(T* managed = NULL) : m_managed(managed) {} void setManaged(T* managed) { m_managed = managed; } virtual void printTo(std::string& out) const { std::stringstream ss; ss << *m_managed; out = ss.str(); } private: T* m_managed; }; template <typename T> boost::shared_ptr<IVariable> make_variable(T const& var) { return boost::shared_ptr<IVariable>(new VariableImpl<T const> (&var)); } //--------------------------------------------------------------------------------------// class IConsole : public IComponent { public: IConsole(void); ~IConsole(void); void Update(); IResult Initialize(); IResult Terminate(); void Test() { MessageBoxA(0,"Hallo",0,0); } //--------------------------------------------------------// template <typename T> void AddItem(std::string name, T const& v) { m_variables[name] = make_variable(v); _listItems++; } //--------------------------------------------------------// private: //-------------Windows---------// HWND _consoleWindow; HWND _listWindow; MSG msg; int _listItems; void UpdateList(std::string content); void DeleteList(int items); //-----------------------------// //-----------------------------// std::map<std::string, boost::shared_ptr<IVariable> > m_variables; //-----------------------------// void Create() { MessageBoxA(0,"Created",0,0);} }; #endif #include "IConsole.h" IConsole::IConsole() { } IConsole::~IConsole() { } IResult IConsole::Initialize() { HINSTANCE hinst = GetModuleHandle(NULL); WNDCLASS wndclass; wndclass.style = CS_HREDRAW | CS_VREDRAW; wndclass.lpfnWndProc = IConsole_WndProc; wndclass.cbClsExtra = 0; wndclass.cbWndExtra = 0; wndclass.hInstance = hinst; wndclass.hIcon = LoadIcon(NULL, IDI_APPLICATION); wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); wndclass.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wndclass.lpszMenuName = NULL; wndclass.lpszClassName = TEXT("Console"); if (!RegisterClass(&wndclass)) { return IRESULT_ERROR; } //------------------------Erstelle Fenster-------------------// _consoleWindow = CreateWindow(TEXT("Console"), TEXT("Console"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 500, 400, NULL, NULL, hinst, NULL); if(!_consoleWindow) return IRESULT_ERROR; ShowWindow(_consoleWindow,SW_SHOWNORMAL); UpdateWindow(_consoleWindow); //------------------------Erstelle Listbox---------------------// // Die Größe der Listbox wird an die größe des Konsolenfensters angepasst // , da sich dieses nicht in der Größe verändert und eine dynamische // Umformung nicht notwendig ist // IConsole::_listWindow = CreateWindow(TEXT("LISTBOX"), TEXT("Console"), WS_CHILD | WS_VISIBLE| WS_BORDER | LBS_DISABLENOSCROLL | WS_VSCROLL , 0, 0, 484, 365, _consoleWindow, NULL, hinst, NULL); _listItems = 0; return IRESULT_OK; } IResult IConsole::Terminate() { return IRESULT_OK; } void IConsole::Update() { DeleteList(_listItems); for(std::map<std::string, boost::shared_ptr<IVariable> >::const_iterator it = this->m_variables.begin(); it != this->m_variables.end(); ++it) { std::stringstream ss; std::string st; it->second->printTo(st); MessageBoxA(0,st.c_str(),0,0); ss << (it->first) << " = " << st << std::endl; UpdateList(ss.str()); } if(GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } } void IConsole::UpdateList(std::string content) { SendMessage(_listWindow, LB_ADDSTRING,0,(LPARAM)content.c_str()); } void IConsole::DeleteList(int items) { for(int i = items; i > 0; i--) { SendMessage(_listWindow,LB_DELETESTRING,(WPARAM)i,NULL); } } LRESULT CALLBACK IConsole_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch (msg) { case WM_CREATE: case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hwnd, msg, wParam, lParam); } return 0; } Thanks for advance
  11. Hmm I don't know if you can compare that.Look the mainpart of gameprogramming or gameart is it to use techniques ( that you have learned for years ) to make your stuff, the learning of a programming language or the tools of a modelling programm isn't that difficult. That is my problem.I know the tools of C4D and can do some easy stuff, but the technique for advanced things aren't available. I will look at that blender stuff and try it , but for now the dexsoft techtrooper is okey ( and it takes me a lot of time to make all the game systems to continue with the modeling )
  12. Thanks for the answers guy's.I will look at the blender DVD and give it a try ( and learn a little bit Blender I bought this guy here yesterday.From the story of my game, it would be the perfect enemy, but for test I have t o use it as the main character
  13. Yes that is a good idea.I think I will do that for testings, but I have to make one by myself ( I could use the same skeleton like FPSC, just change the model ) By the way this character is very nice :http://www.dexsoft-games.com/models/tech_trooper.html
  14. Hey guy's with the appearance of LE3D I have to look for my game and make a character for it.I'm not very good at that stuff and wondering if somebody know's a kind of DVD or a long tutorial, where a game character is created step by step, with modeling and texturing( for modeling only c4d ). Would be nice to hear something from you Thanks for advance
  15. Oh jes sry for the error I will change it in a new version.I have the feeling, that nobody get it worked in their Editor ? Would be cool to hear something about the result, because I can't test it on an other PC
  16. Are you kidding me ???? Thanks so much , have to look to the old whise C++ book..... With static_cast you can take the functions of the baseclass directly : static_cast<IConsole*>(_debugConsole.get())->Test();
  17. Look at that: #ifndef ICOMPONENTMANAGER_H_ #define ICOMPONENTMANAGER_H_ #pragma once #include "engine.h" #include "GlobalDefine.h" #include "IComponent.h" #include "IConsole.h" #include <stdlib.h> #include <map> class IComponentManager { public: IComponentManager(void); ~IComponentManager(void); IResult Initialize(HINSTANCE hinst); IResult Terminate(); void Update(); //--------------Console---------------// template<typename T> inline void Console_LoginVar(std::string const& name, T& ref) { _debugConsole.get()->LoginVar(name,ref); } // That doesn't work because the baseclass hasn't got a function LoginVar, only the IConsole class //------------------------------------// private: ISmartPointer<IComponent> _debugConsole; std::map<std::string,IComponent*> _mainThread; std::map<std::string,IComponent*>::iterator _mainItr; std::map<std::string,std::pair<IComponent*,HANDLE>> _externThread; void LoginMainThread(std::string s,IComponent* comp); void LoginExternThread(std::string s,IComponent* comp); }; #endif
  18. Hei there I have here a little problem with the design of a componentmanager. My idea is it to make a componentmanager, which loads components and add them to a map.Then the component can be login to the mainthread or to a extern thread, which will be created. Now the problem is, that I use Polymorphism to make a baseclass ( here IComponent ) and inherit this from my first component , the IConsole. When I write ISmartPointer<IComponent> _console(new IConsole); I can add that to the map, because I have always this IComponent as baseclass.So I add it to a map,lets say std::map<std::string,IComponent*> _map; Now I have virtual Functions in the IComponent class like Update,Initialize and Terminate. This virtual functions are defined in the component itself. But now the problem is that I wan't to call functions from the IConsole itself.There is for example a function LoginVar(...), but I can't write _console.get()->LoginVar(), because I have IComponent as the baseclass and this class haven't got a virtual function LoginVar..... This is a big problem.I want that I can add the Components to a map ( I think that the best way is to make it with Polymorphim), but also call the specific functions... I hope you can help me Thanks
  19. I added a first version for the framework to the asset store
  20. First that isn't stolen. There is a realy cool guy, I contact him throug e-mail and asked how he has made this lens flare effect in his video.Then he showed me his idea and I made it similar like he. You can't see it on the video very good because of the contrast and the unoptimized values inside the shaders.But now I'm trying to do it better and the result is better than the video.
  21. Hei today I had some time to implement a lens flare effect to the engine. Now it supports Halos, ghost features, chromatic disperation and a lensdirt texture. I uploaded a video, but I have to say, that the contrast is very low and you can't really see the effect ( let's say not so good ). I have a problem to implement it in the framework, because it needs multiple passes : -Downsample + Threshold ( the threshold has to be adjusted for the sky brightness ) -Add the Lens flare features -Blur the Image -Multiply the resulted image with a lensdirt texture like in BF3 used and blend this with the original rendered image---> Finished I know you can pack some steps together , like the 2nd, 3rd step, but then I need to make 3 passes. Maybe somebody can tell me how to add that to the framework... Here is the video: http://www.youtube.com/watch?v=pQb_EAnsp3w I hope you like it
  22. Hmm but how can I do that ? I switched on specular bloom and set the samples of the bloomblurx.frag file higher.But the result isn't realy good.The specular spots glow only a little bit ( very less ) and you can't see the effect. How can I make the specular shine more, but let the other surfaces equal bright ?? ( I mean not to make the bloom shader result brighter or something like that. ) Thanks
  23. Yes shadmar I mean that flares. @Josh: You are right.I was just wondering how to do that Thanks will try to make that
  24. Hey ya , I searched a little bit for this awesome lighteffects, which were used in the most games like the anamorphic lens flare effect.So my question would be, how can it be done ??? My first reflexion was, that the light have to be draws as a bright/bloomy point and then use a horizonal blur filter ( and only a little bit vertical ) to make that.But in LE the light isn't draws as a bright point, only seen by the reflections of other surfaces. So how can I implement that ?? Thanks
  25. But does it works fine in the Editor ?? When yes try to change some settings from the background ( the sky, the backgroundcolor etc. )
×
×
  • Create New...