Doom3world

The world is yours! Doom 3 - Quake 4 - ET:QW - Prey - Rage
It is currently Sun May 19, 2013 9:46 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 477 posts ]  Go to page Previous  1 ... 20, 21, 22, 23, 24
Author Message
 Post subject: Re: Doom 3 Deferred renderer/post process/tools/Virtual Texture
PostPosted: Sun Jun 03, 2012 11:58 pm 
Offline
missed 400 shots

Joined: Tue Dec 06, 2011 8:05 pm
Posts: 418
New Stuff in SVN:

65kx65k VT Support(the final filesize hovers around 4gb).
New filesystem functions to load larger than 2gb files.
You can now select faces in the editor.
You can now mark surfaces as nodraw.
Added/Fixed the Q4 script debugger.


Top
 Profile E-mail  
 
 Post subject: Re: Doom 3 Deferred renderer/post process/tools/Virtual Texture
PostPosted: Tue Jun 05, 2012 7:43 am 
Offline
missed 400 shots

Joined: Tue Dec 06, 2011 8:05 pm
Posts: 418
Got up a quick screenshot of a indevelopment level using 65k vt's(clear your internet cache):

http://blackenmace.com/


Top
 Profile E-mail  
 
 Post subject: Re: Doom 3 Virtual Texture(65k x 65k)enhanced renderer/c# tools
PostPosted: Fri Jun 15, 2012 12:30 am 
Offline
missed 400 shots

Joined: Tue Dec 06, 2011 8:05 pm
Posts: 418
I've been working on in editor paint tools and I've mostly got it working but as you can see from the screenshot edges are currently a issue.

Attachment:
vtpainttools.png
vtpainttools.png [ 255.33 KB | Viewed 255 times ]


Currently I'm tracing a unprojected ray against the world to figure out a) what vt area we hit and b) that point needs to get converted back into 2d coords so we can figure out were to paint. To do the latter I'm using a heavily modified version of idRenderWorldLocal::GuiTrace. The problem is this function is very inacurate on non flat surfaces. My modified function below:

Code:
/*
================
VTTrace
================
*/
vtPoint_t idRenderWorldLocal::VTTrace( int vtAreaId, const idVec3 start, const idVec3 end ) const {
   srfTriangles_t   *tri;
   vtPoint_t pt;
   localTrace_t   local;
   const modelSurface_t *vtsurf = NULL;

   memset( &pt, 0, sizeof(vtPoint_t));

   if(vtAreaId == -1) {
      common->Warning("VTTrace: Can't trace against non vt areas.\n");
      return pt;
   }

   for(int i = 0; i < localModels.Num(); i++)
   {
      idRenderModel *model = localModels[i];

      //common->Printf("Generating Collision for %s - %d collision models\n", model->Name(), model->NumSurfaces() );
      for(int s = 0; s < model->NumSurfaces(); s++)
      {
         const modelSurface_t *surf = model->Surface( s );

         if(surf->geometry->vt_AreaID == vtAreaId) {
            vtsurf = surf;
            break;
         }
      }


      if(vtsurf != NULL)
         break;
   }

   if(vtsurf == NULL) {
      common->Warning("VTTrace: VTArea %d is invalid!\n", vtAreaId);
      return pt;
   }

   tri = vtsurf->geometry;

   local = R_LocalTrace( start, end, 0.0f, tri );
   if ( local.fraction < 1.0 ) {
      idVec3            origin, axis[3];
      idVec3            cursor;
      float            axisLen[2];

      R_SurfaceToTextureAxis( tri, origin, axis, &local.indexes[0], &local.plane );
      cursor = local.point - origin;

      

      int closestIndex = 0;
      if(local.d[0] > local.d[1] && local.d[0] > local.d[2])
      {
         closestIndex = local.indexes[0];
      }
      else if(local.d[1] > local.d[0] && local.d[1] > local.d[2])
      {
         closestIndex = local.indexes[1];
      }
      else if(local.d[2] > local.d[1] && local.d[2] > local.d[0])
      {
         closestIndex = local.indexes[2];
      }

      cursor = local.point - tri->verts[closestIndex].xyz;
      axisLen[0] = axis[0].Length();
      axisLen[1] = axis[1].Length();

      pt.x = ( cursor * axis[0] ) / ( axisLen[0] * axisLen[0] );
      pt.y = ( cursor * axis[1] ) / ( axisLen[1] * axisLen[1] );
      pt.x += tri->verts[closestIndex].st.x;
      pt.y += tri->verts[closestIndex].st.y;
      return pt;
   }

   common->Warning("VTTrace Failed.\n");
   return pt;
}


Basically what makes this function more accurate is I interporlate the position from the nearest point that got hit and extrapolate the final position that way. And it works 90% of the time but its still not as acurate as I need it to be. Has anyone been working on something like this that can provide some insite on what I'm doing wrong?


Top
 Profile E-mail  
 
 Post subject: Re: Doom 3 Virtual Texture(65k x 65k)enhanced renderer/c# tools
PostPosted: Sat Jun 16, 2012 9:29 am 
Offline
missed 400 shots

Joined: Tue Dec 06, 2011 8:05 pm
Posts: 418
Fixed a lot of the bugs with the VTPaintTool still isn't exactly right but got a lot more stuff in including layers, and the BSP compiler(DMap) will build the virtual texture from the MegaProject which means no more MudBox requirements :P. I'll try to release a editor build sometime with in the next week.

http://blackenmace.com/phpBB3/download/file.php?id=16


Top
 Profile E-mail  
 
 Post subject: Re: Doom 3 Virtual Texture(65k x 65k)enhanced renderer/c# tools
PostPosted: Fri Jun 29, 2012 6:52 pm 
Offline
has joined the game

Joined: Fri Mar 02, 2012 5:55 am
Posts: 40
Things seem to be quiet as of late since the last commit to the code.google repository was on June 16th with no activity since then. I'm not complaining since I'm fully aware that a lot has been accomplished recently and if jmarshall23 wants to take a bit of a break, then I think he's earned it. I was just wondering what the plan was going forward.

Also, I was looking at the video of the texture painting tool awhile ago and the only comment I can think of is that wouldn't the helper brush that shows where the texture is going to be painted work better if it was a decal that was projected on the terrain? Other than that, things look great so far.


Top
 Profile E-mail  
 
 Post subject: Re: Doom 3 Virtual Texture(65k x 65k)enhanced renderer/c# tools
PostPosted: Sat Jun 30, 2012 12:59 am 
Offline
missed 400 shots

Joined: Tue Dec 06, 2011 8:05 pm
Posts: 418
Quote:
Things seem to be quiet as of late since the last commit to the code.google repository was on June 16th with no activity since then. I'm not complaining since I'm fully aware that a lot has been accomplished recently and if jmarshall23 wants to take a bit of a break, then I think he's earned it. I was just wondering what the plan was going forward.

Also, I was looking at the video of the texture painting tool awhile ago and the only comment I can think of is that wouldn't the helper brush that shows where the texture is going to be painted work better if it was a decal that was projected on the terrain? Other than that, things look great so far.


That just means I haven't checked anything in : ), I'm moving everything over to a git repository I wanted to do a full release when I got most of the bugs fixed ill commit everything in a couple days.

That was just the initial implementation, the brush now properly gets projected on the mesh.


Top
 Profile E-mail  
 
 Post subject: Re: Doom 3 Virtual Texture(65k x 65k)enhanced renderer/c# tools
PostPosted: Sun Jul 01, 2012 9:00 pm 
Offline
has joined the game

Joined: Fri Mar 02, 2012 5:55 am
Posts: 40
That sounds great.

I'm probably thinking too far ahead, but what do you think you'll work on next after virtual textures get settled out?


Top
 Profile E-mail  
 
 Post subject: Re: Doom 3 Virtual Texture(65k x 65k)enhanced renderer/c# tools
PostPosted: Tue Jul 24, 2012 6:42 am 
Offline
has joined the game

Joined: Fri Mar 02, 2012 5:55 am
Posts: 40
I was just wondering what was currently going on with the project? The website has been down for a few days, so I thought I'd ask.


Top
 Profile E-mail  
 
 Post subject: Re: Doom 3 Virtual Texture(65k x 65k)enhanced renderer/c# tools
PostPosted: Fri Jul 27, 2012 11:42 pm 
Offline
picked up 100 armour
User avatar

Joined: Mon Jun 15, 2009 3:55 pm
Posts: 102
Location: Lost in the Neurosphere
Same here.


Top
 Profile E-mail  
 
 Post subject: Re: Doom 3 Virtual Texture(65k x 65k)enhanced renderer/c# tools
PostPosted: Sat Jul 28, 2012 8:04 am 
Offline
Last man standing
User avatar

Joined: Fri Jan 07, 2005 12:27 am
Posts: 1050
Haven't been any updates for a while. The last stuff seemed interesting- support for kinect!
http://code.google.com/p/idtech4cdk/source/list


Top
 Profile  
 
 Post subject: Re: Doom 3 Virtual Texture(65k x 65k)enhanced renderer/c# tools
PostPosted: Sun Jul 29, 2012 5:12 pm 
Offline
picked up 75 health

Joined: Wed Jan 25, 2012 12:28 am
Posts: 93
Yeah he looks like he has a history of stopping interesting projects if you look at the repository. Anyone up for forking it?


Top
 Profile E-mail  
 
 Post subject: Re: Doom 3 Virtual Texture(65k x 65k)enhanced renderer/c# tools
PostPosted: Mon Jul 30, 2012 3:29 pm 
Offline
fired 300 rounds

Joined: Tue Oct 19, 2004 8:04 am
Posts: 356
It's a bit early for assumptions like that - it is the summer after all!


Top
 Profile  
 
 Post subject: Re: Doom 3 Virtual Texture(65k x 65k)enhanced renderer/c# tools
PostPosted: Wed Aug 15, 2012 6:05 pm 
Offline
picked up 75 health

Joined: Wed Jan 25, 2012 12:28 am
Posts: 93
I'd say it's pretty much dead at this point. He was going through 1 revision every day or so and then just stopped. I sent him an email asking if this was still going but no dice :/. Seemed like a really cool system.


Top
 Profile E-mail  
 
 Post subject: Re: Doom 3 Virtual Texture(65k x 65k)enhanced renderer/c# tools
PostPosted: Wed Aug 15, 2012 6:23 pm 
Offline
is connecting to Doom3world.org

Joined: Tue May 29, 2012 3:02 am
Posts: 2
This project was improving the Doom 3 engine why would he stop.Well we can use his work so he didn't program for nothing.


Top
 Profile E-mail  
 
 Post subject: Re: Doom 3 Virtual Texture(65k x 65k)enhanced renderer/c# tools
PostPosted: Wed Aug 15, 2012 6:37 pm 
Offline
picked up 75 health

Joined: Wed Jan 25, 2012 12:28 am
Posts: 93
I'm not sure. Licensing issues? Anyway, the code is there for forking, someone just needs to take control and do something useful with it.


Top
 Profile E-mail  
 
 Post subject: Re: Doom 3 Virtual Texture(65k x 65k)enhanced renderer/c# tools
PostPosted: Wed Aug 15, 2012 8:42 pm 
Offline
is connecting to Doom3world.org

Joined: Tue May 29, 2012 3:02 am
Posts: 2
I don't care about the licensing issues for now I got the source code from the svn and I'm going to make good use of it.


Top
 Profile E-mail  
 
 Post subject: Re: Doom 3 Virtual Texture(65k x 65k)enhanced renderer/c# tools
PostPosted: Thu Aug 16, 2012 5:14 pm 
Offline
picked up 75 health

Joined: Wed Jan 25, 2012 12:28 am
Posts: 93
anonreclaimer wrote:
I don't care about the licensing issues for now I got the source code from the svn and I'm going to make good use of it.


If you do start using it, is there any way you can set up an alternate repo with your changes? I still can't get it to compile, and I don't have the time to troubleshoot it.


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 477 posts ]  Go to page Previous  1 ... 20, 21, 22, 23, 24

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group