MapToOgreXml v1.0.0 (include source)

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
BlasterN
Gnome
Posts: 378
Joined: Thu Mar 24, 2005 1:07 am
Location: Spain
Contact:

MapToOgreXml v1.0.0 (include source)

Post by BlasterN »

Code: Select all

Program to expot .MAP (from Worcraft / Hammer / GTKRadian / Quark) to mesh, for used in Ogre3d ( see ogre3d.org ).
Now only support Worlcraft & Hammer 3.3, 3.4 & 4.5 (btw. hammer can only be used to make HL mods so you shouldn't use it with this program)

Ok here is the changelog:
Here are only the New freatures from 4.5 to 5


WorldCraftMapToOgreXml (the exporter)

New Freatures:
- Parse brushes that are in the entity. & exported too.
- Don't export xml, why? maybe you want to test only value in entities, like colour values in lights, that will help you.
- Code cleaned at last

BUG FIXED:
- split command, have problems. There are brushes that are not exported.
- problems with export the .entities, sometimes forget to write '}'

BUGS:
- noentities command crash the program


Game.exe (the mini-engine)
New Freatures:
- Load dinamic entities
- Code cleaned at last

BUG FIXED:
- Close the game take a lot of time.

BUGS:
- rotation work but not properly. I will add a new entity to fgd, node. To make te rotation an other things around/to this position.

TODO:
- Put the loading entity code in EntityManager & make it Singleton
- physic (very future)
- Switch-able entities
- destroy the entities and their effects in real time. (ex: break a light)

Ogrefgd (file with the entities to use it in Worldcraft)

TODO:
- WorldCfg, to configure the basic scene
- SkyDome, SkyPlane, SkyBox
- func_train
- node
- Camera Track

Read the readme & changelog, both have a lot of information about the program.

Here is the release: http://sourceforge.net/projects/maptoogremesh/

Screens:
http://sourceforge.net/project/screensh ... _id=143488
http://spaces.msn.com/members/BlasterN/

About:
source-code: it will be released in a few days.
DeleD support: maybe.
Web Page: In 4-5 days i'll make it. I'm planning to program in PHP something very interesting to mantain the entity list update.
Why not support QuArk now, the .map is the same. I really don't know why crash, I imagine in the next release i will support it.

All questions & request post it here.
Last edited by BlasterN on Wed Aug 31, 2005 11:13 pm, edited 2 times in total.
Works:
MapToMesh | Bengine B9 @ www.sourceforge.net/projects/maptoogremesh/
3DWorldStudio exporter@ www.blastern.info
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

Looks great! :)
Haven't tried it yet - need to download some files. :wink:
It's easier to get worldcraft from here:
http://www.voodoofiles.com/4337

Now, on to the readme, the Worldcraft, the Ogre! 8)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
BlasterN
Gnome
Posts: 378
Joined: Thu Mar 24, 2005 1:07 am
Location: Spain
Contact:

Post by BlasterN »

The new readme is better, so i post it. I think is more usefull. The beta 6 release in 4-5 days.

Code: Select all

1) COMPLETE LIST OF FREATURES.

Exporter: WorldCraftMapToOgreXml.exe
	- Support for Worlcraft-Hammer Map
	- Support for QuArk Map [Only HL editor selected]
	- Support for QRadian MAP [Only HL editor selected]
	- Parse and export brushes that are in the entity.
	- Convert automatically xml into mesh.
	- Export the textures coordinates and the normals (normalized), information taked from a .png (more extensions in the future)
	- Scale the mesh Worldgeometry
	- Split the mesh in a number of brushes
	- create a very basic material with the texture, to easy see the mesh in ogre, only in world geometry.
	- create a entity file with the same structure of the .map that work in the mini-engine.
	- Don't export Worldgeometry faces/tris with special textures [NO_DRAW,SKY,ORIGIN], that optimize the mesh.
	- Option to delete the .xml
	- Create a list of the meshes to easy load in ogre.
	- Export the center of a Entity-Brush (with texture origin).

mini-engine: Game.exe
	- Load & parse dinamic/static entities (only the fgd ones)
	- Load the meshes in the file .list
	* To load something in the mini-engine must have at least one worldgeometry & one entity.

Ogre - FGD
List of all entities supported in the mini engine & base classes for documentation purpose.
	- BaseClass List: Activated, Name, Angles, SplitedAngles, Castshadows, Material, Scale
	- PointClass List: WorldCfg, SkyBox, SkyDome, SkyPlane, Light, Mesh
	- SolidClass List: func_rotating

--------------------------------------------------

2) COMMAND LIST.

-scale value [ scale the map ]
-split value [ split the map into 'value' brushes(submeshes)]
-mesh [ transform the xml into mesh automatically]
-delxml [ delete all xml files, usefull with -mesh]
-noentities [ don't export the entities ]
-nomaterial [ don't export the material ]
-nogeometry [ don't export the Geometry of the map ]

--------------------------------------------------

3) HOW TO USE IT.

DON'T CHANGE THE NAME OF ANY FOLDER!

first download this programs:
Wally, wad explorer: http://www.telefragged.com/wally/
Worldcraft: http://collective.valve-erc.com/ || http://www.voodoofiles.com/4337 
map to test: http://www.planethalflife.com/davej/

1) Make a map with my fgd. (or take one & delete all entities & put only mine)

2) Export all the textures (use wally) in .png to \OgreEngine\Media\Textures
   - if you download the maps from davej you need to export valve wads & Team Fortress wads
   - if the texture can't be finded the size is default 128x128 & in ogre you see it white.

3) Run the exporter in the cmd, see the ChangeLog.txt to full command list.

4) Put all .mesh .list.mesh & .material in OgreEngine\Media

5) Run in the cmd like that: Game.exe [mesh name without extension]



I add .bat to make this easy. edit these .bat
Works:
MapToMesh | Bengine B9 @ www.sourceforge.net/projects/maptoogremesh/
3DWorldStudio exporter@ www.blastern.info
User avatar
BlasterN
Gnome
Posts: 378
Joined: Thu Mar 24, 2005 1:07 am
Location: Spain
Contact:

Post by BlasterN »

Here is the new release: beta 6 (9mg)

This new full-package isn't an update because i port the mini-engine to Ogre 1.0.3.
I add a new map. origin.map, it's the test map for all contain all animated entities with it you can see all work during this week.
Added support for QuArk & GTKRadian [in HL mode]
Added the source code VC7.1

The ogre.fgd is not compatible with the previous version. The next release will have a ogre.fgd base that won't change in future versions only it will grow.

Readme & changelog: http://sourceforge.net/project/shownote ... _id=343177
new screens at: http://sourceforge.net/project/screensh ... _id=143488
Download: http://sourceforge.net/projects/maptoogremesh/

Sorry for the web page delay but I have to go to: www.euskal.org begin this wednesday & I have to fly to bilbao to be org. of the gamer part of the party. I will post all demos from the scene. The last year was... I don't have words.
Works:
MapToMesh | Bengine B9 @ www.sourceforge.net/projects/maptoogremesh/
3DWorldStudio exporter@ www.blastern.info
User avatar
BlasterN
Gnome
Posts: 378
Joined: Thu Mar 24, 2005 1:07 am
Location: Spain
Contact:

Post by BlasterN »

Update the exporter to version 1.0.0
It's stable do all I think to do, because of that the version 1.0.0 the next release will include CSG & poligon reduction (far future...)

Right now I'm working in the engine. The next release for the engine beta 7 in around two more weeks.

The web page for the project are finished but i don't know how to upload to sf.net (yet) give me 2 days.

Enjoy the exporter.
Release notes: https://sourceforge.net/project/shownot ... _id=353192
Download: http://sourceforge.net/project/showfile ... _id=162407
Works:
MapToMesh | Bengine B9 @ www.sourceforge.net/projects/maptoogremesh/
3DWorldStudio exporter@ www.blastern.info
User avatar
BlasterN
Gnome
Posts: 378
Joined: Thu Mar 24, 2005 1:07 am
Location: Spain
Contact:

Post by BlasterN »

I will post some change in the engine.
The next release will be stable for developement not stable itself, no more changes in the base classes.

- port to ogre 1.0.4
- Include CEGUI
- Include OgreOpcode (but don't work 100% only for fps)
- Scripted scenes. I develop a easy script lenguaje i posted below my study.

Code: Select all

// compatibility isuues
// naming in ogre.
// the names can't contain '(' & '[' at the begining & ')' & ']' in the end
// the names can't contain ',' '=' in any position.
// the names can't contain 'get' at the begining
// every command is in one line, split is not supported.
// Vector3
// (1.0,2.0,3.0)  // no spaces!!!
// or
// get("name node_info")  // alternative for commands that only accept vector3
// register
// <camera name> playercam
// mesh & model it's the same!
// you can use both!
//register values
// <type> <name>=value
// <string parent_node> could be a list of nodes
// (node1,node2,node3,...)


[<block name>]
{
	run <string block_name> // run other block
	trigger <string entity_name>

	autorun // for map initialize
	delay_before_triggered <real time> // time between the block is triggerred &

	checkconstraintsbeforefire // check all conditions before activate the
	constraints // i really don't know what I have to put here. this is game related not engine so I'll delay this

	camera <string camera name> goto <string node_info name> <real time> // 0 instant
	camera <string camera name> goto <vector3 position> <real time> // 0 instant

	model <string entity name> goto <string node_info name> <real time> // 0 instant
	model <string entity name> goto <vector3 position> <real time> // 0 instant

	camera <string camera name> rotate <vector3 rotation> <real time> // 0 instant
	model  <string entity name> rotate <vector3 rotation> <real time> // 0 instant

	model <string entity name> playanimation <name> <speed> // 1 default
	model <string entity name> stopanimations // 1 default

	create model <string entity name> <mesh file> <vector3 position> <bool castshadows> <bool visible> <vector3 scale>
	create model <string entity name> <mesh file> <string node_info name> <bool castshadows> <bool visible> <vector3 scale>

	create billboard <string name> <vector3 position> <material name> <real height> <real width>
	create billboard <string name> <string node_info name> <material name> <real height> <real width>

	create node_info <string name> <vector3 position>
	create node_track <string name> <vector3 position> <vector3 rotation> <real speed>
	create func_train <string name> <string node_info firstnode> <mesh file> <vector3 position> <bool castshadows> <bool active> <string parent_node>

	create light_point <string name> <vector3 position> <colourvalue diffuse> <colourvalue specular> <bool castshadows> <bool active> // defult: castshadow=true active=true
	create light_dir <string name> <vector3 position> <colourvalue diffuse> <colourvalue specular> <string node_info name> <bool castshadows> <bool active> 
	create light_spot <string name> <vector3 position> <colourvalue diffuse> <colourvalue specular> <string node_info name> <bool castshadows> <bool active>
	create func_rotating <string name>
	create trigger_multiple (<real time>,<string entity_name>) or [<real time>,<string block_name>]
}

[<block name>]
{
}
I want to discuss the structure with some friends so in a few days i will make a new threat to discuss how is the best way to do it.
Right now i'm seeing Fable Warcraft3 World of Worldcraft scripts to se the structure. The blizzard engines use JASC to script info: http://jass.sourceforge.net/doc/
- List of entities (more to came):

Code: Select all

   - BaseClass List: Activated, Name, Angles, SplitedAngles, Castshadows, Material, Scale 

   - PointClass List:
	WorldCfg: World configuration
	SkyBox: Setup a SkyBox (source_name is the target_name in WorldCfg)
	SkyDome: Setup a Skydome (source_name is the target_name in WorldCfg)
	SkyPlane: Setup a Plane to use it like a sky (source_name is the target_name in WorldCfg)
	Light: can be Spot, directional & Point light. (spot & directional need a node_info to be the target of the light)
	Mesh: Load a .mesh.
	Mesh Animated: Load a .mesh with a specific animation.
	TriggerOnceRadius: Activate the target if the player (actually the camera) is in the radious
	Trigger_Queue: Activate a queue of objectives with a specific delay.
	Billboard: Create a billboard (sprite in Id software lenguaje)

   - SolidClass List:
	func_rotating: Rotating a SolidGeometry. (in future versions rotate a target too be a point class)
	func_train: Create a movable object around node_track(s) (target STOP stop the movement, so this name is reserved)
	trigger_once: Trigger Once based on colision with the BoundingBox (becarefull with that only use one box)
	func_wall: It's a simple mesh without properties now, in the future will have, collisionable, castshadows etc... all properties to optimize the maps.
- Include a tutorial of how to make a map in 3dsmax unsign GLB 2.2 plugin: http://www.maple3d.com/MainFrameScriptsPage.htm (if i have time)
- New class Globals to make the engine game-type independent, store data as player_position, time, etc...

- AND THE MOST IMPORTANT! doxygen! the code is commented at last.

I will release a bugfix version of the exporter i found a new one with q3maps. & I will make a litlle .ini to configure the exporter. For ex: texture path etc..

uff long post...
Works:
MapToMesh | Bengine B9 @ www.sourceforge.net/projects/maptoogremesh/
3DWorldStudio exporter@ www.blastern.info
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

I am looking forward to seeing more of this. :)
Your roadmap looks promising.

<edit>

As I am a challenged modeler and a lousy artist, I welcome this streamlined content pipeline! 8)

</edit>
User avatar
BlasterN
Gnome
Posts: 378
Joined: Thu Mar 24, 2005 1:07 am
Location: Spain
Contact:

Post by BlasterN »

Two screens for the next release.

Debug mode. In game.
More values in future versions.

Image

Entity Relationship. (new in exporter 1.0.1), the exporter export now a .dot file import it with

Image

I will try to add more interactive-information to my content pipeline.

The docs will be available in sf.net this night (if I find the information of how to upload to sf.net the web)[/img]
Works:
MapToMesh | Bengine B9 @ www.sourceforge.net/projects/maptoogremesh/
3DWorldStudio exporter@ www.blastern.info
Post Reply