Author Topic: Size issues when porting Quake maps to jPCT  (Read 7666 times)

Offline Abwayax

  • byte
  • *
  • Posts: 5
    • View Profile
Size issues when porting Quake maps to jPCT
« on: November 17, 2006, 07:14:29 am »
Hello,

I'm currently experimenting with the FPS example to perhaps help me make my own FPS game. However, when I load an exported 3ds made from a .map file generated by a Quake level editor, the map appears at least a hundred times larger. I tried increasing the PLAYER_HEIGHT variable, but that only made the problem worse. Is there a solution, or will I have to resize my map to fit the engine?

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Size issues when porting Quake maps to jPCT
« Reply #1 on: November 17, 2006, 02:56:20 pm »
There is a method in Object3D to resize the object (really scale it), so you can set a scale to make it fit the desired size!
Nada por ahora

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Size issues when porting Quake maps to jPCT
« Reply #2 on: November 17, 2006, 02:59:51 pm »
mmm in the Loader class when loading a 3DS file you can set an initial scale to the 3d file, is the last parameter of the load3DS method.
Nada por ahora

Offline Abwayax

  • byte
  • *
  • Posts: 5
    • View Profile
Size issues when porting Quake maps to jPCT
« Reply #3 on: November 17, 2006, 07:18:47 pm »
So the issue is here?
Code: [Select]
Object3D[] levelParts=Loader.load3DS(c.getSrc() + "\\"+src+".3ds", 20f);

and changing the 20f to 1f should fix it?

(note: for the curious, c.getSrc() is the episode directory where the levels in that episode are stored, and src is the filename of that particular level)

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Size issues when porting Quake maps to jPCT
« Reply #4 on: November 17, 2006, 07:49:44 pm »
Yeah it will fiw it, its being loaded 20 times higher, anyway you should have tested.
Nada por ahora

Offline Abwayax

  • byte
  • *
  • Posts: 5
    • View Profile
Size issues when porting Quake maps to jPCT
« Reply #5 on: November 18, 2006, 03:37:28 am »
The level's scaled correctly now, but for some reason the textures are now tiny. I don't think I saw any methods in the Texture class for resizing textures. I'm sure going in and multiplying the dimensions of each image file by 20 would work, but it hardly seems efficient.

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Size issues when porting Quake maps to jPCT
« Reply #6 on: November 18, 2006, 03:54:10 am »
Textures automatically fits on the same proportion as the bigger map.
Nada por ahora

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Size issues when porting Quake maps to jPCT
« Reply #7 on: November 18, 2006, 10:49:10 am »
They should. But maybe a screenshot would be helpful as i'm not sure what is meant with "textures are tiny now".

Offline Abwayax

  • byte
  • *
  • Posts: 5
    • View Profile
Size issues when porting Quake maps to jPCT
« Reply #8 on: November 19, 2006, 02:15:03 am »
Sorry, I didn't have a better way to phrase that.

Here's what I'm talking about. The texture is from the same jpeg file, the first is my prog, the second is the demo.

I'm standing right in front of a wall on the first one, right down at the floor on the second. The differences are that I didn't use the code for the weapon or the numbers in my program, and the ambient lighting is different.



Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Size issues when porting Quake maps to jPCT
« Reply #9 on: November 19, 2006, 12:38:25 pm »
The texture coordinates are part of the 3ds. If they appear this way in your application, they are most likely defined this way in the 3ds. So either the wall is textured this way in the Quake3-level or the export is doing changing this.

Offline Abwayax

  • byte
  • *
  • Posts: 5
    • View Profile
Size issues when porting Quake maps to jPCT
« Reply #10 on: November 19, 2006, 05:20:46 pm »
Ah. So this would be fixed by going into 3ds max? Thanks for all teh help. ;)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Size issues when porting Quake maps to jPCT
« Reply #11 on: November 19, 2006, 06:13:18 pm »
Quote from: "Abwayax"
Ah. So this would be fixed by going into 3ds max? Thanks for all teh help. ;)
I think so...