Jump to content


Photo

Stupid Questions


  • Please log in to reply
14 replies to this topic

#1 dteviot

dteviot

    Programming Department

  • [Xenocide Senior Members]
  • 1,479 posts

Posted 01 February 2006 - 01:21 PM

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
Saving the world from the scum of the universe is hard work. Especially when you have to create the scum to begin with.

#2 Garo

Garo

    Programming Department

  • Xenocide Programming Department
  • 119 posts

Posted 01 February 2006 - 01:38 PM

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

<{POST_SNAPBACK}>


As far as I know, only Hangar is 2x2 and everything else is 1x1.

- Garo

#3 Guest_Azrael_*

Guest_Azrael_*
  • Guests

Posted 01 February 2006 - 02:06 PM

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

<{POST_SNAPBACK}>


As far as I know, only Hangar is 2x2 and everything else is 1x1.

- Garo

<{POST_SNAPBACK}>

That is correct :)

#4 dteviot

dteviot

    Programming Department

  • [Xenocide Senior Members]
  • 1,479 posts

Posted 01 February 2006 - 07:02 PM

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

<{POST_SNAPBACK}>


As far as I know, only Hangar is 2x2 and everything else is 1x1.

- Garo

<{POST_SNAPBACK}>

That is correct :)

<{POST_SNAPBACK}>

Thanks.
Saving the world from the scum of the universe is hard work. Especially when you have to create the scum to begin with.

#5 dteviot

dteviot

    Programming Department

  • [Xenocide Senior Members]
  • 1,479 posts

Posted 25 December 2006 - 02:39 PM

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.
Saving the world from the scum of the universe is hard work. Especially when you have to create the scum to begin with.

#6 Vaaish

Vaaish

    Artwork Department

  • Xenocide Inactive
  • 1,625 posts

Posted 25 December 2006 - 04:38 PM

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, 25 December 2006 - 04:43 PM.


#7 Lars W

Lars W

    Sergeant

  • Xenocide Programming Department
  • 21 posts

Posted 25 December 2006 - 04:56 PM

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.
Attached File  assault_rifle_col.jpg   2.25K   98 downloads
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:
Attached File  assault_rifle_spec.jpg   2.85K   81 downloads
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

#8 Vaaish

Vaaish

    Artwork Department

  • Xenocide Inactive
  • 1,625 posts

Posted 25 December 2006 - 05:53 PM

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, 25 December 2006 - 06:03 PM.


#9 Lars W

Lars W

    Sergeant

  • Xenocide Programming Department
  • 21 posts

Posted 26 December 2006 - 10:14 AM

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

#10 Vaaish

Vaaish

    Artwork Department

  • Xenocide Inactive
  • 1,625 posts

Posted 26 December 2006 - 10:59 AM


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 to export it and see what happens.

#11 dteviot

dteviot

    Programming Department

  • [Xenocide Senior Members]
  • 1,479 posts

Posted 26 December 2006 - 11:41 AM

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".
Saving the world from the scum of the universe is hard work. Especially when you have to create the scum to begin with.

#12 Vaaish

Vaaish

    Artwork Department

  • Xenocide Inactive
  • 1,625 posts

Posted 26 December 2006 - 05:11 PM

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, 26 December 2006 - 05:29 PM.


#13 Lars W

Lars W

    Sergeant

  • Xenocide Programming Department
  • 21 posts

Posted 27 December 2006 - 05:29 AM

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

#14 red knight

red knight

    Xenocide Project Leader

  • Xenocide Inactive
  • 3,310 posts

Posted 27 December 2006 - 08:50 AM

Just for a detail, older cards today are Pixel Shader 2.0 cards... so they are fully capable to handling rendering procedures like Bump Mapping, Gloss Mapping, etc.

Greetings
Red Knight
Sourceforge Nick: flois - Federico Andres Lois
Visit my blog at: flois.blogspot.com

Posted Image

Pookie cover me, I am going in.

#15 Vaaish

Vaaish

    Artwork Department

  • Xenocide Inactive
  • 1,625 posts

Posted 27 December 2006 - 08:51 AM


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.