Aller au contenu

Photo

Questions about making LOD files


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

#1
Raven Darkholme

Raven Darkholme
  • Members
  • 64 messages

Hello everyone,

I'm porting Sims hairstyles since a while for Dragon Age Origins but I have still problems with making the LOD2 and LOD3 files.

I'm using Blender 2.49b and the "Poly reducer" script which maintains the shape, texture and weights.

I think I'm making still errors because people have ingame hair which vanishes at a certain distance into the head or it floats above.

 

Now my noob questions:

 

1. Is there a kind of thumb rule how much I have to reduce? For example a hairmesh has:

LOD 0= 6000 faces.. the other LOD versions would have then: (50% and then 75% reduced)?

LOD 2= 3000

LOD 3= 1500

 

2. Then the textures:

I'm exporting them as a tga. file which includes the normalmap (nm), alpha and diffuse in one file.

I know that for the LOD2 and LOD3 version there is no need to have a nm.

Does that mean it's better to export the hair texture file as seperate dds files when I make the different  LOD textures?

 

Has somebody a tip for me? That would be great!

Thank you!

 

 


  • luna1124 aime ceci

#2
DarthParametric

DarthParametric
  • Members
  • 1 409 messages

If you are talking about keeping weights, I assume you are not rigging them to the LOD2 and 3 rigs then? If so, that's why they are disappearing.


  • Raven Darkholme et luna1124 aiment ceci

#3
Raven Darkholme

Raven Darkholme
  • Members
  • 64 messages
That's my approach:
- Lod0 version: Make my port, replace it with a vanilla hair mesh, edit the files.
- I delete the bone weight of my finished port
- then I load the Lod2 version of the vanilla mesh I have used as the replacer hair for the Lod0 version
- Copy the bone weight of the Lod2 mesh on my port
- Then I use the Blender poly reducer
- replace the mesh
- save
- edit the files

The factor I use for the poly reducer is 0.233 to make the Lod2 version. I'm not sure if this is the correct value... and by the creators, I can't trace back how I came to this result.
  • luna1124 aime ceci

#4
DarthParametric

DarthParametric
  • Members
  • 1 409 messages

You might have to post your exported models. I don't use Blender, so I can't speak to its inner workings. I do know that NewByPower's Blender script is not as proficient as Eshme's Max script, so there could be something flaky going on at that end.


  • Raven Darkholme et luna1124 aiment ceci

#5
Raven Darkholme

Raven Darkholme
  • Members
  • 64 messages

Thank you very much for your help DarthParametric!!

I can still upload the files if somebody is interested in but I think we have found the culprit :D

 

This is the hairstyle in Blender (LOD0)

Spoiler

 

 

 

and so looks the hair after I have reduced the polygons with the Blender script.

Spoiler

 

as you can see there are a lot of holes and parts missing. :o

I always thought that's okay because you don't need the full mesh at a certain distance. :facepalm:

 

I'm using now MeshLab to reduce the polygons and I could reduce them from originally over 8000 face to 3400 without getting any holes in the mesh etc.

I've tested the hair ingame at the camp... and I didn't get the "head eats hair" effect.

I'm exporting the hair as an.obj and load it in MeshLab, make the reducing and export it again as an obj. Load it in Blender, copy the bone weight of a LOD2 mesh and so on...

 

Looks like the problem were the reduced polygons. :)


  • luna1124 aime ceci

#6
DarthParametric

DarthParametric
  • Members
  • 1 409 messages

You shouldn't need any fancy weighting for a short hairstyle like that, at least for LOD2 & 3. Just weight all verts to the head bone.



#7
Raven Darkholme

Raven Darkholme
  • Members
  • 64 messages

Yep, I usually use for the short styles only the head bone with a weight of 1... and in most scences etc. it works.

I need the meshlab only for reducing the polygons and to keep the shape and structure of the mesh which will be destroyed with the "poly reducer option" of Blender. :)

So  many interesting things to learn when you start to work with a 3d graphic software. :D


  • luna1124 aime ceci

#8
DarthParametric

DarthParametric
  • Members
  • 1 409 messages

Automated decimation utilities are rarely much good in my experience. It's usually better just to model a new low poly from scratch. And to be honest, for DA hair, unless you have some crazy super high poly LOD0 model, which seems unlikely, I'd probably just reuse the same model for all 3 LODs and just down-res the textures. Hair is already pretty light weight poly-wise to begin with, generally consisting of a bunch of simple planes.


  • Raven Darkholme aime ceci

#9
Raven Darkholme

Raven Darkholme
  • Members
  • 64 messages

Hello, I had to come back, I still have problems to make working LOD2 files. *hangs head*

 

When the ported hairstyle has only one bone I have no  problems to make the LOD2 files. I just make a bone weight copy with the vanilla hairstyle'S LOD2 version and reduce the polygon. (Sim hair has often a very high polygon count.)

 

Here is an example of what I'm working on. It's for my new mod.

 

Spoiler

 

 

 I created  a "replacer hairstyle" with 3 chunks which I can use for all my hairstyles with an accessory.

HairM1: scalp

HairM2: the ported hairstyle

HairM3: chunk for an accessory

 

Everything works fine. Hair and flower wreath show up in the toolset and in game. No problem with the LOD0 and the bone weight is acceptable. :)

 

I could stop here most players aren't bothered about some flying hairstyles e.g. in campand and I can release the mod only with the LOD0 files but I don't want to do that. It's a kind of personal challenge and I want to make my ports as best as I can therefore I need the LOD2's.

 

... but I can't get them to work. I'm testing the LOD2 versions on Morrigan at the camp and after a certain distances the hairs isn't attached anymore to her head.

I have tested to use the LOD0 files and just renamed them with the _2.mmh suffix or down-res the textures,.. but after I compared my files with older hair mods ( Ren, Lotc etc.) I saw that Ren was using still the same bones for the LODand LOD2 version. I always thought that the LOD2 version is using less bones?

I have tried it like Ren did and used for the LOD2 version just the reduced polygon hairstyle with exactly the same bones like the LOD0 version.. but no success.

 

but if I would reduce them to only the head bone the bone weight of the LOD2 version wouldn't be correct anymore.

I saw that the added chunks in all older hair mods have one option enabled which my " replacer hair" hasn't and I don't know how to do so because I can't change there something in Blender and that let me think I have to change something in the mmh. or/ and msh. files.

 

It's this option in Newbypowers script: the Pos=f32. The description of this option says:

(chunk use Float32 instead of Float16 for Vertex Position (Typically heads)

 

iSUPBAiMNXIxs.JPG

 

I have no clue what that's mean. :unsure:

I have found in the wiki toolset an article about the mmh and msh file structure but after reading it several times my head started to explode. :D

 

I would be great if somebody has a tip for me!.. and of course I can post a downloadlink for the files.

Thanks a lot!



#10
DarthParametric

DarthParametric
  • Members
  • 1 409 messages

Yes, as I have said before, LOD2 and 3 both use progressively less bones in their rigs than LOD0. You need to re-rig the meshes to each skeleton, not try and repurpose the LOD0 rig. Trying to do so results in the sort of things you describe. For 2/3, just weight everything to the head bone. You don't need anything fancy, even with long hair/dangly bits, as you are not going to see it at a distance.


  • Raven Darkholme aime ceci

#11
Raven Darkholme

Raven Darkholme
  • Members
  • 64 messages

I'm an idiot! :facepalm:

I had forgotten to set the referenz mmh of the LOD2 vanilla hair I'm using for the replacement in Blender/ Newbypowers import/export script.

I've made a replacer hair LOD2 version which has 3 chunks like the LOD0 version I've made and I can keep the bone weight of the hair like it is weighted for the LOD0 version.

Now, it works at least in my testing area in the camp but I had really to go far away that the engine switched to the LOD2 version. It's now a smooth switch and not like before with the wrong LOD2 files which just popped up. :D

 

Thank you very much for your help and your patience with me! Without your help and input I wouldn't have been able to improve my mod! :)



#12
DarthParametric

DarthParametric
  • Members
  • 1 409 messages

I think pretty much all your problems (and similar problems in a lot of other mods) is down to the way the Blender script works. You'd probably be better served using Eshme's script in GMax.



#13
Raven Darkholme

Raven Darkholme
  • Members
  • 64 messages

I've heard/ read that Newbypower's script seems to have some issues but I don't know which ones exactly. I have zero knowledge about python and how to write scripts.

For example, at the moment I don't know if the script isn't working correct or if I have made a mistake: during the " add chunk process" or when I'm editing the mmh file or if it's an error of the Toolset.

that my hair ports with an accessory gets red coloured (I mean only the accessory) when I'm switching in the Toolset /morph editor the grid off and on.. I want to make toolset screenies without the grid..

[Edit]..but now it suddenly works correct. :blink:

 

I'm working at the moment on my update and on the new mod and I haven't much time to start with a new 3d computer graphics software. I tried GMax at first but I had problems with the installation of Eshmes script and so I switched to Blender. :)

I think I struggle sometimes with Blender and the script because of my little understanding of Blender and of the options which the script offers. It's a lot of trial and error and reading in Blender forums and here on the BSN site... but maybe when I have more time I will give GMax another try. :D



#14
DarthParametric

DarthParametric
  • Members
  • 1 409 messages

It's funny. I used to rate Max/GMax as pretty much the worst interface of any app I'd used. Until I tried Blender.

 

The problem with NewByPower's script is not so much the script itself, coding-wise. It's the way it tries to piggyback on existing files for exports.