Results 1 to 10 of 121

Thread: G.T.A.2 Map Editor

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by User137 View Post
    toFitScale - Keeps pixel perfection but reserves more memory than QuadTexture, propably not very usable on 3D-models.
    Why not very usable on 3D models?
    I tried these options and best seems to be toFitScale.
    The other one blurs too much.

    All my 3D models are just small "planes". For ped i created this:
    Code:
    model.CreatePlane(2,2);
    2,2 is ofc too big for ped, it's just for testing purposes. Later it will be even smaller.

    But loading NPOT textures from file seems to work fine.
    Will try later how to supply img data from memory to it and how it renders them.

  2. #2
    Quote Originally Posted by hwnd View Post
    Why not very usable on 3D models?
    Because often times 3D models UV maps rely on coordinate range from 0..1. If Image Width is 257 then texture's sizeX would be 512. So right side of the texture has black stripe. That obviously cannot be used as a repeating texture, and the usable UV range would be closer to 0-0.5.

    edit: Ah it's actually not black stripe. It will clamp with border line like that right side image:
    http://i.msdn.microsoft.com/dynimg/IC142381.gif
    Last edited by User137; 20-02-2013 at 02:35 PM.

  3. #3
    Here i rendered a transparent ped. The lines around him are "little" blocky.
    Is it possible to somehow tell OpenGL to smoothen these curves, so they don't look so blocky?
    If it's not, i can live with that, but i decided to ask just in case.

    The black behind it, is very basic fake shadow.
    It has large offset because ped is dead and floating in air. This i just a test rendering.
    The shadow should be transparent a bit also instead of complete black.
    Shadow is practically same quad rendered with offset and with glColor3f(0,0,0);



    Here is far view of ped
    http://img843.imageshack.us/img843/8071/farview.png
    Last edited by hwnd; 22-02-2013 at 02:15 AM.

  4. #4
    You can make the shadow transparent with alpha color: glColor4f(0,0,0, 0.6);

    Not sure if this is what you are after, but the smoothening of texture's alpha edges is done with:
    Code:
    glAlphaFunc(GL_GREATER, 0.008);
    That means that only color with alpha value greater than 0.008 is rendered.
    If you set it like (GL_ALWAYS, 0), it would draw the whole texture as smooth as it is, also fully transparent pixels with 0 alpha.

  5. #5
    I will leave that sprite rendering for a while. I get tired and bored working on one thing for long time. Instead i worked on some other things.

    With Ctrl+G shortcut it's possible to navigate to any X,Y coordinate on map.
    I use simple Delphi function: InputBox to get coords from user. Temporary thing i guess.
    Later i will use my own dialog i think.

    Instead of instantly going to X,Y location it goes there smoothly. This will be optional of course.
    First it goes fast and when arriving to specific X,Y it slows down until specified X,Y is exactly in center of the cam. And when camera is moving to that point and user clicks on minimap it stops moving.

    Because slow PC im unable to make video, it's smooth in editor but not smooth while recording video.
    Last edited by hwnd; 23-02-2013 at 04:50 PM.

  6. #6
    Found a bit of motivation to work on editor a bit again.
    I was bored. So i took old picking code and copy-pasted this to my latest editor source.
    Works fine as it did previously. I wish i could make other things work so easily (by just copy pasting).
    I don't have very much motivation to actually work on the flat faces again, there are few to add..

    I will add selection boxes in. I actually had working implementation that drew them very nicely.
    Will try to copy paste as much as i can. I had problems with selection going negative, i thought that glTranslatef will not accept negative values, but actually it did. Dunno where i stopped.
    But the code had some neat things already implemented so i will not reinvent it again, there is no point if it works.

  7. #7
    First, nice job. I was reading and looking the videos for a time and I like it.

    I'm wondering if it can be used for games other than GTA2. I mean create new games.
    No signature provided yet.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •