PDA

View Full Version : Blender M15 export script Version 1.02



Michael Hartlef
17-03-2007, 00:42
Hi folks,

a rather small update. Each material is now exported as a layer. If you would like this optional, then please let me know.

Grab it from this topic: http://community.thinbasic.com/index.php?topic=593.msg3116#msg3116

Michael

kryton9
17-03-2007, 08:06
Mike, can you give an example when you have some time. Does the object also layer? Sorry for my confusion, but thanks for this next big step!!

Petr Schreiber
17-03-2007, 11:45
Hi Mike,

this sounds great.
I think it is not needed to be optional as it has no negative impact on performance and only positive "side effects" for animating.

Bye,
Petr

Michael Hartlef
17-03-2007, 11:58
Mike, can you give an example when you have some time. Does the object also layer? Sorry for my confusion, but thanks for this next big step!!


Do you mean, if a scene has several meshes, then for each object a layer? No, right now it only works properly it it is one mesh. Just that each material will turn into a layer. For assembled models I suggest you are using version 101 for now.

kryton9
17-03-2007, 20:53
Ok Mike I will experiment today with it later when I get home. Got to run errands and then reward myself by going shopping. Right now I will get the cordless gamepad. I couldn't find a cordless force feedback joystick yet. Probably consumes too many batteries so they are tethered by a chord but will enjoy the new gamepad for awhile and then since I already have a regular joystick use that for now and when it wears out get a force feedback one then.

kryton9
18-03-2007, 08:34
THanks Mike, I made a cube with 6 different colors for each side and it exported perfectly to m15. Thanks!!

kryton9
28-03-2007, 11:40
Mike here is a test file I made tonight. It looks like a volkswagen in space :)

Anyways, it has the same texture, the Luna transports corporation logo on both sides of the shuttle. I had to use it twice so it showed up properly on both sides and not mirrored.

I thought if you are working with image texture in your export script, you could use this as a test.

Right now it exports the colors applied in Blender as materials just fine.

Petr you can use this as a test ship for your thrust particles experiment. Don't worry this one turned out too ugly to be a player ship, but we can still use it in the background for movie scenes. This ships was just too low tech and not far into the future enough. Like I said it looks like someone took a Volkswagen Van from the not too distant future and stuck it on a rocket engine :)

Michael Hartlef
28-03-2007, 11:45
Looks very good. But where is the blender file?

Michael Hartlef
28-03-2007, 11:47
This is a space bus :) Next stop, New Berlin flight academy!

Petr Schreiber
28-03-2007, 13:08
Hi,

I like Volkswagen vans, good to know they still exist in future ;D
Mike, model is in "Desktop.rar", looks very good with smoothed shading too.

Great work kryton, I will use it for my mad experiments !


Bye,
Petr

P.S. The "bumped" doors and antena are nice details !

Michael Hartlef
28-03-2007, 16:02
Mmmh, I'm at work and when I open the RAR file, only the texture file shows up.

I will tackle the export script tonight so Kent is able to export this in it's full beauty. Thanks for the test file.

kryton9
28-03-2007, 20:32
Glad you guys liked it, but please remember I will make still a better one for player vessel. But I figure we need all sorts of ships so I will save all the models to be used in backgrounds. I deleted the too sleek version and now wish I hadn't.

For some reason my texture baking in blender is not working now. So that model is not texture baked. I just applied 2 textures for the top side panels. I colored the windows black in blender and the rest of the ship is white. The shading is just coming from the render in blender.
But with the lighting in the game it should look similar.

My Dad called, I have to run today and tomorrow. I thought I would be home to work these 2 days, but alas not the case. I will get to work on the next version when I get home. Hope to have something soon again.

One thing I did notice, for decal and emblem placement on models, I am going to try to design panels where they will apply. This way, no need to texture bake. You can just place the decals and emblems on those surfaces. So something to keep in mind when modeling from now on to model the surface plane in the shape of the decal we want.

Mike, thanks the new addition to the script will probably be difficult to add, but I do appreciate it!!

Petr Schreiber
28-03-2007, 20:59
Hi kryton,

enjoy following days!
The model does not show the texture properly in both Blender and thinEdge, but this is probably related to problem you mentioned. Light baking is not necessary in this case, better to be directed using in game lights.

Please see attached image.

I must say I am really amazed by this model details, I like the fuel tanks and nozzles on the bottom.


Bye and thanks,
Petr

Michael Hartlef
28-03-2007, 21:04
I hope I have something to play with for you when you are back. Have a good time. :)

kryton9
29-03-2007, 02:46
Petr If you just press F12, to do a render the texture should appear just fine in the render. Let me know if it doesn't work that way.
Mike is working on the export script to handle the image textures. It has got to be tricky I would imagine!

Mike, take your time. I am sure you will get as you seem to solve tough problems with ease like Petr. i realize i have to work on my modeling and plan things better as I work. So it is a great learning experience. The next model I want to make controllable with the gamepad, so I will try to do it in parts that fit together.

That will give Petr something to work with to test out his new engine design for mission games.

Petr Schreiber
29-03-2007, 08:34
Hi,

yes, with [F12] it works.
in this case it is easy to arrange it correctly back using thinEdge, as the luna stripe is on one polygon, mapped 1:1.
But direct exporter support would be nice :). I am sure Mike will get it working.


Thanks a lot,
Petr

Michael Hartlef
29-03-2007, 10:29
Yes, it renders fine, but when you look into the U/V editor, it looks like just one polygon is only mapped to the texture. But there are two materials with the same texture, so maybe the others (the rest of one side and the other side is mapped to the other texture. Have to check that.

kryton9
29-03-2007, 21:13
Yes, the one texture is applied differently to each side and the one face they are applied to. They both were tweaked with Blenders controls to fit the space and have the correct rotation and to be read correctly from either side of The Bus.

There are 4 materials, 2 are just blender colors assigned. One white for the body, one black for the windows. I assigned a red color to the panels where the logo will go. Then I loaded the same texture into the other 2 red colored materials and then tweaked the texture settings to fit and orient properly.

When I get to the next model, I will texture bake again and see how that works with all the logos applied to one texture. That should make it a lot easier.

Michael Hartlef
29-03-2007, 22:04
Hi Kent, I will fix the exporter so you can use more then one material with a texture.

BUT... you still have to use UV-Mapping. You used orthographic mapping and that only works for Blender, not for thinBasic.

kryton9
30-03-2007, 02:15
Oh I see, thanks Mike. When you think about it, it does make sense, but nice to confirm it. Thanks, now that I got texture baking figured out again, I will do that as this way only one texture is required for the entire model. Can't beat that :)

But for other projects having the multiple texture export will be nice, especially if we do a whole set, like an interior with many objects and of course their texture maps. So a very useful feature for sure. Will be much appreciated!!

Michael Hartlef
30-03-2007, 14:35
Once I find out how to code certain things in python, then I'm on my track. I had to change the way textures where retrieved. For all and for a single face. Now I have to find a speedy way of looking that up. I hope I have it done by sunday. Next week I have off, but the week after I'm gone for 5 days. A little vacation and no computers at site :)

kryton9
31-03-2007, 01:30
Have a nice vacation Mike! Rest up and recharge your batteries during this time. Computers or no computers, I am sure you will think about stuff while on your break :)