Lodding script

Users who are viewing this thread

OK, Sorry for double post but this is a new issue I just had:

I've been creating lods all day and things were looking really good.  I even got the second script to start working (had to change output filename to match what I had on desktop).


All of a sudden all the new models I created are invisible in brfedit.  They show up in open brf, but invisible in brf edit (even if I try to do a model that was good before, its invisible when I try to create again).  I tried reinstalling brfedit, I tried deleting my files and creating again, nothing.  I made about 50 models and all of them open in brfedit but now, doing the same thing, they do not. 

I even tried a new file and still do not show up. 


Is there some setting in 3dsmax I may have clicked on accident that does this? 


I also tried reinstalling 3dsmax, restart comp, etc. 

 
...

If you really want to help the community out (more than you have), create a script like this that works for gmax (OSP).

But great tool!

That's a pretty good idea actually.

But I can assure you, the later code works 100% fine when using 3dsMax 9 and openBRF!
 
Berserker Pride said:
Is there any chance this script could be modified to work in blender?

I don't think there are ANY similarities in syntax and scriptable actions between Max's and Blender's scripts.

Recreating it using Blender's script (if it exists) and trying to achieve the same thing might be possible, but I don't know how.
 
I changed all the references to your desktop in the script to point to mine etc.  But in 3ds max 2010 after selecting the high-priority vertices the script aborts at this line: Min = $_null_.selectedVerts.count.  Do you have a workaround for this by any chance?  Sorry I'm not familiar with the syntax of max scripts.
 
othr said:
I changed all the references to your desktop in the script to point to mine etc.  But in 3ds max 2010 after selecting the high-priority vertices the script aborts at this line: Min = $_null_.selectedVerts.count.  Do you have a workaround for this by any chance?  Sorry I'm not familiar with the syntax of max scripts.
Looks like you've deselected the mesh before clicking 'Press Me'?



Just tried it on 3dsMax again, and this very slightly modified version works flawlessly. I only needed to put the to-be-lodded model on my desktop, call it in.obj, fire up Max, and run the script:

Code:
resetMaxFile() #noPrompt
importFile ("C:/Users/Leo Mes/Desktop/in.obj")
max tool maximize
Min = 0
distance1 = 0
distance2 = 0
distance4 = 0
actionMan.executeAction 0 "369"  -- Views: View Edged Faces Toggle
actionMan.executeAction 0 "311"  -- Tools: Zoom Extents All Selected
macros.run "Modifier Stack" "SubObject_5"
    rollout mesh_buttons "Delete separated detail meshes, like sword counterweights, shouldercovers or belts."
    (
        button Button_done "Done!"
		on Button_done pressed do
		(
            destroyDialog(mesh_buttons)
            subobjectlevel = 0
            if doesFileExist("C:/Users/Leo Mes/Desktop/insimple.obj") == false do exportFile ("C:/Users/Leo Mes/Desktop/insimple.obj") #noPrompt using:exporterPlugin.classes[15]
            Weldtest = $.NumVerts
            modPanel.addModToSelection (Vertex_Weld ()) ui:on
            $.modifiers[#Vertex_Weld].threshold = 1.0e-003
				if Weldtest > $.NumVerts do
                (
                    messagebox "Some vertices are welded!"
					if doesFileExist ("C:/Users/Leo Mes/Desktop/outsimplewelded.obj") == false do exportFile ("C:/Users/Leo Mes/Desktop/outsimplewelded.obj") #noPrompt using:exporterPlugin.classes[15]
                )         
            modPanel.addModToSelection (Unwrap_UVW ()) ui:on
            modPanel.addModToSelection (MultiRes ()) ui:on
            subobjectlevel = 1
                rollout the_buttons "Select type, select high-priority vertices, then hit press me!"
                (
                    button Button_rest "Armor / Weapon"
                    button Button_horse "Horse"
                    button Button_cont "Press me!"
					on Button_rest pressed do
					(
                        distance1 = $.NumVerts*0.4
                        distance2 = $.NumVerts*0.2
                        distance4 = $.NumVerts*0.1
					)
					on Button_horse pressed do
					(
                        distance1 = $.NumVerts*0.5
                        distance2 = $.NumVerts*0.25
                        distance4 = $.NumVerts*0.125
					)
					on Button_cont pressed do
					(
                        Min = $.selectedVerts.count
                        distance1 = distance1 as integer
                        distance2 = distance2 as integer
                        distance4 = distance4 as integer
                        destroyDialog(the_buttons)
                        $.modifiers[#MultiRes].BoundaryMetric = on
                        $.modifiers[#MultiRes].baseVertices = on
                        $.modifiers[#MultiRes].mergeVertex = on
                        $.modifiers[#MultiRes].mergeThreshold = 0.25
                        $.modifiers[#MultiRes].mergeWithinMesh = on
                        $.modifiers[#MultiRes].reqGenerate = off
                        $.modifiers[#MultiRes].vertexCount = distance1
                            if $.modifiers[#MultiRes].vertexCount == 0 do
                            (
								messagebox "ERROR, fixing"
								$.modifiers[#MultiRes].vertexCount = distance1
                            )
                        if doesFileExist("C:/Users/Leo Mes/Desktop/out.lod1.obj") == false do exportFile ("C:/Users/Leo Mes/Desktop/out.lod1.obj") #noPrompt using:exporterPlugin.classes[15]
                        $.modifiers[#MultiRes].vertexCount = distance2
                            if $.modifiers[#MultiRes].vertexCount < Min do
                            (
								messagebox "Too low vertex count, raising"
								$.modifiers[#MultiRes].vertexCount = Min
                            )
                        if doesFileExist("C:/Users/Leo Mes/Desktop/out.lod2.obj") == false do exportFile ("C:/Users/Leo Mes/Desktop/out.lod2.obj") #noPrompt using:exporterPlugin.classes[15]
                        $.modifiers[#MultiRes].vertexCount = distance4
                            if $.modifiers[#MultiRes].vertexCount < Min do
                            (
                               messagebox "Too low vertex count, raising"
                               $.modifiers[#MultiRes].vertexCount = Min
                            )               
                        if doesFileExist("C:/Users/Leo Mes/Desktop/out.lod4.obj") == false do exportFile ("C:/Users/Leo Mes/Desktop/out.lod4.obj") #noPrompt using:exporterPlugin.classes[15]
                        actionMan.executeAction 0 "40005"  -- File: Reset File
					)
                )
            CreateDialog the_buttons 360 80 900 480
		)
    )
CreateDialog mesh_buttons 520 32 900 400
 
OK,
Still trying to figure out what my problem is.  Here are some of the steps taken.

1. Deleted every single reference to brfedit in my registry with regedit.  I deleted it from my program files and then reinstalled.  To my surprise, the background color in brfedit did change back to default so I know it was installed correctly. 

Unfortunately, all new models created by 3dsmax still are invisible.  All the old models I created yesterday still show up correctly. 

2. I decided to stop using brfedit and use Openbrf instead because those same new models created can be viewed in Openbrf. 

3. I created a link to my item from this new model and they are invisible in the game!  They show up in the character screen correctly like an item but when in battle, they are invisible.  The character uses the item like it is there, but they are not visible (just like in brfedit). 

While I am not a modeler, I know how to add items to the python code, compile, and get them in game.  I have done this for hundreds of items with no issue. 

So I think the problem lies with 3dsmax exporting the model.  It is so strange because I created about 50 models successfully with this script but now when I use it, even on the same models I created previously, they all show up invisible in brfedit, in game during a battle, yet somehow you can view them in Openbrf. 

Here are the scripts that I got to works successfully:

Script 1
resetMaxFile() #noPrompt
importFile ("C:/Users/Jacob Collins/Desktop/in.obj")
max tool maximize
Min = 0
distance1 = 0
distance2 = 0
distance4 = 0
actionMan.executeAction 0 "369" -- Views: View Edged Faces Toggle
actionMan.executeAction 0 "311" -- Tools: Zoom Extents All Selected
macros.run "Modifier Stack" "SubObject_5"
rollout mesh_buttons "Delete separated detail meshes, like sword counterweights, shouldercovers or belts."
(
button Button_done "Done!"
on Button_done pressed do
(
destroyDialog(mesh_buttons)
subobjectlevel = 0
if doesFileExist("C:/Users/Jacob Collins/Desktop/insimple.obj") == false do exportFile ("C:/Users/Jacob Collins/Desktop/insimple.obj") #noPrompt using:exporterPlugin.classes[15]
Weldtest = $.NumVerts
modPanel.addModToSelection (Vertex_Weld ()) ui:eek:n
$.modifiers[#Vertex_Weld].threshold = 1.0e-003
if Weldtest > $.NumVerts do
(
messagebox "Some vertices are welded!"
if doesFileExist ("C:/Users/Jacob Collins/Desktop/outsimplewelded.obj") == false do exportFile ("C:/Users/Jacob Collins/Desktop/outsimplewelded.obj") #noPrompt using:exporterPlugin.classes[15]
)
modPanel.addModToSelection (Unwrap_UVW ()) ui:eek:n
modPanel.addModToSelection (MultiRes ()) ui:eek:n
subobjectlevel = 1
rollout the_buttons "Select type, select high-priority verts, then hit press me!"
(
button Button_rest "Armor / Weapon"
button Button_horse "Horse"
button Button_cont "Press me!"
on Button_rest pressed do
(
distance1 = $.NumVerts*0.4
distance2 = $.NumVerts*0.2
distance4 = $.NumVerts*0.1
)
on Button_horse pressed do
(
distance1 = $.NumVerts*0.5
distance2 = $.NumVerts*0.25
distance4 = $.NumVerts*0.125
)
on Button_cont pressed do
(
Min = $_null_.selectedVerts.count
distance1 = distance1 as integer
distance2 = distance2 as integer
distance4 = distance4 as integer
destroyDialog(the_buttons)
$.modifiers[#MultiRes].BoundaryMetric = on
$.modifiers[#MultiRes].baseVertices = on
$.modifiers[#MultiRes].mergeVertex = on
$.modifiers[#MultiRes].mergeThreshold = 0.25
$.modifiers[#MultiRes].mergeWithinMesh = on
$.modifiers[#MultiRes].reqGenerate = off
$.modifiers[#MultiRes].vertexCount = distance1
if $.modifiers[#MultiRes].vertexCount == 0 do
(
messagebox "ERROR, fixing"
$.modifiers[#MultiRes].vertexCount = distance1
)
if doesFileExist("C:/Users/Jacob Collins/Desktop/out1.obj") == false do exportFile ("C:/Users/Jacob Collins/Desktop/out1.obj") #noPrompt using:exporterPlugin.classes[15]
$.modifiers[#MultiRes].vertexCount = distance2
if $.modifiers[#MultiRes].vertexCount < Min do
(
messagebox "Too low vertex count, raising"
$.modifiers[#MultiRes].vertexCount = Min
)
if doesFileExist("C:/Users/Jacob Collins/Desktop/out2.obj") == false do exportFile ("C:/Users/Jacob Collins/Desktop/out2.obj") #noPrompt using:exporterPlugin.classes[15]
$.modifiers[#MultiRes].vertexCount = distance4
if $.modifiers[#MultiRes].vertexCount < Min do
(
messagebox "Too low vertex count, raising"
$.modifiers[#MultiRes].vertexCount = Min
)
if doesFileExist("C:/Users/Jacob Collins/Desktop/out3.obj") == false do exportFile ("C:/Users/Jacob Collins/Desktop/out3.obj") #noPrompt using:exporterPlugin.classes[15]
actionMan.executeAction 0 "40005" -- File: Reset File
)
)
CreateDialog the_buttons 360 80 900 480
)
)
CreateDialog mesh_buttons 520 32 900 400

Script 2
actionMan.executeAction 0 "40010"  -- File: Import File
Weldtest = $.numverts
actionMan.executeAction 0 "311"  -- Tools: Zoom Extents All Selected
modPanel.addModToSelection (Vertex_Weld ()) ui:eek:n
$.modifiers[#Vertex_Weld].threshold = 1.0e-015
if $.NumVerts < Weldtest do
(
messagebox "Gefixt!! / Fixed!!"
macros.run "Modifier Stack" "Convert_to_Mesh"
actionMan.executeAction 0 "40011"  -- File: Export File
)
macros.run "Modifier Stack" "Convert_to_Mesh"
modPanel.addModToSelection (MultiRes ()) ui:eek:n
$.modifiers[#MultiRes].mergeVertex = on
$.modifiers[#MultiRes].mergeWithinMesh = on
$.modifiers[#MultiRes].reqGenerate = off
$.modifiers[#MultiRes].vertexPercent = 50
actionMan.executeAction 0 "40011"  -- File: Export File
$.modifiers[#MultiRes].vertexPercent = 20
actionMan.executeAction 0 "40011"  -- File Export File
if $.modifiers[#MultiRes].vertexCount < 35 do
(
messagebox "Erg weinig vertices!! / Low vertex count!!"
)
$.modifiers[#MultiRes].vertexPercent = 10
actionMan.executeAction 0 "40011"  -- File Export File
actionMan.executeAction 0 "40005"  -- File: Reset File
actionMan.executeAction 0 "40470"  -- MAX Script: Run Script

I just tried the third revision you posted and it gives me the same issue. 


The only things I edited were the output filenames on script 1 and the reference to my desktop on both script 1 and script 2. 


I tried to uninstall 3dsmax and reinstall hoping the default values would be set back thinking it may be something I accidentally changed in 3dsmax but it seemed to have saved all my values (free 30 day trial version) so if I did change something, I have no idea what it was….

In addition, when I try to import some of the models 3dsmax exported back into 3dsmax, they show up invisible.  When I try to import again, they show up….


I’m lost and I really need this tool to finish my work.  I got a ton of models created but only about half way through.  Since I do not have experience with 3d modeling, I can’t just do it all by hand. 

Is it possible to post a screen of the export screen (how it should look for a working model) so I can verify nothing was accidently clicked in the hundreds of export features available on 3dsmax.  It seems to be importing the .obj models I exported from brfedit correctly. 

I just tried something else, I imported a file into 3dsmax and without running the script, I tried to export is with a different filename.  I then tried to open it in brfeditor and it is invisible.  Based on my other ingame tests, I am going to assume its invisible in battle as well. 

So my problem seems to be with 3dsmax, not brfeditor, and not the script.  Any advice on how to correct this?  I even tried updating with their service patch.  Its got to be some simple setting I am messing up (but somehow got it right for the first 50 or so items I made). 






 
GetAssista said:
I assume, with the addition of some small extra block of script it can also perform batch LODding for all the OBJs in some directory at once?
That's a good idea.

But I first need to get it working in GMax.



Cyclohexane said:
OK,
Still trying to figure out what my problem is.  Here are some of the steps taken.

1. Deleted every single reference to brfedit in my registry with regedit.  I deleted it from my program files and then reinstalled.  To my surprise, the background color in brfedit did change back to default so I know it was installed correctly. 

Unfortunately, all new models created by 3dsmax still are invisible.  All the old models I created yesterday still show up correctly. 

2. I decided to stop using brfedit and use Openbrf instead because those same new models created can be viewed in Openbrf. 

3. I created a link to my item from this new model and they are invisible in the game!  They show up in the character screen correctly like an item but when in battle, they are invisible.  The character uses the item like it is there, but they are not visible (just like in brfedit). 

While I am not a modeler, I know how to add items to the python code, compile, and get them in game.  I have done this for hundreds of items with no issue. 

So I think the problem lies with 3dsmax exporting the model.  It is so strange because I created about 50 models successfully with this script but now when I use it, even on the same models I created previously, they all show up invisible in brfedit, in game during a battle, yet somehow you can view them in Openbrf. 

Here are the scripts that I got to works successfully:

Script 1
resetMaxFile() #noPrompt
importFile ("C:/Users/Jacob Collins/Desktop/in.obj")
max tool maximize
Min = 0
distance1 = 0
distance2 = 0
distance4 = 0
actionMan.executeAction 0 "369" -- Views: View Edged Faces Toggle
actionMan.executeAction 0 "311" -- Tools: Zoom Extents All Selected
macros.run "Modifier Stack" "SubObject_5"
rollout mesh_buttons "Delete separated detail meshes, like sword counterweights, shouldercovers or belts."
(
button Button_done "Done!"
on Button_done pressed do
(
destroyDialog(mesh_buttons)
subobjectlevel = 0
if doesFileExist("C:/Users/Jacob Collins/Desktop/insimple.obj") == false do exportFile ("C:/Users/Jacob Collins/Desktop/insimple.obj") #noPrompt using:exporterPlugin.classes[15]
Weldtest = $.NumVerts
modPanel.addModToSelection (Vertex_Weld ()) ui:eek:n
$.modifiers[#Vertex_Weld].threshold = 1.0e-003
if Weldtest > $.NumVerts do
(
messagebox "Some vertices are welded!"
if doesFileExist ("C:/Users/Jacob Collins/Desktop/outsimplewelded.obj") == false do exportFile ("C:/Users/Jacob Collins/Desktop/outsimplewelded.obj") #noPrompt using:exporterPlugin.classes[15]
)
modPanel.addModToSelection (Unwrap_UVW ()) ui:eek:n
modPanel.addModToSelection (MultiRes ()) ui:eek:n
subobjectlevel = 1
rollout the_buttons "Select type, select high-priority verts, then hit press me!"
(
button Button_rest "Armor / Weapon"
button Button_horse "Horse"
button Button_cont "Press me!"
on Button_rest pressed do
(
distance1 = $.NumVerts*0.4
distance2 = $.NumVerts*0.2
distance4 = $.NumVerts*0.1
)
on Button_horse pressed do
(
distance1 = $.NumVerts*0.5
distance2 = $.NumVerts*0.25
distance4 = $.NumVerts*0.125
)
on Button_cont pressed do
(
Min = $_null_.selectedVerts.count
distance1 = distance1 as integer
distance2 = distance2 as integer
distance4 = distance4 as integer
destroyDialog(the_buttons)
$.modifiers[#MultiRes].BoundaryMetric = on
$.modifiers[#MultiRes].baseVertices = on
$.modifiers[#MultiRes].mergeVertex = on
$.modifiers[#MultiRes].mergeThreshold = 0.25
$.modifiers[#MultiRes].mergeWithinMesh = on
$.modifiers[#MultiRes].reqGenerate = off
$.modifiers[#MultiRes].vertexCount = distance1
if $.modifiers[#MultiRes].vertexCount == 0 do
(
messagebox "ERROR, fixing"
$.modifiers[#MultiRes].vertexCount = distance1
)
if doesFileExist("C:/Users/Jacob Collins/Desktop/out1.obj") == false do exportFile ("C:/Users/Jacob Collins/Desktop/out1.obj") #noPrompt using:exporterPlugin.classes[15]
$.modifiers[#MultiRes].vertexCount = distance2
if $.modifiers[#MultiRes].vertexCount < Min do
(
messagebox "Too low vertex count, raising"
$.modifiers[#MultiRes].vertexCount = Min
)
if doesFileExist("C:/Users/Jacob Collins/Desktop/out2.obj") == false do exportFile ("C:/Users/Jacob Collins/Desktop/out2.obj") #noPrompt using:exporterPlugin.classes[15]
$.modifiers[#MultiRes].vertexCount = distance4
if $.modifiers[#MultiRes].vertexCount < Min do
(
messagebox "Too low vertex count, raising"
$.modifiers[#MultiRes].vertexCount = Min
)
if doesFileExist("C:/Users/Jacob Collins/Desktop/out3.obj") == false do exportFile ("C:/Users/Jacob Collins/Desktop/out3.obj") #noPrompt using:exporterPlugin.classes[15]
actionMan.executeAction 0 "40005" -- File: Reset File
)
)
CreateDialog the_buttons 360 80 900 480
)
)
CreateDialog mesh_buttons 520 32 900 400

Script 2
actionMan.executeAction 0 "40010"  -- File: Import File
Weldtest = $.numverts
actionMan.executeAction 0 "311"  -- Tools: Zoom Extents All Selected
modPanel.addModToSelection (Vertex_Weld ()) ui:eek:n
$.modifiers[#Vertex_Weld].threshold = 1.0e-015
if $.NumVerts < Weldtest do
(
messagebox "Gefixt!! / Fixed!!"
macros.run "Modifier Stack" "Convert_to_Mesh"
actionMan.executeAction 0 "40011"  -- File: Export File
)
macros.run "Modifier Stack" "Convert_to_Mesh"
modPanel.addModToSelection (MultiRes ()) ui:eek:n
$.modifiers[#MultiRes].mergeVertex = on
$.modifiers[#MultiRes].mergeWithinMesh = on
$.modifiers[#MultiRes].reqGenerate = off
$.modifiers[#MultiRes].vertexPercent = 50
actionMan.executeAction 0 "40011"  -- File: Export File
$.modifiers[#MultiRes].vertexPercent = 20
actionMan.executeAction 0 "40011"  -- File Export File
if $.modifiers[#MultiRes].vertexCount < 35 do
(
messagebox "Erg weinig vertices!! / Low vertex count!!"
)
$.modifiers[#MultiRes].vertexPercent = 10
actionMan.executeAction 0 "40011"  -- File Export File
actionMan.executeAction 0 "40005"  -- File: Reset File
actionMan.executeAction 0 "40470"  -- MAX Script: Run Script

I just tried the third revision you posted and it gives me the same issue. 


The only things I edited were the output filenames on script 1 and the reference to my desktop on both script 1 and script 2. 


I tried to uninstall 3dsmax and reinstall hoping the default values would be set back thinking it may be something I accidentally changed in 3dsmax but it seemed to have saved all my values (free 30 day trial version) so if I did change something, I have no idea what it was….

In addition, when I try to import some of the models 3dsmax exported back into 3dsmax, they show up invisible.  When I try to import again, they show up….


I’m lost and I really need this tool to finish my work.  I got a ton of models created but only about half way through.  Since I do not have experience with 3d modeling, I can’t just do it all by hand. 

Is it possible to post a screen of the export screen (how it should look for a working model) so I can verify nothing was accidently clicked in the hundreds of export features available on 3dsmax.  It seems to be importing the .obj models I exported from brfedit correctly. 

I just tried something else, I imported a file into 3dsmax and without running the script, I tried to export is with a different filename.  I then tried to open it in brfeditor and it is invisible.  Based on my other ingame tests, I am going to assume its invisible in battle as well. 

So my problem seems to be with 3dsmax, not brfeditor, and not the script.  Any advice on how to correct this?  I even tried updating with their service patch.  Its got to be some simple setting I am messing up (but somehow got it right for the first 50 or so items I made).
Did you check the import/export scale? I've had some weird ones where the model was a thousand times smaller than it should have been. They were simply invisible in some tools, like BRFedit, which does NOT zoom in. openBRF does, you'll see them no matter how small models are. With 3dsMax hit CTRL+A, then click Zoom Selected. Same thing for Mount&Blade by the way, it zooms in correctly in the inventory/trade screens, while it does not (just 1:1 zoom) in battle.
 
killkhergit said:
Did you check the import/export scale? I've had some weird ones where the model was a thousand times smaller than it should have been. They were simply invisible in some tools, like BRFedit, which does NOT zoom in. openBRF does, you'll see them no matter how small models are. With 3dsMax hit CTRL+A, then click Zoom Selected. Same thing for Mount&Blade by the way, it zooms in correctly in the inventory/trade screens, while it does not (just 1:1 zoom) in battle.

Wow, thank you.  I guarantee that I never clicked the scale but sure enough, that was the problem.  I knew it would be something simple.  Well, I learned a lot in the process of figuring out what was wrong.  Now I can complete what I started...


EDIT:
I'd like to add that I will add you as a contributor to Sword of Damocles because this tool is so useful.  It allows someone with very little modeling skills to create lods for items.  Lods have a huge effect on battle performance, especially when you add hundreds of new items like I did.  I also recommended you here:  The Guide Of Useful Scripts

My only recommendation to you is to add note by your code (front page) that says to verify your output export file scale is 1.0 and the texture precision is set to 10 (this is so the lod textures will not be deformed). 

I do have another question.  These models seem to only work on rigid items (i.e. helmets, weapons, shields) that do not move.  I see you have horses in your script but I am not sure how to get it to working game as a .lod because these are .obj files (seem to be related to static objects).  From my understanding, the script only works on .obj files.  The horses and armors (which move) seem to be .smd or .md3 files.  These are the ones with skeletal or  vertex animations . 

Is it possible to use this script to create lods of armors, boots, horses with these animations?  Since you export as a .obj, does it have to do with how you import the lod back into your resource file (i.e. import as .smd)? 

If this is possible, can you please post how to import back into Openbrf (or brfedit) and make the models skeletal?  This will allow me to make lods of armors and have them show up in game not as a stick figure that cannot move arms & legs. 

Thank you
 
Cyclohexane said:
killkhergit said:
Did you check the import/export scale? I've had some weird ones where the model was a thousand times smaller than it should have been. They were simply invisible in some tools, like BRFedit, which does NOT zoom in. openBRF does, you'll see them no matter how small models are. With 3dsMax hit CTRL+A, then click Zoom Selected. Same thing for Mount&Blade by the way, it zooms in correctly in the inventory/trade screens, while it does not (just 1:1 zoom) in battle.

Wow, thank you.  I guarantee that I never clicked the scale but sure enough, that was the problem.  I knew it would be something simple.  Well, I learned a lot in the process of figuring out what was wrong.  Now I can complete what I started...


EDIT:
I'd like to add that I will add you as a contributor to Sword of Damocles because this tool is so useful.  It allows someone with very little modeling skills to create lods for items.  Lods have a huge effect on battle performance, especially when you add hundreds of new items like I did.  I also recommended you here:  The Guide Of Useful Scripts

My only recommendation to you is to add note by your code (front page) that says to verify your output export file scale is 1.0 and the texture precision is set to 10 (this is so the lod textures will not be deformed). 

I do have another question.  These models seem to only work on rigid items (i.e. helmets, weapons, shields) that do not move.  I see you have horses in your script but I am not sure how to get it to working game as a .lod because these are .obj files (seem to be related to static objects).  From my understanding, the script only works on .obj files.  The horses and armors (which move) seem to be .smd or .md3 files.  These are the ones with skeletal or  vertex animations . 

Is it possible to use this script to create lods of armors, boots, horses with these animations?  Since you export as a .obj, does it have to do with how you import the lod back into your resource file (i.e. import as .smd)? 

If this is possible, can you please post how to import back into Openbrf (or brfedit) and make the models skeletal?  This will allow me to make lods of armors and have them show up in game not as a stick figure that cannot move arms & legs. 

Thank you

Somewhere on the forums, someone made an application that could bind an OBJ file to the skeleton of an SMD file. I don't know where it is now, but you should search for it. That app needed in.obj files to be put next to an SMD file with a skeleton. For that reason, some older script outputted in.obj's instead of out.obj...

Here it is: http://forums.taleworlds.com/index.php/topic,55698.0.html
 
killkhergit said:
Cyclohexane said:
killkhergit said:
Did you check the import/export scale? I've had some weird ones where the model was a thousand times smaller than it should have been. They were simply invisible in some tools, like BRFedit, which does NOT zoom in. openBRF does, you'll see them no matter how small models are. With 3dsMax hit CTRL+A, then click Zoom Selected. Same thing for Mount&Blade by the way, it zooms in correctly in the inventory/trade screens, while it does not (just 1:1 zoom) in battle.

Wow, thank you.  I guarantee that I never clicked the scale but sure enough, that was the problem.  I knew it would be something simple.  Well, I learned a lot in the process of figuring out what was wrong.  Now I can complete what I started...


EDIT:
I'd like to add that I will add you as a contributor to Sword of Damocles because this tool is so useful.  It allows someone with very little modeling skills to create lods for items.  Lods have a huge effect on battle performance, especially when you add hundreds of new items like I did.  I also recommended you here:  The Guide Of Useful Scripts

My only recommendation to you is to add note by your code (front page) that says to verify your output export file scale is 1.0 and the texture precision is set to 10 (this is so the lod textures will not be deformed). 

I do have another question.  These models seem to only work on rigid items (i.e. helmets, weapons, shields) that do not move.  I see you have horses in your script but I am not sure how to get it to working game as a .lod because these are .obj files (seem to be related to static objects).  From my understanding, the script only works on .obj files.  The horses and armors (which move) seem to be .smd or .md3 files.  These are the ones with skeletal or  vertex animations . 

Is it possible to use this script to create lods of armors, boots, horses with these animations?  Since you export as a .obj, does it have to do with how you import the lod back into your resource file (i.e. import as .smd)? 

If this is possible, can you please post how to import back into Openbrf (or brfedit) and make the models skeletal?  This will allow me to make lods of armors and have them show up in game not as a stick figure that cannot move arms & legs. 

Thank you

Somewhere on the forums, someone made an application that could bind an OBJ file to the skeleton of an SMD file. I don't know where it is now, but you should search for it. That app needed in.obj files to be put next to an SMD file with a skeleton. For that reason, some older script outputted in.obj's instead of out.obj...

Here it is: http://forums.taleworlds.com/index.php/topic,55698.0.html

Wow,
Thanks for the tip.  It is a little buggy (some of the models your script makes gives an error at start up “To many bones on mesh XXXX.lodX”), but did manage to get one working so far so I know it can be done!

I already added your name to Sword of Damocles V4.5 Gold beta as a contributor.  The next patch release will be released in a couple weeks.  If you’ve never played it, you should check it out.  If you have played it, you should still check out the new version with tons of new features (but I recommend you wait till next patch, a lot of bugs are being squashed). 


 
ok i runn you lates script i got from this post and i got an error: too low vertex count, rising
il try for some diferent items ...
seems is doing this error for evry obj i put in it...
 
Back
Top Bottom