Jump to content
  • Advertisement

_WeirdCat_

Member
  • Content Count

    1001
  • Joined

  • Last visited

Community Reputation

1464 Excellent

About _WeirdCat_

  • Rank
    >^_^<

Personal Information

  • Website
  • Role
    3D Animator
    3D Artist
    Animator
    Art Director
    Artificial Intelligence
    Artist
    Audio Engineer
    Business Development
    Character Artist
    Composer
    Concept Artist
    Creative Director
    DevOps
    Environment Artist
    Game Designer
    Level Artist
    Level Designer
    Pixel Artist
    Producer
    Programmer
    Quality Assurance
    Sound Designer
    Technical Artist
    Technical Director
    UI/UX Designer
    Visual Effects Artist
    Writer
  • Interests
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I guess making an octree and splitting data into smaller texture set will be good but what if it exceeds actual hw limitations, i need to find out how to render whole set at once i think rendering each cube from furthest to nearest and storing act pixel data along with depth information will do, however after reafing about these voxel octree thing i think they are sending something different to vertex shader than vertices? And then fragment shader rasterizes that? Or am i wrong?
  2. Tommorow i plan to go to hospital to fetch tomography images to load them into my raytracer, however i wonder if sdl2 uses lets say opengl to render images then after changing it it stirrs it to surface->pixels or its its own implementation not depending on any gpu based rendering so it just rrads pixels in cpu? And whatever data it receives it will not change it? I ask becauae i dont know if it automatically changed a texture pixel data to be power of 2 etc. Ideally i could just allocate an array and store pixels but there so many img formats that i am forced to use adl for that
  3. _WeirdCat_

    PhysX Tank Simulation in Unreal

    Well not actually, you just apply friction force of each metal object (were not now talking about collision model), you treat tank along with chasiss as one rigid body and apply rotational force on center of each surface/( metal tire part ) contact surface (torque) and you apply same to the center of mass cause you want to move the object. However you need a damping function To deal with NaN and imprecision //needed to be fixed if is nan inline void damp( vec3 * ptr, float amount, float epsilon) { (*ptr) = (*ptr) - (*ptr)/amount; vec3 p = vec3(absnf<float>((*ptr).x),absnf<float>((*ptr).y),absnf<float>((*ptr).z)); if (IsNan(p.x)) p.x = 0.0; if (IsNan(p.y)) p.y = 0.0; if (IsNan(p.z)) p.z = 0.0; if ( (p.x > 0) && (p.x < epsilon) ) (*ptr).x = 0.0; if ( (p.y > 0) && (p.y < epsilon) ) (*ptr).y = 0.0; if ( (p.z > 0) && (p.z < epsilon) ) (*ptr).z = 0.0; } inline void damp( float * ptr, float amount, float epsilon) { (*ptr) = (*ptr) - (*ptr)/amount; if (IsNan((*ptr))) (*ptr) = 0.0; if ( (absnf<float>(*ptr) > 0) && (absnf<float>(*ptr) < epsilon) ) (*ptr) = 0.0; } template <class type> bool IsNan (type f) { return (f != f); } Using too little timesteps will crack the sim so you deal with it damp(&vel, 10.0, 0.007); damp(&AngVel, 10.0, 0.0005); call that each frame before calculating new velocities/forces damp here is really simplified, didnt have time to spend on figuring how forces react on each other (in my case skin and body drag etc for rotations) so damp damps each x by x/10.0 in this case aecond parameter tells when were close to zero so we actually 0 it so theres no crack If need any more help like explaining how you apply everything just reply
  4. _WeirdCat_

    PhysX Tank Simulation in Unreal

    Take a look at tires, those are metal parts for simplification define that its made if lets say 18 parts and only maximum of 8 parts can contact the surface, now define a friction const and apply a force for each metal part of each track
  5. Seems youre reading some twisted tutorial. The ildest implementation is as follows Main concept is to store an array of textures, and store which face uses which texture (index) then you draw each face as separated one. You bind texture theb draw face, bind texture theb draw face. Everyrhing varies on what kind of model you are dealing with, so actual rendering may be different, and so on switching between multiple textures can vary, not to mention that you could use one texture for that....
  6. _WeirdCat_

    Calculating Corner "Normals"

    I dont even understand what are you trying to do do you want to scale the smaller triangle to bigger one? Or what? Cause if so you just vdir = normalize(center_point,vertex); newPoint = vertex+vdir*whatever wall thickeness you want I just dont get you
  7. More to say its like a vertex shader since you need 2 well maybe 3 matrices you do each vertex uv is (for opengl thingy) You calculate screen coordinate Depending if uts ogl or d3d implementatiin this will differ for acreen coord byt not that much vec3 txcrd = ((model_matrix*view_matrix)*projection_matrix ) * vertex Then divide result by w component of the result txcrd.xy = txcrd.xy / txcrd.w; This should give you so called ndc which is in range -1..1 now xy coord are yours texture uv simply do * 0.5 + 0.5 and youll get uv coord now you need to rwmember how you load textures so obe might flip y coord or even x (when using sdl for example) Aint that that simple?:)
  8. _WeirdCat_

    PhysX Tank Simulation in Unreal

    Im not aware of physix etc but if one track produces bigger force and you apply that force to a pivot the tank will turn no matter what, what you could do is to define where to place pivots (where force is applied on each track) i think that will require more than one point per track, never tried to do realiatic tank sim though...
  9. your input implementation just sucks alot, you need to implement your own system
  10. _WeirdCat_

    Share a pointer

    Yeah, i get you i already have such things, but i had to make a break from writing to realize that i dont even have a valid pointer.... Too much writing and one way thinking burns the head, i definetly spend too much time programming...
  11. First you need to know whenever youre using java and override touch events they are spawned in another thread than main one so they are separated from drawing thread etc. Maybe you have synchronization problems. Another thing would be to to poll events in main game loop so each frame you draw you first process the input then draw.
  12. _WeirdCat_

    Share a pointer

    I think i found it hahhah huehue Just make it a global var and don't care !:0 about any pointers to pointers Genius ; )
  13. _WeirdCat_

    Share a pointer

    as for that conversion thing i dont know yet, but for the post above, i cant call main class from a subclass due to circular reference thing, i could obviously bypass that, but thats not the point, still searching for legit solution, i want to change the pointer in main class from the subclass itself which has a pointer to that mainclass pointer which is 0 at start and (*face_model) = aface_model; cracks the app where face_model is model3f ** and aface_model is model3f * that is set to 0 And yesterday i thought that was an easy to solve problem lol
  14. _WeirdCat_

    Share a pointer

    Well, welll.... hmmm............. Not to mention i cant properly edit my post above so ill leave it like it is now... But subclass wont be derived from mainclass, thats not going to happen, i only made an example which is not the exact tthing i have if you really need to know main class is TMainFramework class which is of class TGLForm which is of class TVCLComponent which is of class TPhysicalElement<float, float, float, float, float> And it stores a list of forms 6 side projection forms and one perspective projection forms which are the type of TGLForm which is of type of... and so on so its irrevelant. Anyway in main class i used an int * p; description which is actually model3f * face_model; anyway this doesnt matter Since i would like to create a pointer in main class from the subclass i call it So if subclass has int ** p; And during initialization (in subclass space) i call (*subclass.p) = mainclass.p; Where before anything happens like initialization mainclass int * p is set to be 0. I would rather want to stay like it is unless i will have no chocie and have to change it. So (*subclass.p) = mainclass.p; for me it seems like i dereference an unknown address and try to make it 0; However in some other subclass code i would like to do something like (*p) = new int();//new model3f(); So int * p in main class points to that newly created var, And int **p in that other subclass point to int * p from main class which is now not a 0 butnsomething created.. i hope i described that
  15. so I have 3 classes main class which stores a pointer struct Main { int * p; A subclass1, subclass2; void init() { subclass1.init(p); subclass2.init(p); } }; and two subclasses struct A { int * p; void init(int * ap) { p = ap; } }; Now I would like to create a pointer from subclass1 or subclass2 that will actually create a pointer in Main class, so subclasses can use the same int from main class heres what im trying to achieve in first scenario you see same windows so you see that on phone1 and phone2 theres a blue wireframed object that im trying to share between multiple windows, but when I change projection window I cant see it, so I need a shared pointer https://youtu.be/9HLDsrm7R2w I already messed with int ** p; for subclasses but im missing something (maybe because int * p in main class is 0) and I cant assign it by int ** subp = (*mainclass.p); if someone tells me that I could use shared ptr then I ask him to provide some example code for me cause I never used it and have no xp with it. However pointer to pointer c style would be the best approach for me thus theres something wrong in the code I dont fully understand so far, int * p in main class has to be 0 until its not created by subclass... maybe I somewhere use it where I shouldnt, well I just changed the code from * to ** and just switched from if (p ==0) return; to if ( (*p) == 0) return; etc. but theres few thousands lines I need to check so a short brief of handling such types would be appreciated..
  • 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!