free compiler with lightmaps?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

I see, Trancos...

Jox, it produced a long conversation with Lord Trancos...

X does support the second uv channel in fhe FVFData .Ultimate Unwrap(if you check multiple uv sets in export dialog) does export it (I have double checked again: it appears in the same ascii x file)...jedive reported me once of Ultimate Unwrap x export be working inIrrlicht, so...

Ultimate Unwrap is a comercial 40$ tool, and it exports I think in dx 8.1 format.
I was at msdn site and I think I saw also support of 2 uv channels in dx8.0 , but in another way.
The x panda exporter for max does now support export 2 uv channels via FVFData


I have done and seen done lots of stuff with x and several uv channels... ;)
My big doubt was if Irrlicht can load 2 uv channels from an x file.
Finally making games again!
http://www.konekogames.com
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

@Jox

sorry as I may sound as an scratched music disk, but...
Irfanview can batch convert (also tga-->tga) while also in the proccess can make with the same touch of a button any operation you like from those I show you in bellow screens. It can even rename if wished.
Flip is among those batch operations.

Also even if u were to do one by one (weird if have many ;)) irfan loads in no-time. Adobe takes a huge while... It has some batch support but very bad compared to Irfan's free tool .

Irfan's batch is just opening any file in the folder you have...like 20 tgas (1000) you want to batch convert/proccess....open the batch dialog ("File" menu or hit key "b") in irfan.

In that dialog, "ADD" all files. (or make a multiple files selection with shift and/or control keys, you can right click there and order your files by name, date, etc to make an easier selection.Or just select all with shift or something) Set the output directory (you have a button to set "same folder as outpu" which is really useful) .You can batch convert, batch rename, batch convert/proccess and renam in one, too.

For batch flip. Hit the advanced options button. Set the operations u want to happen always. (like flip.)

hit ok, hit in the main dialog "START" .If it gives the no error, no warnings message, you'd have converted and/or processed and/or renamed a bunch of files (or 2, 3, whatever)

It remembers your options as you left last time always, quite good.

Is really easy, and takes only some seconds, even if it's a load of images.

I know Trancos have already done a fix for you.

Is just I think this tool is simply essential.A pitty is windows only.
Finally making games again!
http://www.konekogames.com
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

Finally making games again!
http://www.konekogames.com
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

@vermeer: Yes, If it's getting bigger then batch convert would of course be the choice. Photoshop would be a pain and a bottlneck in the workflow. But there would be no need for batch flipping! Because the flipping issue is only a TGA internal thing. TGA can store the images flipped, but it has flags to indicate so. You don't recognize this until an application ignores those flags (like irrlicht). The Idea of loading and resaving is only to convert it to a (internaly) non flipped image (with flip flag not set).

But as you said Lord Trancos fixed it and that's the best solution anyways (besides fixing irrlicht tga loader).

Thanks for your thougts anyway. Batch converting can always be useful!
Guest

Lord Trancos

Post by Guest »

If I'm not wrong, it seems that when using this path:
OBJ -> ANT -> FSRad -> OCT

The map it's flipped to Left-Hand or Right-Hand.

Can somebody confirm this...?
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

Yea, confirmed! The map gets mirrored in the YZ plane somehow. Is it a left/right hand thing?

Is it possible to also use point lights in this route? If so, how do I include them?
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

@Lord T. & Jox: I see !!!

I downloadet the loader and try to inplement it...
I ever made something like this and maybe it's a good tutorial for creating my own loder... ;)

CU
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

download irfanview and re-save your tgas, that'll fix it, otherwise your lightmap will be nuts. Resave all the tgas, textures and lightmaps.

here's the code I used: (collision included)

Code: Select all

//Lmts level test
//by Alvaro F. Celis "afecelis" 
//using Jox's lmts loader & Lord trancos LMtools

/*  The Irrlicht Engine License

Copyright © 2002-2003 Nikolaus Gebhardt

This software is provided 'as-is', without any express or implied warranty. 
In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, 
and to alter it and redistribute it freely, subject to the following restrictions:
1.The origin of this software must not be misrepresented; you must not claim that you wrote the original software. 
If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2.Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3.This notice may not be removed or altered from any source distribution.*/
//-----------------------------------------------------------------------------------------------//

	#include <irrlicht.h>
	#include <stdio.h>
	#include <windows.h> 
	#include "CLMTSMeshFileLoader.h"


	using namespace irr;
	using namespace core;
	using namespace scene;
	using namespace video;
	using namespace io;
	using namespace gui;

	#pragma comment(lib, "Irrlicht.lib")


	int main()
	{
		IrrlichtDevice *device =
		createDevice(video:: EDT_OPENGL , core::dimension2d<s32>(640, 480), 32, true,false,0);
		//createDevice(video:: EDT_DIRECTX9 , core::dimension2d<s32>(800, 600), 32, false,true);
		//createDevice(video::EDT_DIRECTX8, core::dimension2d<s32>(640, 480), 32, false,true);
		//createDevice(video::EDT_SOFTWARE , core::dimension2d<s32>(640, 480), 16, false);

//-----------------------------------------------------------------------------------------------//	
	video::IVideoDriver* driver = device->getVideoDriver();
	scene::ISceneManager* smgr = device->getSceneManager();
	IFileSystem* fs = device->getFileSystem(); 
	driver->setTextureCreationFlag(ETCF_OPTIMIZED_FOR_QUALITY,true );
//-----------------------------------------------------------------------------------------------//
	//lmts map loader
	scene::CLMTSMeshFileLoader* lmts_loader = new scene::CLMTSMeshFileLoader(fs, driver);
	smgr->addExternalMeshLoader(lmts_loader); 
//-----------------------------------------------------------------------------------------------//
	//lmts textures
	lmts_loader->setTexturePath("data\\"); 
//-----------------------------------------------------------------------------------------------//
	//load the map
	IAnimatedMesh* mesh = 0;
	mesh = smgr->getMesh("data\\lmts.3.lmts"); 	

//-----------------------------------------------------------------------------------------------//
	//add map to the scene
	IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh ); 
//-----------------------------------------------------------------------------------------------//
		// create sky box

		//scene::ISceneNode* skyboxNode = 0;
		//skyboxNode = smgr->addSkyBoxSceneNode( 
		//driver->getTexture("./data/desert_up.jpg"),
		//driver->getTexture("./data/desert_dn.jpg"),
		//driver->getTexture("./data/desert_lf.jpg"),
		//driver->getTexture("./data/desert_rt.jpg"),
		//driver->getTexture("./data/desert_ft.jpg"),
		//driver->getTexture("./data/desert_bk.jpg"));	
	
//-----------------------------------------------------------------------------------------------//	
	//wasd navigation
	SKeyMap keyMap[8];

	keyMap[1].Action = EKA_MOVE_FORWARD;
	keyMap[1].KeyCode = KEY_KEY_W;

	keyMap[3].Action = EKA_MOVE_BACKWARD;
	keyMap[3].KeyCode = KEY_KEY_S;

	keyMap[5].Action = EKA_STRAFE_LEFT;
	keyMap[5].KeyCode = KEY_KEY_A;

	keyMap[7].Action = EKA_STRAFE_RIGHT;
	keyMap[7].KeyCode = KEY_KEY_D;
//-----------------------------------------------------------------------------------------------//
	//selector

	scene::ITriangleSelector* selector = 0;
	
	if (node)
	{		
		selector = smgr->createOctTreeTriangleSelector(mesh->getMesh(0), node, 128);
		node->setTriangleSelector(selector);
		selector->drop();
	}


//-----------------------------------------------------------------------------------------------//	
	//fps cam

	scene::ICameraSceneNode* camera = 0; 
	camera = smgr->addCameraSceneNodeFPS(0,80.0f,300.0f,-1, keyMap, 8); //1st value= obligatory 0-2nd value= mouse sensitivity-3rd value handles cam speed
	camera->setPosition(core::vector3df(-220,100,50)); //x,y,z,pos
	camera->setFarValue (50000.0f) ; //sets the distance for the clipping plane, the bigger the farther
	camera->setFOV(1.4f); // a value of 0.5 makes it look alienish
	camera->setRotation(core::vector3df(0,90,0)); //rotate the camera x,y,z degrees

	//collision animator
	scene::ISceneNodeAnimator* anim = 0; 
	anim = smgr->createCollisionResponseAnimator(selector, camera, core::vector3df(30,50,30),
	core::vector3df(0,-100,0), 100.0f, 
	core::vector3df(0,50,0));
	camera->addAnimator(anim);
	anim->drop();

//-----------------------------------------------------------------------------------------------//	
	// disable mouse cursor

	device->getCursorControl()->setVisible(false);

//-----------------------------------------------------------------------------------------------//	
	// automatic picking

	scene::ISceneNode* selectedSceneNode = 0;
	scene::ISceneNode* lastSelectedSceneNode = 0;	
	

//-----------------------------------------------------------------------------------------------//	
	//draw everything
	
	int lastFPS = -1;

	while(device->run())
	{
		driver->beginScene(true, true, 0);

		smgr->drawAll();

		driver->endScene();

		int fps = driver->getFPS();

		if (lastFPS != fps)
		{
			wchar_t tmp[1024];
			swprintf(tmp, 1024, L"Lmts file test (fps:%d) Triangles:%d", 
				fps, driver->getPrimitiveCountDrawn());

			device->setWindowCaption(tmp);
			lastFPS = fps;
		}
	}

	device->drop();
	
	return 0;
}


cheers
Last edited by afecelis on Wed Aug 18, 2004 12:49 am, edited 2 times in total.
Image
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

and here's a screenie:
Image

ps. Still waiting for LordT's new lightmapper to fix the colored lightmaps issue.

cheers!
Image
cmoibenlepro
Posts: 237
Joined: Thu May 27, 2004 3:18 pm
Location: Canada

Post by cmoibenlepro »

@ afecelis:
Did you made that map with FSRad or LMTS?

BTW, it looks great! :D
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

hey Cmoibelenpro!

It's the same thing we had on the other thread. I just felt like posting it here with the code.

I made the map in 3dsmax, placed some lights, exported the script with lmtools's script, exported the file to 3ds and then loaded it and compiled with LMtools. It's 100% LordTrancos' stuff.

I know there's a lot of hype with th FSrad thing, but I haven't been able to try it. I've found the Lmts lightmapper and file format to be very stable and easy to work with. The only thing missing is proper color lightmapping.

btw, the tone of the image was achieved changing the tone of the lightmap tga.



Image

it's a weird work-around while LordT fixes his lightmapper. ha ha haha :wink:
Image
cmoibenlepro
Posts: 237
Joined: Thu May 27, 2004 3:18 pm
Location: Canada

Post by cmoibenlepro »

it's a weird work-around while LordT fixes his lightmapper
good idea :wink:
Guest

Lord Trancos

Post by Guest »

jox, you cannot use point lights with ent or ant files.

afecelis, looks very cool! btw, i'll not start the new lmtools version till next week.
Guest

Lord Trancos

Post by Guest »

Tomorrow I'll release a new version of OBJ2ENT that workarrounds the flipping issue.
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

Hm, seems like you can't use point lights with FSRad at all. Which makes sense if you read into the topic some. I was just wondering because there is the parameter "Point light multiplier" in FSRad (which I found out is for the "faked" point lights in FSRad).

Everything works really fine. FSRad is taking lots of time for rendering but the results are really good. And you can adjust parameters for quick previewing (the "Direct light only" check box for example).

Great you're solving the flipping issue! You're a hero! :)
Post Reply