FAQ  •  Register  •  Login

hmm need some help

Moderator: Inside3D Admins

<<

reckless

Posts: 1633

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Thu Feb 04, 2010 7:12 am

hmm need some help

im at a loss atm probably stared myself blind on the code so if anyone could check it id be happy if you discover the bug.

its the latest version of realm i did a major cleanup codewise but somewhere along the line it broke (alias models dont show in some places / angles) only the viewmodel is affected which is weird cause reverting the code doesnt fix it.

i also suspected my way of culling to be the culprit but even if i turn off culling its still the same :S

i do have a hunch that its related to the modelview matrix allthough the only change i made was renaming it but so far nothing seems to affect it.

here it is.

ftp://90.184.233.166:21/Realm_2010_4_02.7z
<<

Baker

User avatar

Posts: 3176

Joined: Tue Mar 14, 2006 5:15 am

Post Thu Feb 04, 2010 7:50 am

It would be helpful to also post a copy of the last version of the source code that didn't have this problem ...

This way any changes made are known and can be examined.

It would also greatly reduce the amount of work by a 3rd party to get a handle on the possible scope of the problem and therefore require far less time.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
<<

reckless

Posts: 1633

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Thu Feb 04, 2010 9:09 am

<<

reckless

Posts: 1633

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Thu Feb 04, 2010 9:16 am

since its based on a newer finished project from mh (only one so far with bumpmapping) it might contain bugs i newer discovered.

you might wonder a bit when comparing it to standard quake :)

its VERY detailed.

oups btw before you go huh when compiling it it uses the intel compiler so need to get the trial version else things will explode
and the universe will cease to exist :lol:
<<

Baker

User avatar

Posts: 3176

Joined: Tue Mar 14, 2006 5:15 am

Post Thu Feb 04, 2010 10:54 am

I get "failed to download" for both URLs.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
<<

reckless

Posts: 1633

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Thu Feb 04, 2010 6:30 pm

hmm strange works fine here ? its from my own ftp.

i see in log that it finished succesfully can you open the zip files ?
<<

frag.machine

User avatar

Posts: 1470

Joined: Sat Nov 25, 2006 1:49 pm

Post Thu Feb 04, 2010 6:57 pm

Both links worked OK to me.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
<<

reckless

Posts: 1633

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Thu Feb 04, 2010 7:01 pm

ok thanks :)

hmm not sure why you get this then.
<<

Baker

User avatar

Posts: 3176

Joined: Tue Mar 14, 2006 5:15 am

Post Thu Feb 04, 2010 11:09 pm

Image

Still isn't working for me. Using FireFox, same version for years.

This is a different computer and at a different location.

Same with IE

Image
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
<<

reckless

Posts: 1633

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Fri Feb 05, 2010 7:25 am

disabled timeout lets see if that helps ?

else only option i have is putting them on a filehosting site.
<<

Baker

User avatar

Posts: 3176

Joined: Tue Mar 14, 2006 5:15 am

Post Fri Feb 05, 2010 8:25 am

Of course it is now working

(Is your computer going to "sleep" or something maybe? Doesn't matter now since the downloads are going ...)
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
<<

Teiman

Posts: 309

Joined: Sun Jun 03, 2007 9:39 am

Post Fri Feb 05, 2010 1:50 pm

maybe you can try cygwin "wget"
theres also a version of wget for windows, but the cygwin one is probably better
<<

reckless

Posts: 1633

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Fri Feb 05, 2010 3:16 pm

think it was just timeout works now ;)

and now to the real bummer i found the bug sigh.

mh's shadow function uses a matrix table after cleaning up the code i changed the call to a pointer which to my surprise doesnt work :oops:

i reverted it back to the old and now it works funny thing i had no idea this would affect the viewmodel :lol:

// go back to the world matrix (cant use a pointer here or our viewmodel gets fucked)
glLoadMatrixf (cl_entities[0].MViewMatrix);
<<

reckless

Posts: 1633

Joined: Thu Jan 24, 2008 12:04 pm

Location: inside tha debugger

Post Fri Feb 05, 2010 4:57 pm

maybe usefull to others i cooked up some depth sorting stuff based on mh's D3D code.

  Code:
/*
=============
R_DepthSortEntities
=============
*/
int R_DepthSortBrushEntities (const void *a, const void *b)
{
   static int   offset;
   entity_t   *enta = *((entity_t **) a);
   entity_t   *entb = *((entity_t **) b);

   // sort back to front
   if (enta->distance > entb->distance)
   {
      offset = 1;
   }
   else if (enta->distance < entb->distance)
   {
      offset = -1;
   }
   else
   {
      offset = 0;
   }
   return offset;
}

/*
=============
R_SortBrushEntities
=============
*/
void R_SortBrushEntities (void)
{
   int      i;

   // if there's only one then the list is already sorted!
   if (cl_numvisedicts > 1)
   {
      // evaluate distances
      for (i = 0; i < cl_numvisedicts; i++)
      {
         entity_t *ent = cl_visedicts[i];

         // set distance from viewer - no need to sqrt them as the order will be the same
         ent->distance = (ent->origin[0] - r_origin[0]) * (ent->origin[0] - r_origin[0]) +
                     (ent->origin[1] - r_origin[1]) * (ent->origin[1] - r_origin[1]) +
                     (ent->origin[2] - r_origin[2]) * (ent->origin[2] - r_origin[2]);
      }

      if (cl_numvisedicts == 2)
      {
         // trivial case - 2 entities
         if (cl_visedicts[0]->distance < cl_visedicts[1]->distance)
         {
            entity_t *tmpent = cl_visedicts[1];

            // reorder correctly
            cl_visedicts[1] = cl_visedicts[0];
            cl_visedicts[0] = tmpent;
         }
      }
      else
      {
         // general case - depth sort the transedicts from back to front
         qsort ((void *) cl_visedicts, cl_numvisedicts, sizeof (entity_t *), R_DepthSortBrushEntities);
      }
   }
}


call R_SortBrushEntities before R_RecursiveWorldNode in R_DrawWorld

and the same for alias models

  Code:
/*
=============
R_DepthSortEntities

sort entities by depth.
=============
*/
int R_DepthSortAliasEntities (const void *a, const void *b)
{
   static int   offset;
   entity_t   *enta = *((entity_t **) a);
   entity_t   *entb = *((entity_t **) b);

   // sort back to front
   if (enta->distance > entb->distance)
   {
      offset = 1;
   }
   else if (enta->distance < entb->distance)
   {
      offset = -1;
   }
   else
   {
      offset = 0;
   }
   return offset;
}

/*
=============
R_SortAliasEntities
=============
*/
void R_SortAliasEntities (void)
{
   int    i;

   // if there's only one then the list is already sorted!
   if (cl_numvisedicts > 1)
   {
      // evaluate distances
      for (i = 0; i < cl_numvisedicts; i++)
      {
         entity_t *ent = cl_visedicts[i];

         // set distance from viewer - no need to sqrt them as the order will be the same
         ent->distance = (ent->origin[0] - r_origin[0]) * (ent->origin[0] - r_origin[0]) +
                      (ent->origin[1] - r_origin[1]) * (ent->origin[1] - r_origin[1]) +
                     (ent->origin[2] - r_origin[2]) * (ent->origin[2] - r_origin[2]);
      }

      if (cl_numvisedicts == 2)
      {
         // trivial case - 2 entities
         if (cl_visedicts[0]->distance < cl_visedicts[1]->distance)
         {
            entity_t *tmpent = cl_visedicts[1];

            // reorder correctly
            cl_visedicts[1] = cl_visedicts[0];
            cl_visedicts[0] = tmpent;
         }
      }
      else
      {
         // general case - depth sort the transedicts from back to front
         qsort ((void *) cl_visedicts, cl_numvisedicts, sizeof (entity_t *), R_DepthSortAliasEntities);
      }
   }
}


call it before R_DrawAliasEntities in R_RenderScene.

this might add a bit of an overhead and im pondering if i could get away with just using one function to handle both ? the reason being that the codebase im working on doesnt call the brushmodel functions from DrawAliasEntities.
<<

Baker

User avatar

Posts: 3176

Joined: Tue Mar 14, 2006 5:15 am

Post Fri Feb 05, 2010 9:03 pm

reckless wrote:and now to the real bummer i found the bug sigh.


Hehe, how can that be a bad thing :D
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Next

Return to Engine Programming

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.
Icons provided by Aha Soft