Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

286 Neutral

About Shael

  • Rank
  1. How do you generate the indices that point to each render item? I'm assuming you would need to have some way to uniquely identify render items?   If we look at a Light Pre-Pass rendering pipeline, the first stage would require the queue to be sorted by depth and the material stage sorted by material/shader/state BUT both stages utilize the same cull results (unless my understanding is incorrect). How is this handled? We have two different sort orders that use the same set of culled objects.
  2. I figured I'd jump in on this thread as I have a similar question.   I'm working on a data-driven renderer (similar to Horde) where you can define a rendering pipeline via a script.   Given:   a) a set of visible objects determined from the culling phase   and    b) a pipeline can have multiple stages each possibly requiring the objects sorted differently (back-to-front, front-to-back, material/state changes, etc)   What is the best way to perform sorting?   To me it'd seem that each stage with a sort option specified would have to loop through each object/drawcall/renderitem and generate a new sort key before sorting. That or each object would need to be filled with all necessary information so that custom sort functions could be written and choose what info to sort on instead of just doing the simple default integer sort using a key value.   Maybe I'm going about this completely wrong. Some insight would be great!
  3. I kind of agree with you but for practicality sake I chose to inherit Component/Property containers because an entity is a collection of components and properties. It doesn't re-implement the methods of the containers (though it could but isn't necessary). I figured it'd be better than having wrap all the collection methods ie: class Entity : public Serializable, public NetworkObject { public: void AddComponent(Component* c) { components.AddComponent©; } private: ComponentContainer components; }; Entity e; e.AddComponent(...);
  4. I'm curious to know if other developers think multiple inheritance is bad practice and if composition should be used instead or if it's a case of "the right tool for the job". The question came about as I recently started work on my entity system again and have found myself with an entity class that has grown inheriting 4 other objects - most times I've only ever needed single inheritance. In my mind this doesn't seem too bad in terms of what is being inherited but I thought I'd just see what others have to say and perhaps improve on my design/skills. My entity class at its most basic: class Entity : public ComponentContainer, public PropertyContainer, public Serializable, public NetworkObject { public: }; Basically an entity contains a list of components and properties, can be serialized and is networked. I suppose I could use composition and have the ComponentContainer and PropertyContainer as members of an Entity instead, but I found it more practical to be able to do the following: entity.AddComponent<MyComponent>(); The Serializable and NetworkObject objects allow the Entity to implement it's own logic for file de/serialization , etc and for network de/serialization. A Component object also inherits these objects.
  5. Shael

    AES Encrypting and Decrypting

    I'm not familiar with java's encryption routines but I recently did some work with AES in PHP and iOS and one thing I had to do to get things working was to pad the message using PKCS7 padding before I encrypted it and remove the padding after decrypting. In your code I don't see you doing any padding but if java does this padding for you then disregard this.
  6. There are a number of ways to implement a component based entity system. The system I have been working on works a bit like this: Components provide the data/properties/attributes and can provide behavior. Components register their properties with the parent entity so other components can access common data (eg. physics/render both need access to transform data). Sub-systems manage and update the components. For the majority of things you will already have a bunch of sub-systems that are part of the core engine (physics, rendering, animation, etc) and so a lot of your components plug into these systems nicely. For your spaceship/bullet example you could try tackle the problem in a more generic way. What makes up a bullet? In the most basic sense it has some kind of visual representation along with some physical properties. You could therefore create a bullet entity that is made from a couple of components: TransformComponent PhysicsCapsuleComponent SpriteComponent or ModelComponent For the above, the TransformComponent is there to provide the world/local transform that the physics/render systems can read/write too. The PhysicsCapsuleComponent is managed by the physics sub-system and it's attributes define the physical properties (velocity, acceleration, friction, collision mesh, etc) which the physics sub-system uses to simulate the object. The SpriteComponent or ModelComponent provides the visual representation and it is managed by the rendering sub-system. The rendering components can be broken down even further but I find in most cases your components will generally map to an existing higher level sub-system, you just need to think in general terms of what actually makes up the object you're trying to create.
  7. Shael

    GPU Terrain Physics

    Thanks for the link. That's some pretty hefty techniques they're using. I think I'll just go with a simple implementation and gradually build upon it.
  8. Shael

    GPU Terrain Physics

    Thanks all. Seems clear that I need to use low/medium resolution data for physics and for large worlds have the ability to stream "chunks" in and out of memory.
  9. Shael

    GPU Terrain Physics

    Thanks for the food So my initial thoughts were somewhat correct in terms of using lower-resolution meshes. Do you know of any demo's that show this sort of thing? Most of the demo's I've found around terrain rendering on the GPU don't do any physics simulation. I'd be interested in hearing what others have to say on this topic.
  10. How can terrain physics be handled when a lot of modern terrain rendering is done via the GPU? Normally for brute force approach and small heightmaps you could create vertices on the CPU and load them into a physics engine as a collision mesh but with GPU approaches there isn't always a 1:1 mapping of vertex data on the CPU to whats displayed on screen (eg. hardware tessellation or vertex morphing). One idea was to generate a low-medium resolution version on the CPU to form the collision mesh but I'm not sure how practical this is as it may cause visual artifacts with physics objects sinking into the terrain or perhaps even floating. What is the modern approach to this that games like BF3 are using?
  11. I'm wondering if there is any merit in using multiple spatial algorithms for visibility determination. What do more modern game engines do? Do they have "one system to rule them all" or various systems that specialize in different types of renderables/geometry present in the engine?
  12. Shael

    mesh culling (octrees)

    I've just recently come across this question myself so I thought I'll just add to this thread instead of creating a new one. I'm actually more interested in the higher level design of managing a scene and incorporating multiple culling techniques rather then implementation details of said techniques. To be more specific here's a number of questions: 1) Is there such thing as a scene manager these days? If so, what is its purpose exactly? Does it manage a group of spatial views and automagically determine which one an object gets inserted into? 2) When and who determines what culling technique are applied to objects? (Eg. static vs. dynamic objects)
  13. It really depends what you want to do and how much control you want. I found using the 3d Max SDK worked well for me but it is a bit tricky to work out how to get the correct data you require. You can find some examples in the SDK and from doing some Googlin'. Your other option is to simply write or use a loader for an existing format.
  14. Shael

    C++ cvar system

    I second this. I use this method currently and it works beautifully!
  15. Alright. Well from now on I'll use a development contract. I'm still not convinced that is all I need though. Might do some googlin' and see what turns up. Thanks guys.
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!