Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Topgun on August 07, 2007, 06:49:52 pm

Title: smoothing in blender
Post by: Topgun on August 07, 2007, 06:49:52 pm
is there any way to keep it?
Title: Re: smoothing in blender
Post by: akenbosch on August 07, 2007, 08:32:31 pm
"set smooth"

export> .x

convert>.cob


well, that and PCS2 auto-smooths converted models. (i consider it annoying, because some models i dont want smoothed)
Title: Re: smoothing in blender
Post by: Vasudan Admiral on August 07, 2007, 10:21:03 pm
You got PCS 2 to convert with full smoothing? What texture settings did you use?
My recent tests seem to suggest full smoothing isn't possible with PCS2 ATM, and I'm trying to gather info on it before bug-reporting. I'm not really sure if the things I'm seeing are a result of a bad test model or bad smoothing interpretation. :\


And Topgun, no not from what I've seen. It may be possible, but I doubt it.
Title: Re: smoothing in blender
Post by: akenbosch on August 08, 2007, 12:49:37 pm
not full smoothing, more like semi-smoothing. but smoothing, none the less.
Title: Re: smoothing in blender
Post by: Topgun on August 08, 2007, 02:50:56 pm
well then, what should I use to smooth my models?
Title: Re: smoothing in blender
Post by: akenbosch on August 08, 2007, 02:55:34 pm
MAX, rhino, or wings3d, i guess.
Title: Re: smoothing in blender
Post by: Roanoke on August 08, 2007, 03:20:12 pm
not full smoothing, more like semi-smoothing. but smoothing, none the less.

"semi smoothing"  ??
Title: Re: smoothing in blender
Post by: akenbosch on August 08, 2007, 03:33:48 pm
i dont know the proper word for it  :doubt:
Title: Re: smoothing in blender
Post by: Vasudan Admiral on August 09, 2007, 12:24:23 am
well then, what should I use to smooth my models?
If you're currently opening up the model in TS to do hierarchy, then that'd be where you set up smooth groups too. (If don't know how, just ask) :)
Title: Re: smoothing in blender
Post by: Topgun on August 09, 2007, 01:45:01 pm
I don't know how.
Title: Re: smoothing in blender
Post by: Water on August 09, 2007, 08:37:23 pm
VA - That script I got you to test does export smoothing. It's set to auto smooth with an angle of 0 deg
Choices are Faceted, Auto-smooth+angle and Smooth

If you let me know the best choice/guess I can have that done for tomorrow. It will be on a full model basis (global), so may not be much use to you.
Title: Re: smoothing in blender
Post by: Vasudan Admiral on August 10, 2007, 04:29:44 am
Water:
Oh, it can too - nice. :)
I was more refering to being able to read what smoothing you set up in the .BLEND file and correctly interpret that when saving the .COB, but this is still cool.

As to what it should be as default, Auto-smooth with an angle of 32 is a good default I'd say. :)


Topgun:
Ok, when you have the model open in TS, bring up the material editor. (Should be a paint pallet icon bottom of the screen)
In the material editor window, one button up from the bottom is the smoothing control. Click and hold it and it will show you the options: Faceted, Auto-Faceted and Smooth. If you select Auto-Facet and then right click it, you will be given the option to change the autofacet angle. (32 is usually good for most things)

Every time you change the smoothing at all, TS will consider it to be a different material, but PCS2 will only look at what texture map it uses. What this means is that you could have one material applied to the whole ship, and then heaps of different smoothing types all over.
Say your ship had a cylindrical part that needed smoothing, while the rest was supposed to be auto-faceted. You would first set the material to auto-facet and apply it to the whole model. Then you would change to smooth and paint over the texture on the cylindrical part.
When you convert with PCS2, you should find that the model is autofaceted with the cylinder smoothed - and there you have two smoothgroups. :)
Title: Re: smoothing in blender
Post by: Water on August 10, 2007, 06:43:58 am
Export script for Blender:
Smoothing set to auto @ 32 degrees. You may need to download Python to get it to run.
You can't open the cob file in PCS2 yet as hierarchy is not exported properly.
Object centers are in the correct place.
Just drop .py file in the Blender scripts directory.
truespace_FS2_basic-export.zip (http://homepages.paradise.net.nz/pcantwel/dl/truespace_FS2_basic-export.zip)
Title: Re: smoothing in blender
Post by: Vasudan Admiral on August 10, 2007, 07:32:30 am
You can open the cobs in PCS2 actually - and because PCS2 allows you to modify the hierarchy, with some careful setup you can export fully operational models via tinkering. :)

It really only needs to able to export hierarchy before it's powerful enough to entirely replace TS, but it's flippin' close as is - and that is just brilliant. :D

The cockpit mesh in the layout thread was converted using only Blender and Water's script for example, which reminds me of the last point. With this script, one Blender unit is equal to one Truespace meter, so the standard PCS 2 conversion scaling factor works exactly as it should.
Title: Re: smoothing in blender
Post by: Water on August 10, 2007, 06:03:58 pm
Update: truespace_FS2_basic-export.zip (http://homepages.paradise.net.nz/pcantwel/dl/truespace_FS2_basic-export.zip)

Changed the script to export auto smoothing angle per mesh object.
Title: Re: smoothing in blender
Post by: akenbosch on August 10, 2007, 06:20:20 pm
is this exclusively for the 2.44, or will it work on 2.42 as well? because the only one i have with 3.ds import is 2.42.
Title: Re: smoothing in blender
Post by: Vasudan Admiral on August 10, 2007, 06:35:36 pm
All of the versions have the 3ds import and export scripts. This script also should work in all versions. If it fails, you probably need to download the latest version of python as Water suggested: http://www.python.org/download/releases/2.5.1/
Title: Re: smoothing in blender
Post by: Water on August 10, 2007, 07:34:05 pm
is this exclusively for the 2.44, or will it work on 2.42 as well? because the only one i have with 3.ds import is 2.42.

Give it a try and let me know.  ;)
Title: Re: smoothing in blender
Post by: akenbosch on August 11, 2007, 02:50:25 pm
yeah...but it exports bad geometry on 2.42.
Title: Re: smoothing in blender
Post by: Water on August 11, 2007, 03:56:33 pm
yeah...but it exports bad geometry on 2.42.
Your saying 2.42 and this script exports bad geometry?

What sort of bad geometry?
Title: Re: smoothing in blender
Post by: akenbosch on August 11, 2007, 04:00:14 pm
just double faces here and there...not serious, but a pain to deal with.
Title: Re: smoothing in blender
Post by: Water on August 11, 2007, 04:06:13 pm
just double faces here and there...not serious, but a pain to deal with.
If you post or PM the Blend file, I'll take a look.
Title: Re: smoothing in blender
Post by: akenbosch on August 11, 2007, 04:14:30 pm
here it is. its an imported .x file, with some disconnected faces caused by the import.
Title: Re: smoothing in blender
Post by: Water on August 11, 2007, 04:40:52 pm
just double faces here and there...not serious, but a pain to deal with.
Just exported a model with 2.42a.
Face count and vertex count were the same in Blender and Truespace.
Thing is, I'll be left with the impression that the double faces are in your .blend file already  :P
Title: Re: smoothing in blender
Post by: akenbosch on August 11, 2007, 05:06:44 pm
this is a moment well deserving of one of HLP's "NOOB" pictures...
Title: Re: smoothing in blender
Post by: Water on August 11, 2007, 05:16:37 pm
this is a moment well deserving of one of HLP's "NOOB" pictures...
A pm link would protect your reputation  ;)