Aller au contenu

Photo

Model Oddities


  • Veuillez vous connecter pour répondre
65 réponses à ce sujet

#26
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
I've got it up on the Project page. I'll add you to the Project group so you can grab it.

#27
tmp7704

tmp7704
  • Members
  • 11 156 messages
Hmm ok, i've downloaded the file and imported that into Lightwave. There doesn't appear to be anything wrong with it -- the smoothing appears ok. I thought maybe the Blender exporter does something weird like adding the vertex colour data, but it doesn't seem to be the case.

I'll see about exporting this mesh from Lightwave, you can check then if it also gives you problems if you want.

edit: you can grab the re-export here, http://social.biowar...ct_file_id=4289  i took the liberty to set the smoothing groups up but it shouldn't cause problems, hopefully.

Modifié par tmp7704, 06 mai 2010 - 06:04 .


#28
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
Hm, I loaded the game with this mesh, and the sword didn't appear in game at all. Did the group names within the mesh change when you imported it into LW?

#29
tmp7704

tmp7704
  • Members
  • 11 156 messages
Mhm the group/surface name on import was "MshMain0_w_asw_wara_0". It is the only chunk the model had defined, as far as i can tell. If your .mmh file for that sword is using different surface name that could explain the invisibility.

#30
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
Even after you put it through LW the colors came back wrong.



I uploaded a version that's ONLY been through GMAX, with the smoothing groups set. This one comes back with the colors correct, but when converted to MSH by Taz's tools it looks like it's setting one smoothing group for the entire sword. Dunno if you can see anything if you compare it to the MSH run through blender or not. At the very least run it through whatever export process you're using for Lightwave and see if that gets the smoothing groups right. It certainly APPEARS that LW retained them on the Blender version I uploaded before, so I'm hopeful...

#31
tmp7704

tmp7704
  • Members
  • 11 156 messages
I did something different, actually.

Posted Image

this is the sword mesh exported from Lightwave, with 'blank' material applied to it -- white texture, flat normal map, no specular map, no tint. As you can see, there is actually no difference in hue to any part of the item.

This makes me conclude whatever change in colour you are seeing on your end is likely a result of applied texture maps, and so perhaps this is what you should inspect more closely..?

#32
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
Ok, how's THIS for bizzare. The NORMAL map is causing it.

Removed all textures from the MAO, and added them back one at a time. With the Diffuse and Spec it's fine, but as soon as I re-added the Normal map the colors went crazy.

Modifié par Ambaryerno, 07 mai 2010 - 01:04 .


#33
tmp7704

tmp7704
  • Members
  • 11 156 messages
OK, this is what it looks like for me if i use your diffuse map (i re-used it as specular map too, though probably cranked the spec one too far down)

Posted Image

I've dropped .zip file with this version here so you can see how it shows for you: http://social.biowar...ct_file_id=4295   It replaces regular dwarf longsword since that was the fastest way to get it in game.

#34
tmp7704

tmp7704
  • Members
  • 11 156 messages

Ambaryerno wrote...

Ok, how's THIS for bizzare. The NORMAL map is causing it.

Removed all textures from the MAO, and added them back one at a time. With the Diffuse and Spec it's fine, but as soon as I re-added the Normal map the colors went crazy.

How is your normal map made?

DA stores its data for normal vectors in Green and Alpha channel. For simplicity you can consider RGB greyscale to be X and Alpha to be Y for the vectors, with Z calculated from these two values.  It is possible your normal map is causing the game to modify the vertex normals so they point say, upwards, and the yellow hue you're seeing is additional colouration from the light source (the Sun)

#35
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
I created a grayscale image with a solid background, and the surfaces for dings, chips, texture of the grip, and the raised details on the pommel and guard (the griffins and dragon) in varying shades of light and dark as appropriate. I then used a converter to turn this into an RGB Normal Map. However I've tried it in this format, as well as turning it into a pure grayscale image and both cause the same effect.



However if I'm understanding you right, the Normal map should only make use of two channels: Green and Alpha. Neither graphics program I'm using, an old version of Corel PhotoPaint and Paint.Net, are capable of working with Alpha. PhotoPaint (PhotoPaint 8, which I got for free a LONG time ago) CAN do separate RGB channels, however that still leaves me unable to edit the Alpha layer.

#36
tmp7704

tmp7704
  • Members
  • 11 156 messages

Ambaryerno wrote...

I created a grayscale image with a solid background, and the surfaces for dings, chips, texture of the grip, and the raised details on the pommel and guard (the griffins and dragon) in varying shades of light and dark as appropriate. I then used a converter to turn this into an RGB Normal Map. However I've tried it in this format, as well as turning it into a pure grayscale image and both cause the same effect.

However if I'm understanding you right, the Normal map should only make use of two channels: Green and Alpha. Neither graphics program I'm using, an old version of Corel PhotoPaint and Paint.Net, are capable of working with Alpha. PhotoPaint (PhotoPaint 8, which I got for free a LONG time ago) CAN do separate RGB channels, however that still leaves me unable to edit the Alpha layer.

Not sure if i follow your work process well, but if i understand it you create a bump map first and then convert it to regular normal map (these appear mostly bluish in colour)? If that's right, then you'd need one extra step -- copy the Red Channel of your normal map to its Alpha channel, and then save that as .dds file, typically with DXT5 compression.

For the channel manipulation, i think Gimp (a free painting program) can do that, as well as handle the .dds import/export. Someone also posted a link recently on this forums to dedicated converter which can change regular normal maps to DA ones, but the Search is acting up and i cannot find it.

edit: ah, found it: http://social.biowar...2497962#2502851

Modifié par tmp7704, 07 mai 2010 - 02:11 .


#37
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
I've tried using Gimp in the past. And I thought Blender was going to have a learning curve....



BTW, I used that program to convert my map and it's PARTIALLY working. The color issue went away, however I don't think the converter is handling my Normal maps very well at all. It comes out quite pixelated with a partially transparent background, and the end result causes my spec map to behave bizarrely in the game (mostly making some things far more specular than they should be whereas it's fine without the normal map....)



I think the best approach would be to create them correctly from the start. So what do I do, setthe Green channel from the Normal map as Green in the new map with Red as the Alpha, and nothing in the Red and Blue channels?

#38
tmp7704

tmp7704
  • Members
  • 11 156 messages

Ambaryerno wrote...

I think the best approach would be to create them correctly from the start. So what do I do, setthe Green channel from the Normal map as Green in the new map with Red as the Alpha, and nothing in the Red and Blue channels?

Basically yes. The DA maps have the content of Green channel also duplicated in both Red and Blue, so together these channels form a greyscale image rather than shades of green one, but think that's optional.

That said, if it was quite a while since you've used Gimp it may be worth to check it out again, i think they worked on making it more user-friendly. At a glance it's quite Photoshop-like now so simple manipulations like copying content of channels should be pretty doable in it.

Modifié par tmp7704, 07 mai 2010 - 03:32 .


#39
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
Well crap. I copied the Green channel to Red and Blue, and the original Red channel to Alpha (I'm just ASSUMING I've done it right, mind you) and I'm right back to the colors being frelled again, plus the effect of the normal itself isn't what it should be now.

#40
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
Ok, I figured out what was wrong with my Normal Map, so that's working correctly AND the colors are right. Woo-hoo! (would have been SO much less of a pain if DA:O had just used a regular Normal Map...) Unfortunately now I have part of my sword that's turned all glittery.



If it's not one thing it's another....

#41
tmp7704

tmp7704
  • Members
  • 11 156 messages
Out of curiosity, what was wrong with the normal map and how did you fix it? Posted Image

#42
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
Originally I tried to edit the channels directly, but I guess I can't do what I needed to that way. So then after some Google searching I discovered that to do what I wanted, I needed to Decompose the image, then Compose again.
Unfortunately now I'm left with two new problems: I appear to have lost a LOT of the detail on the Normal map, and one half of the model looks like it's covered in glitter. This happens regardless of which direction the light source is, and it's always the same side (in this case, the side facing AWAY from the character when it's equipped). However the normal map is still semi-transparent, (from the Alpha layer) so I'm going to try adding a solid background layer when I get home and see if that helps.
Incidentally, when looking through textures I exported from the toolset there ARE some objects that use a traditional RGB normal map. I haven't tried loading one of these into Gimp and breaking down the channels yet, (it was VERY late when I finally got this working, and I had to work this AM) but what's the difference between these and the grayscale maps?

#43
tmp7704

tmp7704
  • Members
  • 11 156 messages

Ambaryerno wrote...

Incidentally, when looking through textures I exported from the toolset there ARE some objects that use a traditional RGB normal map. I haven't tried loading one of these into Gimp and breaking down the channels yet, (it was VERY late when I finally got this working, and I had to work this AM) but what's the difference between these and the grayscale maps?

Don't know really, haven't yet see default model using a map like that. I was playing mostly with the armour and/or weapon models, though.

#44
DarthParametric

DarthParametric
  • Members
  • 1 409 messages
The only thing that uses (or can use) regular normal maps as far as I know is the terrain editor. All the game models use the greyscale normal maps.



If you have detail issues that likely relates to the DDS conversion/export process. What did you output them as?

#45
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
DDS, DXT5 compression

#46
tmp7704

tmp7704
  • Members
  • 11 156 messages
It's possible your normal map is simply too harsh, that is, has too much contrast/direction change between nearby pixels. See what happens if you edit your image by either reducing the contrast or overlaying some amount of 50% grey over the original data (both for the RGB and the Alpha channel, obviously)

#47
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
It's getting there. The latest problem was partially because the Normal map got inverted when I converted to using the Green and Alpha channels, so stuff that should have been sunken were now raised, and vice-versa.

The glittery surface issue remains...

Posted Image

The spec map for the grip is virtually black. These two shots were taken from the same camera angle under the same light source, the only difference is that in one the character is moving towards the camera, and in the other is moving away. As you can see, regardless of which way the character is facing the surface of the grip that points out from the character is ALWAYS sparkly.

It's much more prominent and distracting in the game.

Modifié par Ambaryerno, 07 mai 2010 - 06:19 .


#48
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
FYI a transparent image means nothing. The way this normal map is used is completely different than a normal image. The reason they use only 2 channels is because basis vectors are always orthogonal so they can construct the third with the two they save in the texture giving more space to store them. The alpha channel is NOT used for transparency in a normal map.

#49
tmp7704

tmp7704
  • Members
  • 11 156 messages

Ambaryerno wrote...

The spec map for the grip is virtually black. These two shots were taken from the same camera angle under the same light source, the only difference is that in one the character is moving towards the camera, and in the other is moving away. As you can see, regardless of which way the character is facing the surface of the grip that points out from the character is ALWAYS sparkly.

It's much more prominent and distracting in the game.

edit 2

it appears the strength of specular reflection is determined by the content of alpha channel of your image. Load some of the default weapon textures and check them out for example of that. The handle part has alpha channel pretty much black, while the blade part of the alpha channel is much lighter shade of grey. So the brighter the alpha channel, the stronger specular highlight.

Modifié par tmp7704, 07 mai 2010 - 10:58 .


#50
-Semper-

-Semper-
  • Members
  • 2 256 messages
the rgb channel of the specmap determines the reflection color, the alpha channel the specular intensity.