Jump to content
XCOMUFO & Xenocide

Stupid Questions


dteviot

Recommended Posts

1. Has anyone here seen this?

http://aoi.sourceforge.net/

Art of Illusion is a full featured 3D modeling, rendering, and animation studio. It is written entirely in Java, and can run on almost any operating system.

 

2. Can someone please tell me which of these facilities are 1x1 and which 2x2? Thanks.

FAC_LONG_RANGE_NEUDAR

FAC_TACHYON_EMISSIONS_DETECTOR

FAC_PSIONIC_TRAINING_FACILITY

FAC_MISSILE_DEFENSE_ARRAY

FAC_LASER_DEFENSE_ARRAY

FAC_PLASMA_DEFENSE_ARRAY

FAC_GAIA_DEFENSE_ARRAY

FAC_GRAVITY_SHIELD_FACILITY

FAC_NEURAL_SHIELDING_FACILITY

Link to comment
Share on other sites

  • 10 months later...

Now that we’re starting to put the models into XNet, I’ve noticed that they have different orientations, and I think they also have different origins. Lars has commented that they have different scales as well.

 

If I’m mistaken about this, I apologise for wasting people’s time. However, if I’m correct, then in order to simplify rendering scenes, it would be a good idea if we could standardize these things.

For example, if we could agree that the origin for a weapon is the trigger. That should simplify matters when it comes to putting a weapon in someone’s hand. Giving all weapons the same scale and orientation would also help.

 

And agreeing on standard orientation, scale and origin for other things, like aliens, and craft would also help.

Link to comment
Share on other sites

Now that we’re starting to put the models into XNet, I’ve noticed that they have different orientations, and I think they also have different origins. Lars has commented that they have different scales as well.

 

If I’m mistaken about this, I apologise for wasting people’s time. However, if I’m correct, then in order to simplify rendering scenes, it would be a good idea if we could standardize these things.

For example, if we could agree that the origin for a weapon is the trigger. That should simplify matters when it comes to putting a weapon in someone’s hand. Giving all weapons the same scale and orientation would also help.

 

And agreeing on standard orientation, scale and origin for other things, like aliens, and craft would also help.

 

I was afraid this was going to happen.... These are supposed to be standard :)

 

origin point: I've been setting it to the middle of the grip for hte one I did but it shouldn't be hard to set it to the trigger.

 

orientations.... you will probably notice the orientation problem with the 3dsmax models vs the blender models. Blender ones are rotated 90 degrees off the 3dsmax ones... which ones are coming in rightside up? Blender models are made with the Z axis up and I think max is with the y axis up. that should account for the weirdness in orientation.

 

scale is going to be a problem ince it seems that each program interprets scale slightly differently. all of the blender models are scaled correctly to a 1x2 meter block and should come in correctly.

 

the max base facilities should be good too but no guarantees. the max character models should be good, but again no guarantees. the max weapons havent been scaled yet so they are probably huge in comparison to everything else.

 

if you can check against this and see which ones are problems and post them here so we can track it down it would help.

Edited by Vaaish
Link to comment
Share on other sites

I would also like to add some things, because in some occasions you are to good in texturing the models :-)

 

There are some models which already have bump maps, and i take the Assault Rifle as example:

 

The thing with models that use bump mapping is that color map really is a color map so there should be no lighting information in them, no highlights, no shadows. The follwing is a closeup of the color texture. You see three places where it is wrong here.

assault_rifle_col.jpg

First the safe trigger, here it is made lighter at the top and darker on the bottom, to simulate light from above. But that is exactly the thing that bumpmapping does. The second thing is the muzzle, the ring with black inside. On the ring specular lighting is simulated, which should be done by the specular lighting calculations from the game. The specular map would give this area a level of specularity.

The third thing is the grip. Here we have the same case as with the safe trigger. Here it should not be similar gray, but a bit of dirt on the corners and maybe all over the grip area could be done here.

 

So what should the color texture look like? all the same gray color because its nearly all the same material?

No! Stuff like markers and dirt is needed on the color map in addition to the base color. And also keep in mind that the base color of the texture is the color of the object when fully illuminated. So don't be to dark (black should be a no-no for large areas).

 

But before you think oh no everything for nothing! A combined texture will be needed for older graphic cards.

 

Now for specular maps:

assault_rifle_spec.jpg

the basic principle is, black areas wont receive specular lighting, so that would simulate materials like bricks or other kind of stones. white areas receive full specular lighting, something like chrome. In the specular texture above this works well for the safe trigger and the muzzle. But for the grip i would not see any reason that the specular values change in the grip. maybe because of dirt in there, but even then it should be more constant. The specular irregularity then comes from the bump mapping.

Also there should be no gradients in specular maps, cause that would be really unrealistic. of course areas where dirt is on a shiny surface there is change in specularity, but is not in a soft falloff.

 

Then finally to the incandescence maps (or glow maps). No there is nothing wrong here :-)

Its just a question for simplification. wouldn't it be enough to encode those in grayscales? Cause the color would come from the color map.

 

And finally it would be really nice to also have common lighting equation. At the moment i used something like the following:

 

incandescence-map + (diffuse-light * color-map) + (specular-light^shininess * specular-map)

 

Where the two light terms are affected by the normal-map (generated from the bump-map) and shininess is a constant value at the moment.

 

Variation with a grayscale incandescence-map:

incandescence-map * color-map + (diffuse-light * color-map) + (specular-light^shininess * specular-map)

 

Or there could also be another variation in the specular term, the shininess (the size of the bright spot) could also be modified per texture (at least on Pixel Shader 2 and above Hardware).

Those could be both encoded in a grayscale map each.

 

But it must be said which map represents what. And also the defaults if one map is not used (example defaults: black for incandescence, gray for specular, gray for color and a flat-surface for bump map)

 

greetings and nice holidays

Lars

Link to comment
Share on other sites

The thing with models that use bump mapping is that color map really is a color map so there should be no lighting information in them, no highlights, no shadows. The follwing is a closeup of the color texture. You see three places where it is wrong here. First the safe trigger, here it is made lighter at the top and darker on the bottom, to simulate light from above. But that is exactly the thing that bumpmapping does. The second thing is the muzzle, the ring with black inside. On the ring specular lighting is simulated, which should be done by the specular lighting calculations from the game. The specular map would give this area a level of specularity. The third thing is the grip. Here we have the same case as with the safe trigger. Here it should not be similar gray, but a bit of dirt on the corners and maybe all over the grip area could be done here.

 

normally you are correct, however, it is intentional since the light in the col map alone doesn't produce elevation, and the bump map isn't enough to ensure the detail is seen. same for the front of the weapon. basically the information each of these locations complements each other to give a better effect than each alone could give :) you will see this pop up from time to time to add to the overall effect. If you look at the final renders you see what I mean.

 

 

So what should the color texture look like? all the same gray color because its nearly all the same material?

No! Stuff like markers and dirt is needed on the color map in addition to the base color. And also keep in mind that the base color of the texture is the color of the object when fully illuminated. So don't be to dark (black should be a no-no for large areas).

 

well again this depends greatly on WHAT you want it to look like. a brand spanking new assault rifle won't have any dirt on it and if you look at most assault rifles there really isn't much color on them. Because of this I've picked a dark gunmetal grey for the color and added highlights to it. A color map (or more properly a diffuse map) should contain coloring, detailing that is not modeled in, basic highlights, and basic "texture".

 

But before you think oh no everything for nothing! A combined texture will be needed for older graphic cards.

 

shouldn't older cards just ignore the bump and spec maps and use the basic material spec settings and color map?

 

the basic principle is, black areas wont receive specular lighting, so that would simulate materials like bricks or other kind of stones. white areas receive full specular lighting, something like chrome. In the specular texture above this works well for the safe trigger and the muzzle. But for the grip i would not see any reason that the specular values change in the grip. maybe because of dirt in there, but even then it should be more constant. The specular irregularity then comes from the bump mapping.

Also there should be no gradients in specular maps, cause that would be really unrealistic. of course areas where dirt is on a shiny surface there is change in specularity, but is not in a soft falloff.

 

True, but almost no object has NO specular whatsoever so a better base color would be what ever the majority of your models shinyness is. In this case, matte plastic gives a different specular than a matte finish weapon. again I disagree, bumpmaping is only one part. it creates the raised parts but you shouldn't have the same specular on the top of the bumps as you do on the valleys since these ridges will be more worn and give a shiny appearance while the valleys won't. Gradients can be used to emulate irregular wear patterns on an object or even a partially glossed object. you keep looking at the individual parts and forget how they combine into a complete whole. The point of creating a material is to emulate a real world object not to view each map on its own. Trust me there are reasons for why they look the way they do, it may not fit exatly with a textbook delineation between the maps but together they work to create a realistic material.

 

Then finally to the incandescence maps (or glow maps). No there is nothing wrong here :-)

Its just a question for simplification. wouldn't it be enough to encode those in grayscales? Cause the color would come from the color map.

it doesn't matter if each is in color or in greyscale, each texture is applied in a separate slot and should not bleed through to the others. eg a color map should not mix with a bump map to create a modified color map.

 

It seems you are attempting to use the textures and materials in a method that is contrary to how every or almost every 3d program on the planet works.

 

as near as I can tell, the material should be exported with with the model when you export to ogre. at that point you shouldn't need to do anything to it since ogre already has al the stuff to handle the material. I don't understand why this is being so complex... you should have simply this:

 

the material- contains all the setting and textures needed to emulate the substance a mesh is made of

textures-

color map: defines the difuse color of the object based on UV coords

spec map: defines the shinyness of an object based on white/black levels at uv coords

bump map: difines fake raised and depressed areas based on white/black levels at uv coords

incan map: defines segments that are illuminated when no light is on them based on UV coords and black/white vaules.

 

eve if it doesn't it should just be a simple matter of taking the material and just plugging in each of hte proper textures and leaving it alone.

 

But it must be said which map represents what. And also the defaults if one map is not used (example defaults: black for incandescence, gray for specular, gray for color and a flat-surface for bump map)

 

its very simple, it should say something like modelname-col.png or modelname-spec.png

 

black always represents the lowest value and white the highest for bump, spec, and incan.

 

if no map is used in one slot it should be black since there is no value and we don't want any efect on the model.

 

basically what I'm saying is just put them in as they are and if it doesn't look like the preview render for each model let us know and we can fix it.

Edited by Vaaish
Link to comment
Share on other sites

basically what I'm saying is just put them in as they are and if it doesn't look like the preview render for each model let us know and we can fix it.

 

I would love to do this, and that was my first plan, but it did not work. I was searching for some models in the Assets SVN i could include in XNET but did not found any mesh files. So i took the blender-files i found and converted them myself. The material export was very disappointing. The material was just one ripped out of a bump mapping example, and it did not inlcude the specular map. It also has some problems with rendering errors (at least with the assault rifle). It also misses alternate rendering techniques for different graphics hardware.

So i made a generic shader which can include all available textures and produce something that looks similar to the renders.

 

But if you do the materials that would be nice too, for fast previewing you can use a little viewer app i made:

Mesh Viewer It is rather large, but should include everything needed by the app (DLLs, default resource and so on, if not give me a word)

 

The viewer opens the mesh file you select, it needs all textures/materials/programs to be in the same directory as the mesh (not required for default stuff).

I also packed up the resources i use for my materials in a ZIP file they are also in the xenocide svn, but so they are all together.

 

This way you can look how you're models look with the generated materials and my materials. Maybe its the exporter i use thats wrong, maybe its better to not directly export from blender, or maybe i am just to stupid to use it ;-).

 

But i will be happy if you Art guys can supply us with finished .mesh and .material files that we can just plug in.

Oh, don't forget the -t switch on OgreMeshConverter so that tangents are created.

 

greets

Lars

Link to comment
Share on other sites

basically what I'm saying is just put them in as they are and if it doesn't look like the preview render for each model let us know and we can fix it.

 

I would love to do this, and that was my first plan, but it did not work. I was searching for some models in the Assets SVN i could include in XNET but did not found any mesh files. So i took the blender-files i found and converted them myself. The material export was very disappointing. The material was just one ripped out of a bump mapping example, and it did not inlcude the specular map. It also has some problems with rendering errors (at least with the assault rifle). It also misses alternate rendering techniques for different graphics hardware.

So i made a generic shader which can include all available textures and produce something that looks similar to the renders.

 

But if you do the materials that would be nice too, for fast previewing you can use a little viewer app i made:

Mesh Viewer It is rather large, but should include everything needed by the app (DLLs, default resource and so on, if not give me a word)

 

The viewer opens the mesh file you select, it needs all textures/materials/programs to be in the same directory as the mesh (not required for default stuff).

I also packed up the resources i use for my materials in a ZIP file they are also in the xenocide svn, but so they are all together.

 

This way you can look how you're models look with the generated materials and my materials. Maybe its the exporter i use thats wrong, maybe its better to not directly export from blender, or maybe i am just to stupid to use it ;-).

 

But i will be happy if you Art guys can supply us with finished .mesh and .material files that we can just plug in.

Oh, don't forget the -t switch on OgreMeshConverter so that tangents are created.

 

greets

Lars

 

meh... <_ ok so i guess this is going to be more fun than it should be.... let me attempt export and see what happens.>

Link to comment
Share on other sites

origin point: I've been setting it to the middle of the grip for hte one I did but it shouldn't be hard to set it to the trigger.

Either middle of grip or middle of trigger will work. The important bits are:

1. We need a "common origin" for all "carryable" items.

2. Ideally this would be the point where we "attach" the item to the soldier's "hand".

Link to comment
Share on other sites

lets use the middle of the grip since thats what should be centered in the hand.

 

I tried to export from blender unfortunately I can't seem to get either the meshview posted here or the xml converter to work.... so I opened up the files in notepad... for the most part the material looks ok just it seems that its only exporting the color texture and none of the others.... it also appears that we have run into the bane of opensource once more... one guy working on it who can't finish it and noone else to actually do anything. eg... all the stuff we need is on his todo list but never done.

 

soo... anyone want to code me a quick and dirty proper export for materials that actually pulls all the variables?

 

another option would be to make a generic material file that has slots for the color spec bump and emit maps that we could just replace a placeholder name for each with the correct material name for the object and texture and see if that works instead of attempting to export each material in a cripled state.

Edited by Vaaish
Link to comment
Share on other sites

another option would be to make a generic material file that has slots for the color spec bump and emit maps that we could just replace a placeholder name for each with the correct material name for the object and texture and see if that works instead of attempting to export each material in a cripled state.

 

I have done this, to integrate the models into X-Net. So it is basically there but would need tweaking. for some of the parameters, but for that it would be good if you could see the model in the ogre viewer. What kind of problems did you have running the mesh-viewer?

Maybe we can discuss most of it in the IRC-channel?

 

greetings

Lars

Link to comment
Share on other sites

another option would be to make a generic material file that has slots for the color spec bump and emit maps that we could just replace a placeholder name for each with the correct material name for the object and texture and see if that works instead of attempting to export each material in a cripled state.

 

I have done this, to integrate the models into X-Net. So it is basically there but would need tweaking. for some of the parameters, but for that it would be good if you could see the model in the ogre viewer. What kind of problems did you have running the mesh-viewer?

Maybe we can discuss most of it in the IRC-channel?

 

greetings

Lars

 

you should be good with the default material if everything is set to a very low number or 0 and then controled by the texture maps. here are the values it exported with the assault rifle:

 

ambient 0.500000 0.500000 0.500000 1.000000

diffuse 0.800000 0.800000 0.800000 1.000000

specular 0.000000 0.000000 0.000000 1.000000 25.000000

emissive 0.000000 0.000000 0.000000 1.000000

 

as for the error.... THe app has failed to start because the config was incorrect, please reinstall.

Link to comment
Share on other sites

×
×
  • Create New...