Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

hmm need some help Goto page 1, 2 Next

| Inside3d Forums Forum Index -> Engine Programming

View previous topic :: View next topic
Author | Message
--- | ---
reckless Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger |

Posted: Thu Feb 04, 2010 7:12 am Post subject: 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

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Thu Feb 04, 2010 7:50 am Post subject: |

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.
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...

Back to top |

reckless Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger |

Posted: Thu Feb 04, 2010 9:09 am Post subject: |

ofc ftp://90.184.233.166/Realm_2009_2_17.zip

Back to top |

reckless Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger |

Posted: Thu Feb 04, 2010 9:16 am Post subject: |

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

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Thu Feb 04, 2010 10:54 am Post subject: |

I get "failed to download" for both URLs. _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...

Back to top |

reckless Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger |

Posted: Thu Feb 04, 2010 6:30 pm Post subject: |

hmm strange works fine here ? its from my own ftp. i see in log that it finished succesfully can you open the zip files ?

Back to top |

frag.machine Joined: 25 Nov 2006 Posts: 728 |

Posted: Thu Feb 04, 2010 6:57 pm Post subject: |

Both links worked OK to me. _________________ frag.machine - Q2K4 Project http://fragmachine.quakedev.com/

Back to top |

reckless Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger |

Posted: Thu Feb 04, 2010 7:01 pm Post subject: |

ok thanks hmm not sure why you get this then.

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Thu Feb 04, 2010 11:09 pm Post subject: |

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 _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...

Back to top |

reckless Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger |

Posted: Fri Feb 05, 2010 7:25 am Post subject: |

disabled timeout lets see if that helps ? else only option i have is putting them on a filehosting site.

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Fri Feb 05, 2010 8:25 am Post subject: |

Of course it is now working (Is your computer going to "sleep" or something maybe? Doesn't matter now since the downloads are going ...) _________________ Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...

Back to top |

Teiman Joined: 03 Jun 2007 Posts: 309 |

Posted: Fri Feb 05, 2010 1:50 pm Post subject: |

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

Back to top |

reckless Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger |

Posted: Fri Feb 05, 2010 3:16 pm Post subject: |

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 i reverted it back to the old and now it works funny thing i had no idea this would affect the viewmodel
// go back to the world matrix (cant use a pointer here or our viewmodel gets fucked)
glLoadMatrixf (cl_entities[0].MViewMatrix);

Back to top |

reckless Joined: 24 Jan 2008 Posts: 390 Location: inside tha debugger |

Posted: Fri Feb 05, 2010 4:57 pm Post subject: |

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.

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Fri Feb 05, 2010 9:03 pm Post subject: |

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

Hehe, how can that be a bad thing
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> Engine Programming | All times are GMT Goto page 1, 2 Next
Page 1 of 2

Jump to:

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2004 phpBB Group