Jump to content

Part Generator Version 3 [Win][Linux][Mac]


Lando

Recommended Posts

That Edge Split did the Trick, but it increases vertex cound!

Yes it is unfortunate that it increases vertex count, but the cylinders/cones that Partgen produces could do with fewer vertices to begin with. That particular cone i made is 64 faces around. It could probably do with half that and still look good (stock parts are 24 around), provided that it would be smooth shaded (except for the flat bottom cap).

Edited by rkman
Link to comment
Share on other sites

Another discovery re Partgen's mesh quality: the cones have some anomalous shading going on due to the fact that the tip of the cone is not a single vertex but a whole bunch together that apparently do not line up perfectly, causing the triangles to each be shaded slightly differently. It looks a lot nicer with all those vertices merged into one.

Another thing wrt the dark shading of Partgen parts:

Apparently brightness and specular are determined by values in the dae file.

I assume specPower and rimFalloff in the part.cfg are redundant.

Partgen (v2.2.2) puts diffuse at something like 0.6. Making that 1 (for each of red green blue) makes the texture's brightness as intended:


...
<library_effects>
[B]<effect id="Material_001-effect">[/B]
<profile_COMMON>
<technique sid="common">
<phong>
...
<diffuse>
<color sid="[B]diffuse[/B]">[B]1.0 1.0 1.0[/B] 1</color>
</diffuse>
<specular>
<color sid="specular">0.3 0.3 0.3 1</color>
</specular>
<shininess>
<float sid="shininess">20</float>
</shininess>
...
</phong>
...

Edited by rkman
Link to comment
Share on other sites

First can I say thank you very much Lando. As a code person with no graphics skills beyond paint this is exactly what I want and worked with no problems once I had it installed.

I do have two minor points:

The first is that most of the button text is grey on a very similar grey and I had to tilt the screen to read them. If you could change them to white to match the rest of the program that would make things a bit easier.

The second is just a note on installation for Linux users. If you have mono already installed and running the .exe gets an error message looking a bit like this

Missing method EnableVisualStyles in assembly /path/to/PartGen3.0/KSP_PartGen.exe, type System.Windows.Forms.Application

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Then you are missing some windows compatibility libraries for mono. I'm not sure which ones exactly so all I can recommend is getting the full 90MB version by

apt-get install mono-complete

Link to comment
Share on other sites

so that change in the dae file does the trick?

cool, thanks!

I will fix the cones!

But I am still very busy... :-(

Correcting the diffuse values in the .dae works for all Partgen meshes. (Merging those vertices at the top is specific to cones.)

The edge-split trick only seems to do something for models that include smooth shading and have some edges that must be sharp. And then it is only part of the solution.

I whish i could be of more help but all i know about the rest of the solution for the weird slanted shading of smooth meshes is that it is related to the the up-axis in Blender being different than in Unity/KSP, and fixing it requires rotating the model 90degrees, doing something to it (apply shading/recalc normals?) and then rotating it back. There used to be a Blender tutorial about it but i think it got lost in the big forum crash some time back.

Afaik modders usually fix/avoid the problem in Unity/PartTools when converting the mesh to .mu format.

Take your time.

Link to comment
Share on other sites

Ok,

UPLOADED VERSION 3.1 : http://www./download/txaa6wco9hlx2l1/PartGen3.1.zip

NEW:

gui changes

diffuse values fixed

kethane

TODO:

fix cones

still some lightning issues

I will take a look at the .mu export script for blender, maybe I can use it?

but I dont know how these blender addons work atm.

Edited by Lando
Link to comment
Share on other sites

Well, that was quick.

I can report the GUI now plays nice with the higher-than-default screen DPI of my PC. Still a bit of oversized text but nothing game breaking.

Unfortunately it seems you have inadvertently changed the values of specular instead of diffuse in the dae files. Specular used to be 0.5 now it's 1, diffuse is at 0.64. At least for the cylinder it is.

If anything, i think specular would better be lowered. I found the following settings for specular and shininess produce a subtle soft shine:


<library_effects>
<effect id="Material_001-effect">
<profile_COMMON>
<technique sid="common">
<phong>
...
<diffuse>
<color sid="diffuse">1 1 1 1</color>
</diffuse>
<specular>
<color sid="specular">0.2 0.2 0.2 1</color>
</specular>
<shininess>
<float sid="shininess">15</float>
</shininess>
...

Edited by rkman
Link to comment
Share on other sites

Oh, I wrote a short Batch Skript to change this in all files and I mixed things up :rolleyes:

Sorry

uploaded a fixer Version!

I am glad you were that fast, so only 4 downloads were made (4 - you = 3 :D)

Edited by Lando
Link to comment
Share on other sites

I will take a look at the .mu export script for blender, maybe I can use it?

but I dont know how these blender addons work atm.

At least installing them is quite easy. You put the file in %appdata%/Roaming/Blender Foundation/Blender/Scripts/Addons (or something like that, you'll see it. The Addons-folder might have to be created).

In Blender, go to User Preferences, use the filter "User" and activate the Script :)

Link to comment
Share on other sites

At least installing them is quite easy. You put the file in %appdata%/Roaming/Blender Foundation/Blender/Scripts/Addons (or something like that, you'll see it. The Addons-folder might have to be created).

In Blender, go to User Preferences, use the filter "User" and activate the Script :)

ok, I did know that, I am quite good at blender.

I was wondering if I could get my program to export in .mu

Link to comment
Share on other sites

  • 2 weeks later...
I'm sorry to be the bringer of bad news but the calculating of the available volume is somewhat flawed. Make a monopropellant tank then add 10 liters of fuel and oxidizer. You'll see the volume change dramatically.

ok, I could not reproduce that, so the volume was ok before adding the fuel and oxidizer?

how much monoprop was in that tank?

Link to comment
Share on other sites

ok, I could not reproduce that, so the volume was ok before adding the fuel and oxidizer?

how much monoprop was in that tank?

Frankly, i can't reproduce the error myself anymore. The instance it occurred, i tried to create a specialised RCS tank in the shape of a cone. Fuel and oxidizer are added default in the partgenerator so i had to remove the fuel content. As long as i had some fuel (and oxidizer) in the tank, the max amount of RCS was about 760 l. Once there was 0 fuel/oxidizer, the maximum amount grew to over 2260 l. Adding just 1 l of fuel and it was back to about 760 l.

It must have been a fluke as i can't reproduce it now.

Link to comment
Share on other sites

I only have one complaint, it doesn't play well with DPI Scaling. I run 1920x1080 resolution on a 40 inch TV as a monitor (this makes gaming AWESOME!) but I have the DPI Scaling cranked all the way up to 200% just to read my icon labels. Otherwise they are smaller than the fine print on a loan application...

Lots of programs play well when I right click them and click "Disable display scaling on high DPI settings" under the Compatibility tab in the Properties window. On this program, the graphics scaled, but the text didn't.

Link to comment
Share on other sites

Hello I have got a problem. Generator works fine, but when I am adding module, It shows error. I can't add any module :(

so you can see them in the list, but you cant move them to the list of installed modules? strange, it seams to load them right... what does the error say?

I only have one complaint, it doesn't play well with DPI Scaling. I run 1920x1080 resolution on a 40 inch TV as a monitor (this makes gaming AWESOME!) but I have the DPI Scaling cranked all the way up to 200% just to read my icon labels. Otherwise they are smaller than the fine print on a loan application...

Lots of programs play well when I right click them and click "Disable display scaling on high DPI settings" under the Compatibility tab in the Properties window. On this program, the graphics scaled, but the text didn't.

Well, we had this issue before. What OS do you use? I gues windows. I wil do some tests...

EDIT: Ok everything worked on win 8 with 150% can you make a screenshot?

OT: What graphics card do you use, I have to buy a new one soon...

Edited by Lando
Link to comment
Share on other sites

Error shows :

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************

System.FormatException: Input string was not in a correct format.

at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)

at System.Number.ParseSingle(String value, NumberStyles options, NumberFormatInfo numfmt)

at System.Single.Parse(String s, NumberStyles style, NumberFormatInfo info)

at KSP_PartGen.Form1.recalc()

at System.Windows.Forms.Control.OnClick(EventArgs e)

at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

at System.Windows.Forms.Control.WndProc(Message& m)

at System.Windows.Forms.ButtonBase.WndProc(Message& m)

at System.Windows.Forms.Button.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************

mscorlib

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.5472 (Win7SP1GDR.050727-5400)

CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll

----------------------------------------

KSP_PartGen

Assembly Version: 1.0.0.0

Win32 Version: 1.0.0.0

CodeBase: file:///D:/BLa/PartGen3.1/KSP_PartGen.exe

----------------------------------------

System.Windows.Forms

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

----------------------------------------

System

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

----------------------------------------

System.Drawing

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

----------------------------------------

System.Configuration

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

----------------------------------------

System.Xml

Assembly Version: 2.0.0.0

Win32 Version: 2.0.50727.5476 (Win7SP1GDR.050727-5400)

CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

----------------------------------------

************** JIT Debugging **************

To enable just-in-time (JIT) debugging, the .config file for this

application or computer (machine.config) must have the

jitDebugging value set in the system.windows.forms section.

The application must also be compiled with debugging

enabled.

For example:

<configuration>

<system.windows.forms jitDebugging="true" />

</configuration>

When JIT debugging is enabled, any unhandled exception

will be sent to the JIT debugger registered on the computer

rather than be handled by this dialog box.

I can hit continue but then I cant do nothing in generator.

Link to comment
Share on other sites

A very useful mod! :)

The "template" texture, and a couple of the others, is a bit too narrow, so leaves a black stripe running down the part. Tested with a 1.25m cylinder and a cone. The resulting racing stripe doesn't look half bad on a cylinder, but was ugly on the cone.

Link to comment
Share on other sites

Well, we had this issue before. What OS do you use? I gues windows. I wil do some tests...

EDIT: Ok everything worked on win 8 with 150% can you make a screenshot?

OT: What graphics card do you use, I have to buy a new one soon...

Windows 7 x64

nVidia GTX 670

Samsung 40 inch TV, using HDMI input from video card, 1920x1080

DPI Scaling set to 200%

screenshot.png

Edited by neamerjell
Link to comment
Share on other sites

Windows 7 x64

nVidia GTX 670

Samsung 40 inch TV, using HDMI input from video card, 1920x1080

DPI Scaling set to 200%

[ IMG ]

Well, it looks ok (nothing overlapping ect.), but to large...

so it scales with your 200%. There has to be a vay to disable the scaling for that program. But I have no experience with this.

Error shows :

...

I can hit continue but then I cant do nothing in generator.

Hmm... "System.FormatException: Input string was not in a correct format."

Where are you from, or what language is your pc running?

That is the only thing comming to my mind atm. 64 bit is no problem.

A very useful mod! :)

The "template" texture, and a couple of the others, is a bit too narrow, so leaves a black stripe running down the part. Tested with a 1.25m cylinder and a cone. The resulting racing stripe doesn't look half bad on a cylinder, but was ugly on the cone.

well, can you make a list? I will fix them!

PS: I just "finished" the "career mode" :-)

Edited by Lando
Link to comment
Share on other sites

Well, it looks ok (nothing overlapping ect.), but to large...

so it scales with your 200%. There has to be a vay to disable the scaling for that program. But I have no experience with this.

If I right click the .exe, and click "Disable Display Scaling for this Program", it looks like this (equally unusable):

disablescaling1.png

disablescaling2.png

disablescaling3.png

Link to comment
Share on other sites

Well, for most of the parts I use V = h* pi * r² * k

for cones and adapters V = 1/3 * h* pi * r² * k

Edit: k is a factor to get the same Volume as stock tanks

Edited by Lando
Link to comment
Share on other sites

[ img ] image.url [ /img ] would work, but I can't get a direct url to that image...

I am just to stupid...

you can't make engines atm, but a lot of other stuf

example tutorials about what?

using the tool or customising it?

it's realy simple to use!

EDIT: there is an issue with "." and "," for example 1,234t is 1.234t not 1234t

I did make an engine with it, and it worked quite well. It didn't have any SFX like other engines, but it works. I just copied the engine module from one of the stock engines.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...