Git Product home page Git Product logo

changameengine's People

Contributors

lch32111 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

tianhaichen

changameengine's Issues

Refactoring on All Project

I'm developing a game engine in company.
So, I've experienced lots of things in developing a game engine.
After this, I think I really need to do lots of refactoring on my game engine.
my game engine is quite messy and not mature.

I'm not sure how long it will take to change all of codes.
But I need to plan my engine and schedules to change the project.

I will use this issue for structuring the architecture on my engine.

GPED_collide_fine.h 분석 후 정리

GPED_collid_fine 분석하기.

class CollisionPrimitive --------------------------------> 따로 클래스 만들자. CGCollisionPrimitive로.

CollisionSphere
CollisionPlane (not inherited yet)
CollisionBox -> obb라고 명시해놓자. 그래서 나중에 aabb인 것도 하게.
CollisionMesh 

class IntersectionTests (for early exit, but it's not used properly. it means trimming the function to be used or not
------------------> 따로 클래스 만들자. 그래서 앞으로 만들거에 EarlyExit을 여기에서 하면 좋을듯
그리고 box보다는 obb와 aabb를 구분하도록 하자. CGCollisionEarlyExit 으로.
원래와 마찬가지로, static 써서 클래스를 통해 함수만 제공하도록.
sphere and HalfSpace
sphere and sphere
box and box
box and halfspace

class CollisionData (legacy class not to be used, because of new ContactManager class)
-----------------> 이놈은 삭제 이제 쓸일이 없음 ContactManager class에서 처리하니까.

class CollisionDetector (function to be used for narrow phase with early exit)
---------------> 예도 따로 만들자. CGCollisionNarrow 이름은 이러면 명확하겠다.
이것도 마찬가지로 class에 static 써서 함수만 제공하는 형식으로.
sphere and HalfSpace
sphere and TruePlane
sphere and sphere
box and halfspace
box and box
box and point
box and sphere
ray and box
ray and sphere

따라서 GPED_coolide_fine.h 파일은 없어질 것이다.
그리고 모든 클래스가 따로 헤더와 소스파일을 가지게 될 것이다.

그리고 이제 검사해야 할 primitive type이 늘어나니까, CGCollisionAlgorithm 이라는
클래스를 만들어서, collision primitive에 따라서, 알고리즘 을 찾아서, CGCollisionNarrow에 있는
함수를 적절히 실행하도록 하자.

Model Loader Class

Now I'm gonna develop my model structure.
So This issue will include all of my thoughts about it.

As a game engine, I'd like to provide a feature to load various 3D object files, such as obj, stl, fbx, and so on.
So, I'm gonna use Assimp library for supporting lots of 3D file types.

In my codes, What I conceived for model structure is like

Model Type

  1. Color Material(No Texture Used) : Render GLPrimitive(Triangle, Tetrahedron, Box, Sphere, and so on).
    - bool IsUseTangent; This will be used for telling whether this model uses normal/parallax
    mapping or not
    - There is GLPrimitiveUtil header file to render primitive. I'm gonna convert this file into the one,
    which feeds the vertex, normal, texCoords, tangents information to the Model Data.
    So I have to add the feature of calculating vertex, normal, texCoords, tangents for each primitive.
    And Before doing this, I think I need to set the types of primitives ahead.

So Maybe It will be good like this

Class TriangleVertexGenerator;
Class NormalGenerator;
Vertices* vLocalPointer = TriangleVertexGenerator.getLocalVertexPointer();
Normal* nLocalPointer = TriangleVertexGenerator.getLocalNormalPointer();
TexCoords* nTexPointer = TriangleVertexGenerator.getLocalTexPointer(); 
Tangent* nTanPointer = TriangleVertexGenerator.getLocalTanPointer();

Because, the data of triangle will not be changed normally after one instance.
So, I can reuse that kinds of model data from one class.
And I think After implementing more complex object like cylinder, I need to make methods for adjusting the parameters like:

Class CylinderVertexGenerator;
CylinderVertexGenerator.setTopRadius(~);
CylinderVertexGenerator.setBottomRadius(~);
CylinderVertexGenerator.generateData();
  1. Light Map Material
    - bool IsUseTangent; This will be used for telling whether this model uses normal/parallax
    mapping or not
    - I will also use GLPrimitiveUtil like the explanation above.
    - The most important feature of this type is using Assimp library to load lots of models on the
    internet, because I can't design my own models now. So, I will totally make use of Assimp library.
    But When I learned it from learnopengl.com, the structure of model using assimp library is not that
    good for me. So, I'm gonna convert it, fitted in my taste and engine.
    Before going further, I'd like to put a kind of notification of future feature which I want to have :
    First. Instanced Rendering with model
    Second. converting texture of model with mouse picking from parts to the whole body.
    The two of features which i will implement later should be considered when I start to construct
    model class. So, I'm gonna post on the below comment what I thought when I learned from
    instancing rendering using assimp model from learnopengl.com.

  2. Common
    - I have to add the feature of accessing all of the information, vertices, indices, texCoords, tangents
    for future features.

TODO List

Nowadays, I'm getting more and more ready to work on this project now, since I'm trying to get a job.
So, I just want to set up a list of implementing features on my engine before working on this.
This list may not be sequential and consistent. But I have to perform the list for my engine.

  • Settle down the backface culling problem on shadow mapping
  • Set up the structure of Instancing
  • Set up the picking of Instancing Object
  • Implement the feature of creating an object/light
  • Implement the feature of loading a model from 3D files. e.g., I'd like to see the preview of the models which I can load in my game engine. This feature will require additional features for the performance.
  • Culling Features : View-Frustum Culling, KD-Tree(or any Spatial Data Structures), Culling for shadow
  • Level Of Detail
  • Impostor

It will be good that I will handle with the tasks sequentially in the order I write.

source code

Dear friends!
could you send me a copy of Collision Detection in Interactive 3D Environments source code and API documentation of Solid version3?
This is my email: [email protected]

Collision Detection

I'm studying Collision Detection Again!

The resources are
"Collision Detection in Interactive 3D Environments"
"Real Time Collision Detection"

On this way, I wanna try to add my math library.
I did try a few of times to make my math classes.
But I think doing the important thing again will be helpful for me later.

So, I'm gonna make a test bed for experimenting lots of collision detection codes.
It will look like box2d test bed.

I hope I can finalize this one.

Terrain Physics를 위한 CollisionMesh를 Physics System에 넣기.

  1. Collision Mesh를 Terrain 클래스에 넣고, BroadPhase의 Userdata에 넣을 때, Collision Mesh를 넣을 수 있도록 하자.

  2. CGCollisionAlgorithm에서 Mesh 처리하는 것 만들기.

  3. CGCollisionNarrow에서 Mesh 처리하는 것 만들기.

  4. Collision Mesh 데이터
    아마 이것은 내 예측인데 CollisionMesh class가 다음처럼 되어야할 것 같다.

class CollisionMesh
{
    unsigned meshWidth;
    unsigned meshDepth;
    float* heightData;
    unsigned heightDataNumb;

    void getQuantizedTriangles(GPED::c3AABB aabbFromDynamicObjects,);
}

어쨋든 이것은 최종은 아니지만, 이런식으로 갈건데 하면서 바뀔 것 같다.

Basic Terrain Physics 마무리하기

이제 Terrain vs Sphere는 했으니까

Terrain vs OBB를 만들자.

그럴러면 Collision Between Triangle and OBB를 구현해야 한다.

또한, 나중에 model object에 대해 충돌처리를 하고 싶기 때문에,
model object의 mesh data 또는 정점 data와 여러가지 오브젝트들

sphere
OBB
AABB
mesh data

이렇게 또 충돌처리를 할 수 있는 것들을 가지게 하고 싶다.

이런 것들을 다시 하나씩 구현해나가도록 하자.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.