• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

148 Neutral

About grill8

  • Rank
  1. Thank you for your help. I would love to hear any further input from others. Your help is appreciated. Jeremy
  2. Hello, I have questions about grass and water rendering in a 3D game engine. I am nearing completion of my game engine design but have a few questions. Question 1) Where/how should I find/go about finding information about rendering grass in a 3D game engine. I have found some articles suggesting rendering layers of pixels with only some pixels colored and the others translucent, and many other mixed articles suggesting all sorts of varying approaches. My question is ... what is cutting edge technology for grass rendering and where do I go about finding information on how to implement it. I use DirectX and target DirectX9 and/or DirectX 10. Question 2) I have found some nice water shaders especially ocean.fx which I like a lot, but ultimately I would like to have creeks/rivers/lakes ... even puddles too. It seems that my game engine would need some sort of creak/river editor. If anyone has any shader suggestioins for handling rivers/creeks I would greatly appreciate it. ocean.fx is great but ... well ... naturally ... it seems suitable for oceans and not creeks/rivers as well. So ... my question is ... where can I find information on rendering creeks/rivers? That's it for now. Just finished design of the skydome with atmospheric scattering. Pretty sweet. Thanks for your help. Jeremy
  3. Hello, I am creating a decal system for my game engine and need some input as to the accuracy and suitability of my algorithm. The idea is to define an oriented box in 3-space with a heading vector. Then, calculate all mesh triangles within the box, clipping them (often creating new triangles) to generate a mapping of the geometry within the box. Next, transform those triangles to box space based on heading and orientation. Their u and v texture coordinates can be mapped from that. The algorithm I created for generating the geometry within the box is as follows: Calculate any objects that collide with the box. For each of those objects and for each triangle of those objects, do as follows: 1) Calculate the number of vertices contained within the box 2) If all 3 are inside the box, store the vertices and you are done for now 3) If 2/3 are inside the box ... For each edge of the triangle if both vertices are in the triangle, store them and you are done for that edge else calculate the intersection of the edge segment with the cube and store it Check if any edge segments of the cube intersect with the triangle and add if so 4) If 1/3 are inside the box For each edge of the triangle if both vertices are outside the triangle, do nothing for that edge else calculate the intersection of the edge segment with the cube and store it Check if any edge segments of the cube intersect with the triangle and add if so 5) if 0/3 are inside the box Check if any edge segments of the cube intersect with the triangle and add if so 6) After all vertices are stored, transform them into box space (based on the orientation and heading of the box) and the u and v texture coordinates are trivial to calculate. That is my algorithm. I would appreciate any and all input as to the suitability and accuracy of my algorithm. If anyone knows a simpler/more efficient way to handle this I would greatly appreciate some input. Any and all help is welcome. Thank you for your help. Jeremy
  4. Hello, I have questions about how to do decals (blast marks etc.) in a game engine. Basically I need to have bullet holes, blast marks, blood splatters etc. happen in real time and am having difficulties finding information on the subject on the internet. The decals need to be mapped to more than one triangle/plane etc. for example, wrapped around an arbitrary mesh (terrain/model etc.) and not just the mapping of a quad to a plane. Mapping a blast mark to an arbitrary mesh becomes complicated. The only solution I can come up with on my own right now is to: 1) Determine what object(s) collide with a sphere representing the blast radius at the time of collision. This could also be a cube for footprints etc. Basically a geometric region in the world that could affect the decal. 2) Then, render the object(s) that that geometric shape collides with to a depth buffer from the point of view of the trajectory of the missile (or as needed) at the time of collision backed up by ... say ... a predefined depth. 3) Use this depth buffer to construct a fine mesh of triangles/uv coordinates etc. using the depths from the depth buffer for their depths/vertex positions. These should be offset to avoid z fighting. 4) Render decal meshs AFTER rendering the objects in the scene. I cannot find information on this ANYWHERE. If anyone has information on this or links to tutorials I would greatly appreciate it. Jeremy
  5. Hello, I have a question about object editing in game engine design. 1) Ok, so in my engine (nearly completely designed) I have many different types of "Entities". These are simply different types of things that interact in the application. There are physical entities (solid), dynamic entities (update/change etc.). There are controller entities (provide input) etc. There are many of them. There uniform/shared behavior is implemented in base classes but have virtual methods which deriving objects can inherit from to provide the object specific needs. My question is ... in a game ENGINE object editor, how should I provide the user a robust solution to inheriting from these entities and creating application specific unique objects? For example ... I could have an object editor that allows you to inherit from entity classes by selecting certain fields and have a field that allows the implementation of the virtual methods using the functionalities of the engine (predefined functions of the engine etc). That is one approach. My concern with this approach is that the people using my engine would require at least SOME C++ programming experience, and possibly some math and physics too. I am new to engine design except for this project which I have been working on FOREVER. But to be honest I have never really studied the user interfaces of other engines/object editors. I have scripts for most game features (so no C++/math/physics required) but for the objects THEMSELVES, I really cannot envision a solution that bypasses the use of C++ and/or math/physics knowledge ... so ... that reduces the clientel to people with that knowledge which I do not like. So my question is ... how would you recommend implementing an object editor that allows users of the engine to edit and create application specific and unique objects with as little background knowledge needed in C++/Math/Physics? Thank you for your help. Jeremy
  6. Hello, I have questions about handling volumetric lighting in a game engine. I would like to have volumetric lighting in my game engine but can only find sparse information on the topic in the internet. I found an article from GPU Gems 3 about a post processing effect for approximating volumetric lighting of clouds. That one seemed simple to implement but it seems to be suitable only for clouds and large open scenes (not light shafts through windows etc. which is what I would like). I could be wrong about that though. If you have seen the results of the article I would love some input about your experience with the technique. I also found an article on NVidia about volumetric lighting but the documentation was sparse and the code was very difficult to decipher. I could not view the results on my computer so I do not know if it is exactly what I need. Questions: 1) If you have seen the results of either article could I please receive some input as to the pros/cons of the effects and their suitability for an indoor/outdoor game engine? 2) Do you know of other places with information on the subject of volumetric lighting? 3) If you have experience programming volumetric lighting, could I please receive some input as to your experience in the subject? 4) Are the effects listed above feasible in real time? Thank you, Jeremy
  7. Hello ... thanks ... I finally think I have it pretty much figured out ... at least in my mind. Question: 1) With the client adjust events (with snaps and smooth blending) it is entirely possible that an object could become snapped to become partially (not much but partially) embedded in another object. Will ODE explode or anything in this scenario or just provide an outwards force to help deal with it? It seems to me that ODE could become unstable if objects are being moved/nudged/snapped from time to time. I could be wrong but just predictions. Thank you all for your help ... with your help I believe I finally grasp the concept. Thank you! Jeremy
  8. Update - What I am grasping from this is that there will inevitably be differences when using ODE between machines in multiplayer. It also sounds like you can get away with this for things that do not affect the simulation directly such as a crate exploding to pieces as long as the pieces do not affect the simulation. The effect will vary on machines but the illusion and game play is unaffected. For objects that DO affect the simulation with their physics you MUST resync them periodically to maintain concensus between machines. This is where I get a bit confused. Me ... with no knowledge on this topic would do it as follows: Step 1) Have a minimal amount of objects that can move under the physics simulation. I.e. walls and such are fine because although they interact with the simulation there positions will never change so they do not require alignment/adjustment. A few are ok ... the players themselves and maybe some projectiles or misc. items. Step 2) Run the physics simulation ONLY on the server. Step 3) Clients send their forces (accelerations etc.) to the server but do not apply them locally ... again ... no physics are done on the clients. Step 4) When forces are received from clients by the server, apply them in their physics simulation not based on where they WERE when the force was applied, but where they are currently. I am hoping that this approximation while not 100% accurate will still give the illusion of accuracy while maintaining synch. Step 5) Once/frame send out the positions/rotations of dynamic objects from the server to the clients (i.e. objects that DO move such as the players, and objects that ricochet/collide etc such as a steel box or a hand grenade). Walls and such are always unaffected so the client side version will always hold. Step 6) Since the server is doing the physics, the clients do the updating of objects (their animation variables, their traits etc.) which are sent directly to the server which does NOT have to spend time doing these types of updating ... they are simply applied flat out via packets. The idea behind this is that the server (host) can spend its CPU time doing physics but does not have to update the objects while the clients do not have to do the physics but can do the updating. Note: I realize that there will be some slight latency between the time the player inputs a force to the time they see its affect. I am just hoping (with again no knowledge or experience in this topic) that it will be acceptable. Anyways ... I have no experience in this topic. That is how I would do it but again ... I do not know anything about networking games beyond how to program sockets. So my questions are ... 1) Is this approach acceptable? 2) If not I would love a thorough explaination of how I SHOULD be doing it. 3) I looked into the Newton physics library vs. ODE. Is Newton a better physics engine for my needs? 4) Please provide as much input as you can. I appreciate your help. Jeremy
  9. Ok ... Questions ... Question 1) Ok, so if I was to "fudge over the differences" by resynching things occasionally does that mean that the overall state of the apps will still be stable/consistent over the long course of the game? I am assuming yes but that there may be the occasional object that slides to a new position a bit which may be slightly noticable from time to time. Question 2) If yes to question 1, could someone give a sequential list of actions that both the clients and the server should be doing throughout the course of the game to maintain stability and forced synchronization? For example ... what packets are sent, when, and how often? Thank you for your help. Jeremy
  10. Yeah, I guess that is true ... in two years time DirectX 10 will likely be running on average hardware huh? Good point. It just seems that streams/rivers have water flowing, oceans have waves, and lakes have ripples. There must be shaders already available for these types of things. I am fairly certain that they would be considered commonly used shaders. I could probably write my own but why reinvent the wheel if someone with more shader experience than myself may have already done the task. A stitch in time saves 9 sorta thing. Anyways ... I would love to hear more input if anyone has any. Jeremy
  11. hplus - I would be ok with the simulation not being 100% identical on all machines as long as the game gives the illusion that it is with all parties. The game play must be fluid/smooth for all parties. If they differ slightly but it is indistinguishable than that is fine with me. I am unsure about what you mean exactly by force generators etc. Can you elaborate? Thank you for your help. Jeremy
  12. Hello, I am using ODE and now would like to expand to have multiplayer capabilities in my game engine. I have read a lot of articles and it seems that the concensus says ODE and multiplayer capabilites are simply not realistically possible in real-time. Is that true? Or if not ... where/how do I get information on handling networking multiplayer and ODE? Thank you for your help. Jeremy
  13. Hello, I have some questions about where to find a good water/stream shader for my game engine. Ok, so I would like to be able to have oceans/rivers/streams etc. I am assuming you need different shaders for each of these, i.e. oceans have waves, rivers/streams have water flow etc. I am targetting my engine for hardware that will be considered average in 2 years from now and am using DirectX 9. There are a bizzilion different shaders on the net for water but I am simply trying to find the right one with the criteria listed above. Can someone point me in the right direction? Thank you for your help. Jeremy
  14. Hello, I have some questions about creating large FPS games and event handling in a game engine. Question 1) Ok, so some games have very large worlds and there is a finite amount of memory available. To reduce memory, I use resource instancing etc. (standard procedures). My question now is ... if I program a large (or very large) world as my game, how do I manage the world properly so that there is enough memory for everything and that everything runs smoothly. I am assuming you cannot simply have the ENTIRE world loaded in memory which means you are probably doing something like loading portions at a time (probably slowly in a separate thread) as regions become visible etc. I am needing information on how to properly manage LARGE FPS worlds in this manner and in memory and at run-time. Question 2) Ok, so events happen in games ... something collides with something else and you need to notify the objects that events have occured. Other times you want to simply trigger events in other objects without collision. Currently my game engine physical entity class has a couple of virtual methods: class JPhysicalObject { public void HandleCollision(JPhysicalObject* collider) = 0; void HandleEvent(int event_id, void* arg1, void* arg2) = 0; }; When two objects collide they pass themselves to each other for querying the collider type and performing collision events. When events need triggering you simply trigger the event with HandleEvent. I am hoping to get some information as to whether there is a more robust solution or if I am doing this correctly. Thank you for your help. Jeremy
  15. Thank you for your help. Yeah, that makes a lot of sense and clarifies a lot. For large FPS worlds (I'm not saying MMO scale ... but large FPS worlds) it still seems like there should be a better solution than linear updating even WITH early outs. Linear is almost always bad. I like the idea of having an update priority (only update it every 3 frames or so if the update can support it). For certain objects this could be a nice boost. The abstraction of logic is nice as well. I guess if you design your logic well enough it wouldn't take a lot of processing time anyways though since (as mentioned) there are ways for early outs. Still ... linear is bad. Perhaps changing the update priority based on distance to the viewer? This disregards occlusions though. Question) Sectors were mentioned. What would you recommend as a sectorization technique for a large FPS indoor/outdoor game? Thank you for your help. Jeremy
  • Advertisement