Crystal Space
Welcome, Guest. Please login or register.
December 23, 2014, 04:10:32 am

Login with username, password and session length
Search:     Advanced search
9032 Posts in 2046 Topics by 9306 Members
Latest Member: Marjoriechapp
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Projects
| |-+  Project Discussion
| | |-+  Crystal Space Renderer for Aleph One (Marathon Open Source)
« previous next »
Pages: [1] Print
Author Topic: Crystal Space Renderer for Aleph One (Marathon Open Source)  (Read 4798 times)
Lpetrich
Newbie
*
Posts: 1


View Profile Email
« on: December 31, 2008, 01:26:06 pm »

This is for the open-source version of Bungie's Marathon engine, Aleph One. Bungie has also released the Marathon Trilogy files as copyrighted freeware.

I'm hoping to write a renderer for it, or at least a viewer of its map files, using Crystal Space, but there continue to be some things that remain obscure to me. Note: I intend to do everything programmatically, without loading any CS data files, as far as is feasible.

Visibility. Is there any way within CS of checking on whether some surface polygon is visible? I've found iWatchQuestTriggerFactory in the Crystal Entity Layer, and that likely uses something or other in the CS engine itself, but I'd have to hunt through the iWatchQuestTriggerFactory source code to find out.

I would like that for constructing the engine's automap, a common feature of extruded-2D engines that has fallen by the wayside in full-3D engines. Automaps are good for solo or cooperative scenarios, because they can show where one has been, making it easier to navigate highly nonlinear level designs.

Geometry: static or dynamic? I'm currently thinking of dynamically generating the Crystal Space geometry, but updating only sectors that have changed. How feasible is that in CS? Each sector (map polygon) has a simple geometry (an extruded polygon), and since each side is individually textured and lighted, each side may be a separate mesh.

In particular, with a dynamic approach, I can handle platforms by changing the platform sectors' vertical extent, with appropriate adjustments to neighboring platforms' geometries, and I can handle liquids by dividing a sector into an above-liquid and a below-liquid sector.

A static approach would require defining movable platform and liquid meshes that would fit into sectors.

Glow mapping. I'd implemented this in A1's OpenGL mode by rendering a normal texture, then a glow texture. The normal texture is subject to ambient lighting, while the glow texture is at full brightness. Is there some simple way to do this in CS?

Sprite selection. Like other engines of its time, the Marathon engine uses 2D sprites / billboards for all its inhabitant objects, selecting which one by view direction. The walktest demo contains an animated 2D sprite, but is it simple to choose which image one wants in a sprite? I will be supplying the images, complete with direction calculations; it's getting them into CS that's the problem. Also, is it possible to use non-power-of-2 textures in CS? My A1-OpenGL support had involved composing power-of-2 textures and placing the sprites in them.

Animated wall textures. Another A1 feature I'd implemented. It ought to be easy to update a mesh's texture after creating that mesh programmatically.
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: January 01, 2009, 08:23:47 pm »

This is for the open-source version of Bungie's Marathon engine, Aleph One. Bungie has also released the Marathon Trilogy files as copyrighted freeware.

I'm hoping to write a renderer for it, or at least a viewer of its map files, using Crystal Space, but there continue to be some things that remain obscure to me. Note: I intend to do everything programmatically, without loading any CS data files, as far as is feasible.

Visibility. Is there any way within CS of checking on whether some surface polygon is visible? I've found iWatchQuestTriggerFactory in the Crystal Entity Layer, and that likely uses something or other in the CS engine itself, but I'd have to hunt through the iWatchQuestTriggerFactory source code to find out.

Checking if a polygon is visible is not very easy. We don't have a function to do that unfortunatelly. You can easily check if a point on a polygon is visible but checking an entire polygon is harder. It is pretty easy to test if a polygon is in the view frustum. But testing if it is obscured by something else is considerably harder.

Quote
Geometry: static or dynamic? I'm currently thinking of dynamically generating the Crystal Space geometry, but updating only sectors that have changed. How feasible is that in CS? Each sector (map polygon) has a simple geometry (an extruded polygon), and since each side is individually textured and lighted, each side may be a separate mesh.

When you load a map you're basically also just generating geometry. So generating geometry dynamically is no problem at all. Of course you will not be able to use static precalculated lighting then so you'll have to do with software or hardware assisted dynamic lighting.

Quote
Glow mapping. I'd implemented this in A1's OpenGL mode by rendering a normal texture, then a glow texture. The normal texture is subject to ambient lighting, while the glow texture is at full brightness. Is there some simple way to do this in CS?

You can easily write a CG shader for it.

Quote
Sprite selection. Like other engines of its time, the Marathon engine uses 2D sprites / billboards for all its inhabitant objects, selecting which one by view direction. The walktest demo contains an animated 2D sprite, but is it simple to choose which image one wants in a sprite? I will be supplying the images, complete with direction calculations; it's getting them into CS that's the problem. Also, is it possible to use non-power-of-2 textures in CS? My A1-OpenGL support had involved composing power-of-2 textures and placing the sprites in them.

Selecting the image for a sprite is trivial. Non-power of 2 textures are possible if you have the right hardware. If you want a portable game I recommend sticking with power of two textures as they are supported on all 3D hardware.

Quote
Animated wall textures. Another A1 feature I'd implemented. It ought to be easy to update a mesh's texture after creating that mesh programmatically.

And it is easy.

Greetings,
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 5.273 seconds with 15 queries.