News:

SMFNew Installed

+-+-

User+-

Welcome, Guest.
Please login or register.
 
 
 

Login with your social network

Forgot your password?

Site Stats+-

Members
Total Members: 728
Latest: Cho
New This Month: 0
New This Week: 0
New Today: 0
Stats
Total Posts: 10932
Total Topics: 795
Most Online Today: 389
Most Online Ever: 854
(September 18, 2024, 07:49:37 am)
Users Online
Members: 0
Guests: 287
Total: 287

Author Topic: My Blender Journey :P  (Read 12404 times)

0 Members and 7 Guests are viewing this topic.

Re: My Blender Journey :P
« Reply #30 on: »
the dusho exporter won't export multiple materials for one mesh, and will only work with the first one
Based on my experience, materials does not need for export. The 3d model automatically gets materials for appropriate submeshes with the same name. Technically, 3d model in .mesh format stores only the submesh information.
Like this:
<submeshes>
        <submesh material="any_submesh_name"

These materials(in Blender) only allow properly create *.MATERIAL file. In most cases, I create this *.MATERIAL file manually.

« Last Edit: January 01, 2017, 08:36:36 am by Kva3imoda »

Re: My Blender Journey :P
« Reply #31 on: »
the dusho exporter won't export multiple materials for one mesh, and will only work with the first one
Based on my experience, materials does not need for export. The 3d model automatically gets materials for appropriate submeshes with the same name. Technically, 3d model in .mesh format stores only the submesh information.
Like this:
<submeshes>
        <submesh material="any_submesh_name"

These materials(in Blender) only allow properly create *.MATERIAL file. In most cases, I create this *.MATERIAL file manually.

Yes but if you check the .material file, you will see the material name and it's properties (alpha, difusse, texture, etc.) but this materials are 1 per sub-mesh object. You can check this by joining all the parts from an armor model and export it, since you exported only one object, you will end up with one material for all the parts.

Re: My Blender Journey :P
« Reply #32 on: »
Wow thanks SO much guys for the added info; I love it when I'm able to pick up new knowledge from the experts!

I thought of reducing the Material of the Submesh to just 1, because it seemed the efficient way to me. So I tried to "unlink" (right-click on Material name) the HuM_DHPlate/Scalp Material from the model.  But when I tried to export I got this error message...

Spoiler (hover to show)

Since I could not understand this :P I decided to try just playing with the .MATERIAL file.

I left both Materials in the .MATERIAL file but tried using the helmet texture for the HuM_DHPlate/Scalp Material and it worked!



Then I read Anarch's post...

...the dusho exporter won't export multiple materials for one mesh, and will only work with the first one...

So I tried removing the HuM_DHPlate/Helmet Material and leaving only the HuM_DHPlate/Scalp Material, still using the helmet texture file and it also worked (same result as the pic above).

I will probably try to go for a full set export using what I've learned so far - one more set for Anarch's TL1 Armors Mod!

P.S.
It bothers me a little that (a) there are unnecessary Materials in the model and (b) the Material name in the .MATERIAL file is the wrong one :P (should be /Helmet not /Scalp).

I think I will also try NOT to use "joining meshes" and instead I will directly assign Mesh parts to Bones with weight-painting. I am hoping this will allow me to remove the unnecessary Submeshes AND their Materials safely, resulting in a "cleaner" model and .MATERIAL file.

Pls comment or correct me!
« Last Edit: January 01, 2017, 07:37:19 pm by Phanjam »


Re: My Blender Journey :P
« Reply #33 on: »
Vkoslak posted in this thread about an update he made to Dusho's TL Mesh import/export script, which I moved over here.

Here's a quote of his post (visit the moved topic above to DL his updated script ;) )
I know scripting, but knowing the blender api stuff...

I took a quick look. Line 706 is where things start:

        materialName = ob.name
        if len(ob.data.materials)>0:
            materialName = ob.data.materials[0].name       

For a test I made a cube with half red and half white as 2 materials.
Dusho's script errors out. Probably because I didn't put textures on it.

I used the regular Ogre3d exporter and it worked. What it does is split the materials into their own submeshes.

I'm pretty sure the def bCollectMeshData(meshData, selectedObjects, applyModifiers): method can be changed to loop over the materials and separate them into the submeshes the same way ogre3d exporter does.

I'll give it a try after some coffee.

EDIT:  I got it working!  See attached.

Things I changed:
I put a checkbox on to the exporter for "Enable by Material". Default is old behavior.
Added code so that it supports exporting a single mesh with multiple materials as submeshes.
If exporting by material, submesh material names are taken from the actual material name, not the mesh data name.
Now supports multiple textures per material.

There is a catch to the export by material.  If you are exporting more than one object and a single material is used more than once, it will probably not do what you want.  I was thinking it should combine the meshes assigned to the same material?

Anyways, give it a try. Let me know if it needs any tweaks.

@Vkoslak I'm kinda blown away this thread pushed you into making a new imp/exp script for Blender  ??? :D

Thanks so much for this and I will test soon as I can.

Would you be okay if I also post your script in its own thread in the "Tools" section of this site?
« Last Edit: January 01, 2017, 07:49:14 pm by Phanjam »


Re: My Blender Journey :P
« Reply #34 on: »
Sure thing. It's just some edits to Dusho's script.

If I'm really going to mess with it, I should put it in source control on github.

Re: My Blender Journey :P
« Reply #35 on: »
Sure thing. It's just some edits to Dusho's script.

If I'm really going to mess with it, I should put it in source control on github.

Okay I moved it over ;) just wanted to ask though - what would be the advantage of being able to export multiple Materials for a Mesh?
« Last Edit: January 01, 2017, 08:12:45 pm by Phanjam »


Re: My Blender Journey :P
« Reply #36 on: »
One thing you could do would be to just have one mesh instead of all the pieces. Then you assign pieces via the materials.

Re: My Blender Journey :P
« Reply #37 on: »
Sure thing. It's just some edits to Dusho's script.

If I'm really going to mess with it, I should put it in source control on github.

Okay I moved it over ;) just wanted to ask though - what would be the advantage of being able to export multiple Materials for a Mesh?

The efect of normals, that's the shading effect, with one mesh with multiple materials the blender won't recalculate the normals on the edges and you are going to have a uniform shading on all the unions, you can see that this doesn't happen with the heads I made for the destro, you will notice in the forehead/scalp shading specially. It's a minor thing, so I never asked for it before  :D

Re: My Blender Journey :P
« Reply #38 on: »
Hi everyone!

I'm getting the hang of moving/rotating/scaling in edit mode to put new armor pieces on to the base models.

Spoiler (hover to show)

But when I reach the stage for rigging I end up deleting my work file because I keep screwing up; I've done this maybe 10 times already, each file averaging about 2 hours of work :D

What I've been trying to do is "join" each armor piece mesh to an existing sub-mesh of the base model (i.e. join 'new-chest-armor' to 'existing-chest-submesh', etc...).  And then I try to weight-paint to get each mesh to deform properly in posing. But like I said I keep screwing up, specially on the weighting.

I AM having fun still, but I am getting impatient to produce results :P  So I decided to come here and ask for some directions please!

The pic above is my latest workfile for the Alch Homunculus set - it has no rigging at all yet.  Can I ask please for suggestions on the best sequence of "next steps" I should take?  Anything would be much appreciated.  Thanks in advance!

Edit - Thanks Vkoslak and Anarch for the added info about multiple materials for meshes :)
« Last Edit: January 03, 2017, 02:37:18 pm by Phanjam »


Re: My Blender Journey :P
« Reply #39 on: »
So I decided to come here and ask for some directions please!
You need a Plan - The Big PJ Wadrobe Plan!  :D

Re: My Blender Journey :P
« Reply #40 on: »
Haha! Thanks mucho Kva! Right now my plan is just to import more sets for Anarch's TL1 wardrobe mod ;)


Re: My Blender Journey :P
« Reply #41 on: »
Keep an unmodified base mesh around and use it to transfer paint weights from. That will get you most of the way there.  I think I documented how to do that elsewhere on this site a while back.

Re: My Blender Journey :P
« Reply #42 on: »
Hey thanks so much V! Will comb thru your posts in a bit.

A question tho - should i choose a base mesh with a similar silhouette to the mesh im transferring to? Or would the bare Hum_M / Hum_F be fine?

EDIT

So I found your Custom Armor and Rigging tutorial post, which also pointed to on the same topic.

Great stuff! Am going to try and replicate your methods for my current challenge :D Will report back with what I get.

BTW, would you mind if I copy your tutorial post over to the Torchmodders wiki?
« Last Edit: January 03, 2017, 07:37:26 pm by Phanjam »


Re: My Blender Journey :P
« Reply #43 on: »
Did about 2 more work->deletes :D

Taking a break for today. At this time I have a model with all the necessary meshes all properly named for TL2 (pauldrons = shoulders, forearm = upper gloves, hand = lower gloves, etc.)

Spoiler (hover to show)

Tomorrow I will try weight-transferring from a standard Hum_M mesh...


Re: My Blender Journey :P
« Reply #44 on: »
I would think if I post something on these forums, and you feel its appropriate for the wiki, go for it.

 

Recent Topics+-