Size issues when porting Quake maps to jPCT

Started by Abwayax, November 17, 2006, 07:14:29 AM

Previous topic - Next topic

Abwayax

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?

Melssj5

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

Melssj5

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

Abwayax

So the issue is here?
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)

Melssj5

Yeah it will fiw it, its being loaded 20 times higher, anyway you should have tested.
Nada por ahora

Abwayax

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.

Melssj5

Textures automatically fits on the same proportion as the bigger map.
Nada por ahora

EgonOlsen

They should. But maybe a screenshot would be helpful as i'm not sure what is meant with "textures are tiny now".

Abwayax

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.



EgonOlsen

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.

Abwayax

Ah. So this would be fixed by going into 3ds max? Thanks for all teh help. ;)

EgonOlsen

Quote from: "Abwayax"Ah. So this would be fixed by going into 3ds max? Thanks for all teh help. ;)
I think so...