www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Abwayax on November 17, 2006, 07:14:29 am

Title: Size issues when porting Quake maps to jPCT
Post by: Abwayax 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?
Title: Size issues when porting Quake maps to jPCT
Post by: Melssj5 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!
Title: Size issues when porting Quake maps to jPCT
Post by: Melssj5 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.
Title: Size issues when porting Quake maps to jPCT
Post by: Abwayax 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)
Title: Size issues when porting Quake maps to jPCT
Post by: Melssj5 on November 17, 2006, 07:49:44 pm
Yeah it will fiw it, its being loaded 20 times higher, anyway you should have tested.
Title: Size issues when porting Quake maps to jPCT
Post by: Abwayax 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.
Title: Size issues when porting Quake maps to jPCT
Post by: Melssj5 on November 18, 2006, 03:54:10 am
Textures automatically fits on the same proportion as the bigger map.
Title: Size issues when porting Quake maps to jPCT
Post by: EgonOlsen 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".
Title: Size issues when porting Quake maps to jPCT
Post by: Abwayax 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.

(http://thefoobar.ath.cx/images/pscreen1.gif)
(http://thefoobar.ath.cx/images/jpct.gif)
Title: Size issues when porting Quake maps to jPCT
Post by: EgonOlsen 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.
Title: Size issues when porting Quake maps to jPCT
Post by: Abwayax on November 19, 2006, 05:20:46 pm
Ah. So this would be fixed by going into 3ds max? Thanks for all teh help. ;)
Title: Size issues when porting Quake maps to jPCT
Post by: EgonOlsen 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...