|11-09-2001, 06:49 PM||#1|
Joined: Nov 2001
I'm looking for an online reference for Serious Sam. Thus far I've learned most of what I know from either the help included with SED or from tutorials. What I'd like is a reference in which I can look up, for example, the meaning of the different Spawn Flags. There are many flags, many options, and many settings for all the different components of the editor; where can I find out what they all do?
|11-09-2001, 07:07 PM||#2|
You can try the item-by-item document by Michael Harris, it's not very thorough but it has a lot of useful information. The best source of everything Sammish is these forums- although checking ALL of the threads on the mapping forums is suicidel, you can search for topics that interest you, or simply ask a question.
|11-09-2001, 08:56 PM||#5|
Joined: Mar 2001
(unless you subscribe, you'll need to use the "public" links toward the bottom of the page that appears, rather than the "personal" links toward the top)
It is a preliminary attempt at covering the editor, item by item, but still needs a lot of work. *It is in Microsoft HTML Help format (.chm file type), which you can use by simply double clicking on the file once you have unzipped it (or you can set up a desktop shortcut to it). *It is standalone.....does not integrate into the editor.
Next revision is in the works....but no date certain ("when it's done". *Feedback and suggestions welcome.
(Edited by Michael Harris at 6:59 pm on Nov. 9, 2001)
|11-12-2001, 03:17 PM||#6|
Michael. Do you have any notes on any of the entities? Finished, or unfinished would do great. I'm also looking to find out what the link checkbox on the poly tab of the tools info popup means.
I'm back for a bit.
I had a case of the tesselated nurbs once. The doctor cured me, and I'll not be eating there again.
|11-12-2001, 05:53 PM||#7|
doesn't link have to do with sectors and visibility? IF you put 2 sectors together the joining polygon is alwasy marked link.
|11-12-2001, 10:47 PM||#8|
Joined: Mar 2001
See the Class Help (Part 1 of ?) document (20K in size, see link below), which Davor Hunski wrote some time ago. *Perhaps we can twist Davor's arm and get him to write some more (I'll get an e-mail off to him). *Or perhaps others can tackle this, using Davor's material as an example/starting point. *Perhaps we can impose on Iirion Claus to provide technical review, as he did on Part 1. *And I'll be glad to include any such material in the revised/improved item-by-item, though I would encourage that it be released here as a forum thread or a file download....so as to not be held up waiting for the item-by-item to ship.
(Edited by Michael Harris at 8:17 pm on Nov. 13, 2001)
|11-13-2001, 02:35 PM||#9|
Michael. The link does not work.
I'm back for a bit.
I had a case of the tesselated nurbs once. The doctor cured me, and I'll not be eating there again.
|11-13-2001, 10:28 PM||#10|
Joined: Mar 2001
Hmmmm. Well, I re-pasted the address that works for me into the above message....and it intermittendly works/doesn't work for me.  ossible workaround would be to copy/paste the address into your browser's address bar and see if that will get you there.
As a fallback, and at the risk of abusing the forum, I'm going to post the contents (60K unzipped) into a message just below this one. It will lose some formatting. If doing this causes a problem, administrators/moderators should feel free to remove the posting (worst case, I can e-mail a copy to those who want it....but let's try these two approaches first).
|11-13-2001, 10:29 PM||#11|
Joined: Mar 2001
(the following was written by Croteam's Davor Hunski, with technical review by Iirion Claus and odd and end editing by Michael Harris)
(posted in this fashion due to reports of difficulty in locating/downloading it off of fileplanet)
Classes (Entities) and Properties
Classes (entities) discussed here are those that are present in the Serious Editor's virtual tree or that exist in the Classes directory and can be added to the virtual tree. *Note that some classes (entities) present in the Classes directory are not intended for users' direct use within the editor and cannot be added to the virtual tree (you can try, but they will ultimately not be added).
Units Of Measure: *Measurements in Serious are in meters.
Property Types: *Values stored and edited in classes' (entities') properties are of the following types:
*FLOAT (decimal number)
*BOOL (flag, yes/no, i.e. light switch)
*POINTER (link, relation)
*ENUM (defined set of values i.e. light types: directional, ambient, point,..)
Common Properties *(shared by most entities)
Most entities share some common properties, due to entities being implemented in base classes or added through 'Features' .es coding interface. Some of these properties are listed below
-string property. Almost all entity classes have a Name property. It is used to assign individual names to specified entity(s). It is very important to properly name your important entities, so that you can identify them later. *Names of entities are also used to define clones. Clones are all entities having the same name (the entities don't have to be of the same class).
-pointer to another entity. The Serious engine implements hierarchical linking of entities. Hierarchical structure is obtained by defining relationships between objects. The 'Parent' property is used to target the entity that is parent of the entity being edited. An entity can have only one parent. If one moves a parent, all of its children are moved identically, maintaining their location and orientation relative to the parent. Child entities can be moved freely, without moving their parent. Parenting is important when working with clones. For example, create a few bare columns and assign all of them the same name. This way they become clones. Then, on one column, create a torch with a fire and a light. Form this into a hierarchical structure: set column as parent of torch, torch as parent of fire and light. Apply "update clones" to this column equipped with torch/file/light and all remaining columns having the same name will be replaced by columns equipped with torch/fire/light. *Parenting is also useful for destroying entities during game play. *If you destroy a parent entity, all of its child entities will also be destroyed. Destroy a "parent" column and its torch, fire and light will be destroyed. *Destroy a 'parent" torch and its fire and light will also be destroyed.
-array of flags. All entities have this property. It is an array of editable flags that determine in which game levels of difficulty (easy, normal, hard,...) and game modes (single play, cooperative, deathmatch, ...) an *entity (health, trees, enemy spawners, ....) will exist.
-flag property. Background (skybox) is rendered as viewed from backgroundviewer entity. All entities that have 'Background' property flag set are taken into consideration for rendering when rendering view from backgroundviewer.
-entity pointer. This is also a common property. In general, there are two types of target properties. The first one comes from class CMarker, which is one of the basic .es classes. Its basic purpose is to serve as a position in space, defining a position and an orientation. All classes extracted from CMarker (CPlayerMarker, CBackgroundViewer, CCameraMarker, CGradientMarker,....) share this property due to inheritance behaviour of object programming (higher classes have all properties of classes beneath). Second type of target properties are widely used to link with destination entity that should be notified that source entity has been activated. For example, when you press a switch, through target property (actually named On/Off target) you activate entity that is to perform an action due to switch activation. Or, if you enter an area contained in a touch field entity, the touch field entity detects it and sends event (trigger, activate, start,....) to target entity (i.e. enemy spawner).
-flag property. If this flag isn't set, entity can't be targeted by other entities. This flag exists to prevent typically unwanted numerous entities (such as lights) from appearing as possible targets in target combo boxes. So if you want to perform triggering on such entities (that have the "Targetable" property), you will have to set this flag in order to be able to target it.
- basic brush entity. It is used for 'holding' a world's (or a portion of a world’s) geometry. There can be two types of world base entity: zoning and non-zoning. Zoning are used to define classification of other entities. Non-zoning are usually used to form detailed architecture or distant architecture.
-flag property. It is normally undesirable for the user to be able to move zoning entities, due to the intensive processor calculations involved (such as classification, directional shadow recalculating, portal link setup...). The Anchored flag property is used to prevent user from accidentally moving zoning entities. If an entity has this flag turned on, the user won't be able to move it until tool button 'Anchor' is set on.
Fog 0 *(special case, see end of paragraph)
Fog 1 thru 4
-pointers to fog markers. Makes up to 5 pointers (links) to fog marker entities available to the worldbase’s sectors. Each sector can have one applied fog effect. This effect is used to form all kinds of fogs (thick, dense, dark, colored, orthogonal (vertical) , rotated (shaking), ...). When such a sector is rendered it asks its brush (brushes consist of sectors) to obtain fog parameters of the fog assigned to it via a fog number. That's why worldbase brush has pointers to fog markers. Via these pointers, brushes are able to access fog parameters (color, height, density,...) from fog marker, which must be known for fog rendering. This pointer mechanism is used to link entities with sectors or polygons. *Fog 0 represents every sector's default fog, so setting fog 0 will tell the engine to render fog in each and every sector in the level.
Gradient 0 thru 19
-pointers to gradient markers. To obtain gradient properties, polygons use the same mechanism that is used for obtaining fog properties. A polygon that has a gradient shadow is linked with a gradient marker via its brush. Gradiental shadows are gradients that are applied when a shadow map is generated. They are used to simulate 'radiosity *effect', in which light power falls near ceilings or decreases intensity with distance from illuminating areas (lava).
Gravity 0 thru 9
-pointers to gravity markers. The Serious engine is able to handle multi-directional gravity (6 degrees of freedom). Gravity that influences an entity is the result of the combined efforts of all gravities that are applied to this entity (if entity is classified into more than one sectors). The Gravity pointer property holds a pointer (link) to a gravity marker. A Gravity marker defines parameters for calculating gravity in certain point in space.
Haze 0 *(special case, see end of paragraph)
Haze 1 thru 4
-pointer to haze markers. Works the same way as fog does. It simulates natural phenomena caused by light being reflected from particles in the atmosphere. Use of haze greatly contributes to the reality of the rendered view. Outdoor views rendered without haze look synthetic and unnatural, whereas proper use of haze gives a photo-realistic look. Haze also removes difference between world and background in a such a way that the transition between them is not noticeable. Haze 0 represents every sector's default haze, so setting haze 0 will tell the engine to render haze in each and every sector in the level.
Mirror 0 thru 4
-pointers to mirror markers. Mirror markers are used to define camera origin for rendering warp hole portal. When a polygon is marked as warp hole, it asks its brush to provide warped placement. To obtain warp hole exit camera placement, user has to create two linked mirror markers. Brush is via pointer properties linked to first mirror marker. This first mirror marker targets second one, one that is used to define warp hole exit. To be able to render effect properly, the warp hole rendering system has to use two placements. That's why two mirror markers must be used.
-flag property. If this flag is set, brush is used to define zones. All non-zoning entities (non-brush entities and non-zoning brushes) are classified into zones (sectors). *When classifying non-zoning brush, it is considered to behave as any other non-zoning entity (like bush or item). When it is rendered, all of its sectors (and all of the sectors' polygons) are added into rendering queue. Because a non-zoning brush can't classify entities, a model that is placed inside a non-zoning brush is actually classified into sector of zoning brush that contains the non-zoning brush. And if this sector is visible, model is added to rendering, no matter if it is occluded by non-zoning brush. Example: if you have non-zoning chapel inside one yard, and torch inside chapel, if yard is visible, torch is also visible.
-This entity is level's exit. It is used to create links between two levels. When it is triggered, it starts changing level sequence. One level can host more than one exit (world link) and more than one entrance (player marker). That's why world link has 'Group' property. World name defines which world the player will appear in. *Group name defines which 'PlayerMarker' in that world player will appear at. For example, if player exits level A via world link specifying world B and group "town gates 1", player will appear in level B at player marker having group name of "town gates 1". It is also possible for the player to exit that same level A via world link specifying world B and group "secret channel" and appear in level B at player marker having group name "secret channel".
-string property. It is used to link a 'world link' with a specific 'player marker' in the specified level. World link and player marker that have same group name are linked.
-flag property. If it is set, state of world being exited is saved and will be restored when player re-enters this level. This is very useful when creating several linked levels with multiple exits and need to re-enter one level more than once.
-enum property. There are two types of world links. The first type is relative. It is used to simulate seamless level transition. For example, player enters corridor that looks the same at level A and level B. When level transition is triggered, engine calculates relative offset between player and world link. This offset is kept when player appears at new level, virtually at the same position in the corridor, so the feeling of smooth transition is achieved. * The second type is absolute. *The player appears at the location of the specified player marker, with no offset, regardless of the offset they had from the world link that sent them.
-file property. Used to specify next level. This level is loaded and started when world link is triggered.
Obsolete (explained above)
-Gradient marker is used to define gradient (interpolated color) that is applied as additional shadow. It is used to create more realistic lighting model, since real life light reflects from floors and ceilings, creating shadows that tend to be darker near ceiling and fall gradually towards floor. The same thing happens with illuminating planes, where light intensity falls away from illuminating plane. Position of gradient marker determines origin of gradient. Shadow is interpolated from two given shadow colors along given height. Gradient can also be applied as a dark light, where it is used to remove existing light. Shadow gradients are used to simulate radiosity. See WorldBase->Gradient 0 thru 19 discussion, to find out how gradient markers are linked with polygons (how gradiental shadow can be attached to a polygon).
Color 0 and 1
-color properties. These two colors are used for shadow interpolation. Center of gradient marker is used as origin of interpolation, point where gradient shadow has value defined with color 0. At distance greater or equal to value defined with 'Height' property, shadow has value given through color 1 property. Rotation of entity is also calculated, so angled gradiental shadows are also possible.
-flag property. If this flag is true, gradient is subtracted from, instead of added to, shadow that applies gradiental shadow.
-float number property. Used to define direction and length of gradient. If height is negative, direction of interpolation is changed (gradient is interpolated down from position of gradient marker).
Obsolete (explained above)
This entity is used to define camera origin and direction for rendering backgrounds. One level can have more than one background viewer, but only one can be active at a time. When a game's frame (player's view) is rendered, the engine first renders the background as seen from current background viewer. After background is rendered, engine renders world geometry as seen from player's eyes. The process of rendering the background is exactly the same as when rendering from player's eyes, but the engine processes only entities that have their background flag set. Since the 'background' part of the level is by no means different than any other, it can be as dynamic and complex as you want. This way you can create the feeling of moving on a train or inside a space ship, have birds flying all of the time in the sky,......
-flag property. When one clicks the Active property, it activates the background viewer as the current one. The same happens when a background viewer receives an activate event. It forces that background viewer to become the active one.
World Settings Controller
-pointer to world settings controller (WSC) entity. The WSC entity class has a major role in all interactive environment effects such as earthquake, event-based blending or scrolling, storm, rain... It is used as a stock of variables that determine effects (FX) behavior. If you want to perform an event triggered FX, you should point to WSC with this pointer property. Here is how a complex FX is executed…. An FX (storm) must perform texture transformation or view change according to event that occurs in world (i.e. blend should start when player reaches current point in level). So, engine has to provide mechanism where an event in world (like switch activated or area triggered) produces reaction on geometry (like texture blending or shadow darkening in case of storm). For each frame, a global function in World Base entity class calculates once-per-frame geometry reaction parameters (i.e. current scroll value for scroll applied on cloud polygons or current alpha value for storm blend type->value is 0 when storm is not on, and alpha is max (255) when storm reaches max power). To obtain current power of storm, this function locates current background viewer. Then it peeks 'World Settings Controller' pointer from property that we try to explain in this section. This global function can read state of WSC entity. In the case of a storm, when Storm controller (entity used for controlling storm FX) is triggered, it locates WSC (using same mechanism: get current background viewer, get WSC pointer from it) and changes WSC variables that control state of the storm (lets say that storm controller marks in WSC that storm has started in time xx:yy:zz). Now, on each rendering, global function of world base will locate WSC via this pointer in background viewer and will know current storm power (can be easily calculated from current time and storm start time).
Source of light. Serious Engine's light engine supports these light types: directional lights (sun, parallel beams, casts shadows), shadow gradients (controlled via gradient markers) and point lights. Point lights can either cast shadows (normal point light) or ambient light (doesn't cast shadows). All lights can be set to be dark, which means that they will subtract light instead of adding it (inverse color logic: white color will extract all light). So, if you want to darken the corner of a room, you can add dark light in that corner. Point lights have two ranges: fall-off and hot-spot. Inside hot-spot range light has maximum influence, influence that falls to 0 at fall-off. Real-life lights can't be realistically simulated using linear interpolation. That's why diffusion light distribution is used by default. Light can be animated and can be assigned to hold lens flare and/or lens reflections.
Ambient light animation
-enumerated animations. You can browse one of animations from animation file browsed under 'Ambient light animation file'. Lights can animate both ambient and diffuse component. This animation can be changed later using animation changer.
Ambient light animation file
-animation file. You browse animation file here. When you do so, you can select one of file's animations under 'Ambient light animation' property. Light animation file can be edited and manipulated with light animation editor from within Serious Editor.
-float number property. Serious Engine does not use ray-casting algorithms for shadow mass calculation. *Instead, it uses the much faster in-game scene rendering ASER algorithm that is used when rendering normal frame. That's why you can move point lights and have shadows updated in real-time. Clip near and clip far properties hold values that define distance of near and far clip planes that are used for scene rendering. Usually, you don't have to change these numbers. Only change this when you experience strange artifacts in shadow rendering when light is placed near wall or a model. Adjust and recalculate shadows until shadow are ok.
-float number property. Explained under 'Clip far' section.
-color property. Defines color of light. Color's alpha value has no meaning. When light casts light to a polygon, light's intensity is interpolated from color given through this property (from hot spot distance) down to no influence at all (at hot spot distance). The influence of all lights that have impact on a polygon are calculated into a special texture called a shadow map. When a polygon is rendered on the screen, this shadow map texture is mixed with polygon's basic texture(s) and then rendered. This is the way the engine displays shadows. If we now take a close look at what happens at just one rendered pixel, where one texture's pixel and one shadow map's pixel are combined, we could observe the following: if shadow map's pixel color is gray (R=128, G=128, B=128), then texture pixels isn't changed at all. For shadow map pixel values below gray, texture is darkened. *For values above gray, texture is brightened. Brightening gives impression of strong light influence. One can experiment with wide range of light colors and get interesting results. Formula for mixing texture and shadow map is: result=texture*shadow map*2.
So, when we have gray shadow map (value 128, half from white, max influence which is 256), one channel's result will be calculated as: *y=x*128/256*2, further: y=x*256/256 which is equal to multiplying with 1, resulting in y=x. Therefore, gray shadow value leaves texture as is. If we have light gray shadow map, value 192, result will be calculated as follows: y=x*192/256*2, y=1.5*x. That means that at shadow map value of 192, brightness of texture pixel will be 50% increased. For shadow map value 64, combined pixel will have halved texture's value. When shadow map lightens texture, it is said that it has over-brightening influence.
-flag property. If this flag is set, color doesn't add light to polygons, it subtracts it. This type of light doesn’t exist in nature, but is useful when we want to lower the lightness of an area. Dark lights work with inverse logic: black color of dark light has no influence, where white color sucks out all existing light when creating an shadow map.
-flag property. Real life light spreading is well simulated with lights that have diffusion flag set. To calculate a specific point in shadow map for diffusive light, Serious Engine calculates not only light source-shadow map pixels distance influence, but also influence of light ray's entering angle. Lights that don't have diffusion flag set ignore entering ray angle's influence.
-color property. Used for directional lights only. This color defines lighting of areas that are not seen by directional light's rays. Real life atmosphere produces ambient color that gravitates toward blue (because of blue color of sky).
-flag property. This flag should be set for moving lights. This causes the engine to invoke special optimization for dynamic lights. Dynamic lights can't simulate diffusion behavior.
-float number property. Defines distance from light's source (in meters) where light's influence ends.
-float number property. Defines distance from light's source (in meters) within which light has maximum influence. Light's intensity is applied with maximum light's power inside hot spot and is then interpolated down to nothing at fall off range, where light's influence ends.
-enum property. When seen through objects with lenses (cameras), lights appear to have glaring rings around them. These are called lens flares. Serious Engine allows you to add as much lens flare types. With this property you can assign one of several offered types to a certain light. Serious Engine implements lens FX power drop when light is near center of view.
Lens flare only
-flag property. If this flag is set, light's lens flare effect is rendered, but light’s lighting influence is discarded. This way you can create a background sun that displays lens flare with reflections but that has no lighting influence, while having a 'real' sun light cast sun beams somewhere else (where is more appropriate for the user).
-enumerated animations. This works just like ambient light animation, but is applied to the normal (diffuse) component of light, not ambient.
Light animation file
-animation file. See previous property description.
Light animation offset
-float number, representing time in seconds. Given time is added to time when animation has started, forming time offset. Use this property when you want to remove synchronization from some lights that are animated with same animation. By altering this property on an array of lights, you can achieve a traveling light effect.
-enumerated illumination types. If you want to simulate illuminating polygons, you should set some kind of illumination type. If you set illumination type xxx for a light, it will cast rays only trough polygons that have same illumination type set. For example, you can use light illumination for a corridor where vitrajes (colored glass) casts light from outside.
Render as small
-flag property. Light is seen as a small star, rather than a light of significant size, in Serious Editor's view that renders editor models. Normally, as a light has a greater fall-off, its rendered size in the editor grows. Sometimes, if you have many lights in a level, it can get pretty crowded. If you set this flag, light's editor model will be rendered as small and won't get in the way when you need to see and select other entities.
Subtract sector ambient
-flag property. Set this flag *to smoothen differences in ambient lightning between areas that are influenced with directional light and those that are not. By setting subtract sector ambient flag, you can achieve a subtle sun influence effect, where sun rays don't create sharp edge, but rather a smooth edge as sun power drops while entering dark area inside architecture. For advanced users only. Use to polish lightning in your levels.
-enumerated light types. Select between available light types: directional (distant lights, parallel beams), ambient (point light that doesn't cast shadows) and point light (cast shadows). There are two modifications with prefix strong: strong ambient and strong point light. These lights automatically set hot spot at 90% of fall off distance.
Controls player spawning. It is used to link with world link from previous level, via name given through Group property. Each level can have more than one level exit and entrance, due to their being matched via group name. Up to 16 players can be spawned on one player marker simultaneously. In Serious Editor, the player marker is displayed as race start checkered flag with bottom divided into 16 colored areas. Each area the is spawn point for a player (i.e. coop player). When a player marker is triggered, it becomes active one for re-spawning on the same level. In a Serious Sam coop game, when the party leader enters an area, player marker is triggered and set to be checkpoint. Next re-spawned player will be placed on last checkpoint, and will have spawn attributes taken from that player marker. On player marker, you can set both masks for weapons and ammo that will be added to a player, and masks for removing ammo or weapons (if some weapon is brought from previous level and should be removed).
-ulong mask. Combination of bits representing weapons. Players have these weapons when they are spawned at the player marker. The weapons mask is actually a bit field, with each weapon having one bit: The knife is 1, the Colt is 2, the Double Colt is 4, the Shotgun is 8, Double Shotgun is 16, the Tommygun is 32, the Minigun is 64, the Rocket Launcher is 128, the Grenades Launcher is 256, the Laser Rifle is
8192, and the Iron Cannon is 32768. If you want the player to gain or lose specific weapons, simply add the numbers; for example, a double colt and shotgun is 4+8=12. On the First Encounter, the Knife and Colt are always given to the player.
-string property. Used to match world link (previous level's exit) with player marker (level's entrance). If you set same group name (xxx) on world link in level A and on player marker in level B, when player exits level A via world link having group named xxx, they will appear in level B, on player marker having group named xxx.
-float number. When player is spawned, they receive this amount of health.
Max ammo rate
-float number. When player is spawned, they receive amount of ammo given though this property. Note that there is a minimum- for example, 10 shells for the shotgun.
-entity pointer. Points to a MessageHolder entity that will be loaded as soon as the player enters the game. The player will have to call NETRICSA in order to read the message, so mark the "Start in computer" property if you want the level to start with the message.
-flag. Used to mark this player marker to be used exclusively in Serious Editor. It is used to distinguish editor test markers from regular in-game player markers. You can freely move this player marker around your editing level, so as to be able to conveniently test various areas’ game play.
-float number. When player is spawned, they receives amount of shield given through this property.
Start in computer
-flag property. NETRICSA (Sam's implanted computer) will be called when player is spawned.
-ulong mask. Combination of flags, where each set flag represents one ammunition type to be taken from player upon spawning.
-ulong mask. Combination of flags, where each set flag represents one weapon to be taken from player upon spawning.
-entity pointer. Entity targeted trough this property is triggered when player is spawned on player marker.
The main entity class used for placing models into a level. Each content model (not enemy or item) that needs to be placed in level will have one model holder. To add a model into world, drop ModelHolder2 entity and adjust its properties to fit your needs. Use Model property to browse and select model. Class auto loads textures as lastly saved in Serious Editor. You can browse and select texture via Texture property. Modelholder2 class allows you to adjust model's shading, to set destruction behavior, turn on collision, stretch it, adjust mipping (level of detail) distance switching,...
-flag property. If you set this flag off, model will be invisible in game, but will still be visible in Serious Editor. You can set it visible inside game by sending Activate event to it.
-color. Models in Serious Editor are lit with ambient color and diffuse light color. In un-customized model shading mode, light direction, ambient and light color are calculated as resulting influence of the lights that surround the model. This shading model allows models to fit the world seamlessly as long as the level doesn't feature over-brightening. Due to older hardware’s inability to apply over-brightening onto interpolated shading, models can't have over-brightening, as world's polygons can. That's why sometimes it seems that models are darker than surrounding environment. Sometimes you want to add more drama to the lighting of a model and it can get tricky trying not to spoil the level's lightning. ModelHolder2 allows you to set your own shading for models. To do so, you have to set custom shading property to "Full customized". Then you adjust ambient shading component with the Ambient color property that we are describing here, change diffuse light component with "Light color" property and adjust light direction with "Light direction" property.
-color. Here you set diffuse component of light when you use customized shading as described in description of previous property.
-vector property. This property is used to define the direction which will be used to lighten model.
Apply RND stretch
-flag property. When you set this property, model is resized according to random stretch factors. Flag is automatically cleared, so this property serves as some kind of *'Randomize again' button.
-flag property. If this flag is set (by default), model automatically loads attachments that are saved within the .ini file saved when Serious Modeler saves a model.
-file property. You can browse and select bump texture for your model here. Bump texture adds detail to model's main texture (i.e. wood skin).
-float property. Serious Engine uses a model's bounding box (box that collects all of the model's vertices) to classify it into sectors. When rendering sectors, if a sector becomes visible, models that are classified into it also become visible and are added to rendering queue. Sometimes you wish to 'unclassify' a model from some sectors. For example, if you create yard sector with 8 meters surrounding walls, and you have palms that are 12 or more meters high, they will be classified into both the yard sector and the sector above it. The sector above the yard sector is visible from a huge distance and, because the palm is classified into it, whenever this high sector is visible, the palm is rendered. That's the case if you don't tweak (read cheat) the model's classification. This property, classification stretch, is used to tweak model's classification. It represents number, actually ratio ranging from 0 to 1, that will be used to scale down model's bounding box before it is used for classification. If you set classification stretch of 0.5 to our 12-meter palm, it will be classified the same as a 6-meter palm would be. Now it will be classified only into yard's sector, and will be contained into upper sector.
-flag property. If this flag is cleared, players and other moving entities won't collide with the model. A modern engine should be able to perform two collision detections: 'normal' physical collision (model to model and model to brush) and ray cast (bullet hit) collisions. Serious Engine's physical collision engine is based upon colliding with a model's oriented collision box, which is approximated with group of spheres. It is important to note the 'oriented' collision box, a mechanism that allows multiple gravities and a whole range of other physical effects. For ray cast collision, you can choose between exact, per polygon ray cast, and approximate, but much faster, ray cast algorithm.
-enumerated custom shading types. Here you can take control of model holder's shading and adjust shading parameters manually. In addition to normal un-customized shading model (where shading is left for engine to handle), there are two more shading models: fully customized and so-called constant shading. Up to now, we described fully customized shading where you provide separate color for ambient and color for diffuse shading component. Sometimes, however, you would like to erase shading effect and leave only lighting influence. In that case you should use "constant shading" setting.
-entity pointer. An interactive engine should provide gamers the ability of destroying models. For example, one should be allowed to blow up trees, stones, statues, torches,... Modelholder2 implements destroying feature through model destruction entity. With this 'Destruction' property, you can target model destruction entity. This entity holds 'exploding data' info. When certain criteria are achieved, such as if model is hit so bad that destroy health provided by model destruction is reached, model 'explodes'. The engine then uses data stored in model destruction to form an exploding effect (i.e. type of debris) and to switch to next destroy phase, because model destruction points to next model holder 2 that can have its own model destruction. Through this model holder-model destruction chain you can have as many destruction phases as you wish (i.e. statue without head, statue without head and upper part of torso,...).
-entity pointer. When an model is destroyed, entity linked trough this property is triggered with trigger event. You can use this feature for numerous purposes. For example, you can activate secret door when a statue is destroyed (or you can spawn some enemies .
-enumerated animations. A model's shading can also be animated, so you can have all kinds of model's lighting behavior (i.e. flickering, colored light dancing, pulsating,...). Model holder's model can be animated using the same interface as for animating light: with one property you browse light animation file and with another (described here) you select one animation from animation file. Light animation can be changed later within game using animation changer. Just to remind you, a light animation file can be edited and manipulated with the light animation editor from within Serious Editor.
Light animation file
-file property. Here you browse and select one of your animation files as described in previous property section.
-float number. Serious Engine uses level of detail (LOD) for the models, and we call it mip-modeling (term is based on texture's mip-mapping effect, where texture switches to lower mip map on certain distance). Mip models are variations of the same model that differ in number of polygons. To speed up rendering of a model, engine uses lower mip model (one with less polygons) for rendering when model reaches certain distance. Since model is smaller on the screen, it doesn't need so many polygons for rendering. If model is even further away, engine will take next available mip model, and so on, and so on. These mip switching distances are defined within Serious Modeler, but sometimes you want to adjust this distance. Mip add and Mip mul properties are used for this purpose. Mip factor is number that engine uses to determine which mip model to use for rendering. Mip factor is heavily dependent upon model's distance from camera, but is also changed when resolution is changed. For the sake of simplicity, we can calculate that mip factor is a logarithm of base 2 of current model's distance. So, if model is 64 meters away, mip factor will be around 6. Let's imagine an unrealistic example where we have 10 mip models, each switching at next whole mip factor value (1,2,3,4,5...). So, for mip factor value of 6, engine would display mip model no 6. If we set this mip add property to certain value greather than 0, let's say 2, 2 will be added to original mip factor before determining which mip model to use for rendering, add we would get mip model 8 (6+2=8) instead of 6, so we achieved earlier mip switching by increasing mip add factor. To be more precise, we scrolled mip switching towards camera. Mip mul factor is used to stretch mip switching factor, not to scroll them. This way, if we set mip mul factor to 1.5, at distance that is represented with mip factor 6, engine will choose mip model 9 instead of 6 (6*1.5=9).
-float number. Explained under previous section.
Mip Fade dist
-float number. There is another way to setup mip model disappearing that will result in rendering speedup. It is implemented trough "mip fade dist" and "mip fade len" properties. These two also act using current mip factor (explained under "Mip add" chapter). They are used to define mip factor where model will start to disappear (using blending) and mip factor where model will completely disappear. If we use example from previous chapter, and set "Mip fade dist" to 6, "Mip fade len" to 2, model will start to disappear at mip factor (cca 64m) 6 and will completely disappear at mip factor 8 (cca 256 m). This can be very useful for larger number of objects. For example, if you would like to render an area full of trees, you could use this fading interface. You can set tree model's fading out distance (which is much more tolerable than mip model's "plopping" and add some haze to cover it. You will get smoother disappearing and much faster rendering.
Mip Fade Len
-float number. Explained under previous section.
-file property. Here you can browse and select model holder's model. Once you select it, engine will try to open model's .ini file and automatically set textures that model was saved with from Serious Modeler. If model holder's attachments flag is set (defined via attachments property), engine will also try to automatically add attachments that were attached to most recently saved model.
-enumerated model animations. When you browse and select a model via 'Model' property, animations that are featured for selected model appear under this property and can be selected. You can change these animations later with animation changer. For example, you can have statue of liberty model holding torch up and when you activate a switch, lady can start waving with the torch. Important point: in Serious Engine, animations do not take any time to calculate. So you can have thousands of animated models and they will take exactly the same time to render as if they weren’t animated. So, make your levels alive (all trees can move affected by the wind, flags can wave, ...).
-file property. Here you can browse for and select reflection texture for a model.
-enumerated shadow casting types. Models can cast different types of shadows: no shadows, cluster shadows and polygonal shadows. When you choose cluster shadows, models will behave exactly as if they were built as brushes, casting their shape onto the shadow map, and shadow will be blurred. If you choose polygonal shadows, all of the model's polygons will be projected onto polygon nearest to the model holder's handle and you will see the exact shape of the model. Edges will be sharp, and some polygons will be overlapped and will produce darker shadow areas.
-file property. Here you can browse specularity texture for a model.
-float factors. When you browse for and select a model, via the 'Model' property, the model will have a size that was defined inside Serious Modeler. Usually you want to stretch model to better fit your world. If you want to decrease the model’s size, you should set value less than 1 for "Stretch All". If you want to double model in size, set 2 for “Stretch All”.. You can stretch one or more components of a model. This way you can create taller or fatter models. If you set negative value as a stretch, let's say stretch x = -1, model will be mirrored around given axis (around x). This way you can create two mirrored guardians, each one to guard one side of an gate. Resulting stretch will be combination of all influences: if axis stretches are x=2, y=1, z=1, and Stretch All=3, model will be stretched 6 times along x, 3 times along y and z.
Stretch RND All/X/Y/Z
-float factors. These factors are used to define how much of random stretch will be applied to original stretch defined using Stretch All/X/Y/Z properties. Random factors define percentage, percentage of original stretch that is allowed random range. For example, if you set "Stretch RND All" to 0.1, you allowed random in range of +-10% of original model's stretch. If we have a palm that is 12 meters high, and we set "Stretch RND All" to 0.1, we allowed stretch sized from 12-1.2 up to 12+1.2. Random x,y,z *work in the same way, but are applied only to according coordinates. Random stretch is not applied when these properties are changed, but when "Apply RND stretch" flag is set. You can think of this flag setting just like pushing "Randomize again" button.
-file property. Here you can browse and select model's main texture.
-enumerated main model's texture animations. All textures in Serious Engine can be animated. *So can model's main texture. Sometimes a texture file holds more than one animation and here you can select one of animations available for main model's texture.
This entity class is used to 'hold' data that is used in the moment of model holder destruction. It tells the type of debris (i.e. flying rocks or broken wood) to be sprayed around, how big and numerous will they be, what amount of health has to be taken from *model until it explodes, specifies next broken phase, bullet hit particles (little stones that are sprayed when you hit them with guns,...). You can read more about process of model destruction under "ModelHolder2->Destruction" property (property that is used to target this entity). Note that a model holder that uses only one model destruction entity isn't reinitialized when a model destruction property is changed. So, if you want destroyable model to apply changes made in model destruction, you have to reinitialize it (change any of its properties, i.e. click twice on Active property)
-enumerated body types. Here you can change body type for model. Only "Rock" body type has an influence, that of inability of weapons utilizing bullets (guns, machine guns) to destroy the model. Other body types make no difference in current implementation.
-enumerated debris types. Debris are the pieces of model left after model's destruction. Select what kind of debris the destroyed model will leave after explosion: stones, palm parts, wood.
-integer number. How many pieces of debris of type selected with "Debris" property will model leave after exploding.
-float number. Here you define size of debris that model will leave after being destroyed.
-float number. This property tells model's virtual health. When you hurt model that uses this within certain period with damage that is greater than specified here, described property model will explode. Note that health regenerates over time. *Only damage impulses applied within a certain amount of time is counted.
-entity pointers. Through these 5 entity pointers you can provide up to 5 different versions of next broken phase. If you set pointers 0,1& 2 and not set 3&4, engine will randomly choose one from first three model holders and will replace original one with it. Note that if you set phase 4 and not set phase 3, engine won't take into consideration phase 4. *A broken phase is actually a modelholder2 entity. This next phase's modelholder2 can have its own model destruction, thus forming model holder-model destruction chain with an unlimited number of broken phases.
-enumerated particle types. Select type of objects that will be sprayed when model holder is hit but not destroyed (i.e. little stones sprayed from stone statues or wood parts broken from and tree).
Functionality of world settings controller class is also described under "BackgroundViewer->World Settings Controller" section. World settings controller (WSC) entity usually appears only once in a level. It serves as a holder for data needed by some complex interactive effects that are to be performed on the level (i.e. storm or room morphing). WSC also enables you to set height map and define box that height map refers to. Height map is grayscale picture where bright pixels represent high areas, and dark ones low areas. “Height map” is the term widely used in terrain displacing applications. This height map is actually a Z-buffer of level saved from above (for those who know what Z-buffer is). You can save height map for certain area with Serious Editor: select polygons that will define axis aligned height map box and select "Export displace map". Select file name to hold saved height map. Bounding box that this height map represents is dumped into SED's console. Browse for and select exported height map under "Height map" property and type dumped values under "Height map box". Height map is used for procedural particle rendering (rain or grass). You wouldn't like rain to fall under roof. That's why you have height map of a level, which can be understood as a 'rain map' in this case. This grayscale picture mapped into world coordinates (that's what height map box is for) determines heights for certain area of your level. So, when the engine renders a rain drop, it looks into rain map's y coordinate and if rain drop's y coordinate is above, it will be rendered, otherwise it won't.
-file property. Here you browse for and select a height map.
Height map box
-bounding box property. Here you set min and max coordinates for each axis, defining a boxed volume area. Height map is mapped onto this box, where first left pixel is mapped onto min x,z coordinates, lower right height map's pixel is mapped onto box's max x,z position. Engine then extracts y coordinate according to mapped pixel's color where black pixels are mapped onto bottom of box, white onto roof. Since one color component is one byte, you can have 256 distinct values for y. Along x and z coordinate you have texture size proportional to the number of values: the bigger the height map is (in pixels), the more precision you will have, since each pixel will be mapped onto smaller world area.
Used to provide parameters for fog effect rendering. Serious engine is able to create fully dynamic real time gradiental wall of fog with almost no penalty. Fog marker is connected with brush via fog pointer interface explained under "World Base->Fog 0-4" section.
Fog is rendered using fog table that is calculated and uploaded each rendered frame. This table contains two dimensions. Size of fog table is given through 'Size Depth' and 'Size Distance' parameters. The bigger this table is, the more time it takes to calculate and upload, but also the more precise fog effect that results. It is a tradeoff: quality vs. speed.
The table's first dimension contains info about fog behavior at certain vertical distance from fog marker. This dimension is called depth dimension, because fog is rendered as gradient along y coordinate (if fog marker isn't rotated). Three parameters define how depth fog table data is mapped onto world. And note that this table covers world's area much larger than visible fog layer itself. *It should map onto entire area that can be seen from within the fog. Objects that fall outside mapped area when seen from within fog won't be rendered correctly. Parameter 'above' is used to define height above fog marker. Parameter 'depth' stands for height of area covered by fog, calculated from fog marker position downward. Note that fog is rendered from fog marker, downwards! 'Below' defines height of area below fog layer.
To make it easier to understand, you should imagine a room 60 x 60 meters. Now imagine that we slice it into three horizontal layers, one laying on another. Lowest layer is 10 meters high, middle one is 20 meters high and topmost is 30 meters high. If we want our fog to cover only middle layer, we should place gradient marker on the border of middle and upper layer. Thus we should supply 30 for 'above', 20 for ‘depth’ and 10 for ‘below’. Don't forget that an object contained within range limited by above and below heights will be rendered correctly when seen from inside the fog. So, then, how is our room's fog table mapped? If we, for example, set 'Size depth' to 64 we would get 64 pixels mapped onto 60 meters (above+depth+below) giving approximately one pixel for one meter of world area defined with fog marker (but only 1/3 of pixels will be used to describe 20 meters of second layer, layer that actually contains fog).
Second dimension contains data describing how the fog acts relative to viewer position. It contains info about fog behavior along central view frustum line. View frustum or view pyramid is pyramid that starts in viewer's eye and spreads 45 degrees left, right, up and down from central view frustum line. Table's second dimension describes how fog is changed along central view frustum line. Since this line has start, fog's mapping line length is given through one property: Far. This property stands for: how far away from viewer along sight line will fog table be mapped.
index property. Defines width of fog table (texture) in pixels.
index property. Defines height of fog table (texture) in pixels.
-float numbers. Described above. Used to define height fog table mapping area.
-float number. Described above. Used to define maximum distance (length of view frustum) in world coordinates, distance that is mapped with fog table's second dimension.
-enumerated functions. SE supports these attenuation types: exp (exponential), exp2 (square exponential), linear. Use this property to select function that will be used for density decreasing. All three functions have one alterable parameter (i.e. line angle for linear function) given through density property.
-float value. By modifying this value you change function's control parameter and thus changing function step (degree, curvature). If you want to directly define this density function parameter, you should set "Density Direct" flag property and enter density value here. If you, however, want to define density (attenuation type's function step controlling parameter) using distance and percentage (i.e. at distance 100 m percentage is 75%), you should clear "Density Direct" flag and adjust values for "Density Distance" and "Density Percentage". By setting density direct flag, you can note that value for density will be only be reset if you change it. Otherwise, value for density is calculated using values under "Density Distance" and "Density Percentage" properties.
-flag property. Defines how density value will be calculated: directly (using value entered under Density property) or using values under "Density Distance" and "Density Percentage" properties.
-float property. Described above.
-float property. Described above.
-enumerated functions. You can choose between constant, linear and exponential functions. By default, border between fog and non-fog area is sharp (constant). That means that if you are inside fog and you are looking parallel to fog plane, and you start walking out of the fog, you will be able to see sharp line where fog area ends. To achieve smooth fog border you should have non-constant gradation type. This way, when entering fog, view will be smoothly fogged through some period of time and you won't even know when you entered fog. Gradation is edited the same way as density is: under "Gradation Type" you select function, under "Gradation" you set function step (control parameter, function 'angle') either directly or using "percentage at distance" logic (this logic is on when you clear "Gradation Direct" flag).
-float value. This is function control parameter. You can define it directly (if "Gradation Direct" flag is set) or using "Gradation Distance" and "Gradation Percentage" properties (if "Gradation Direct" flag is cleared).
-flag property. Explained above.
-float property. Described above.
-float property. Described above.
-color property. Here you change fog color and fog power multiplier (alpha channel). Fog power multiplier is used to decrease fogging. Alpha 0-255 are translated into power multiply factors ranging from 0 to 1. For alpha value of 255 (translates as 1), fog won't be changed at all. For alpha value of 128 (translates as 0.5), you will halve fog power. This way when object is completely in fog, its fogging will be halved. For alpha value of 0 (translates as 0), fog effect won't be visible.
(Edited by Michael Harris at 8:34 pm on Nov. 13, 2001)
|11-14-2001, 10:05 AM||#12|
Thanks. I'll fix it up and keep it.
I'm back for a bit.
I had a case of the tesselated nurbs once. The doctor cured me, and I'll not be eating there again.
|11-16-2001, 08:30 AM||#14|
Seriously Sexy, yes... But so is the code of Serious Editor.
Should I ever become an evil overlord, my force-field generators would be located inside the shield they generate.
|Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)|
|Thread Tools||Search this Thread|
|Display Modes||Rate This Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Serious Sam First and Second Contact will be converted for Serious Engine 2 ?||BlackDeath||Serious Sam 2||6||11-02-2005 11:17 AM|
|Croteam. I am sorry, but I was disappointed in Serious Sam 2.||Kwipper||Serious Sam 2||23||10-19-2005 07:19 AM|
|2K Games' Serious Sam 2 Info||Rodzilla||News & Announcements||22||05-11-2005 08:02 PM|
|Serious Sam Fantasy Hockey League....||Sarge||Off Topic Forum||122||09-13-2003 11:13 AM|