project-navigation
Personal tools

Author Topic: Export blender vegetation models to md2  (Read 9705 times)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Export blender vegetation models to md2
« on: August 23, 2010, 10:05:18 am »
It would be nice if someone could please export the models in this blender file into the md2 format (with the correct scale and centered to 0,0,0) (for the scale just import one of the existing md2 files)

http://ufoai.svn.sourceforge.net/viewvc/ufoai/ufoai/data_source/models/dim_arboretum.blend?view=log

Thanks a lot.

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Export blender vegetation models to md2
« Reply #1 on: August 23, 2010, 02:54:21 pm »
If you don't mind waiting a day (today I've got a lot of other stuff to do outside of UFO:AI), I can take care of it.

If anyone else wants to do it sooner, please remember to export just one animation frame - the default MD2 export script for Blender will export many frames, resulting in a much larger MD2 file.

(IIRC there is a single-frame export config file somewhere in the trunk, in one of the folders, to avoid this issue and make it easier.)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Export blender vegetation models to md2
« Reply #2 on: August 24, 2010, 11:09:02 am »
that would be cool - thanks - i'm waiting

http://static.ufo.ludwigf.org/html/models/objects/vegi/license-unknown.html

here are the models that we have to replace - i hope some of them would fit

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Export blender vegetation models to md2
« Reply #3 on: August 25, 2010, 05:36:59 am »
How does this look for the scale of the trees (compared to the soldier)?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Export blender vegetation models to md2
« Reply #4 on: August 25, 2010, 07:39:38 am »
compared to all our other trees a little bit too big imo ;)

btw. it would be nice if you could also split them to the several levels if they are going to get bigger - see the fir md2 model in the objects/vegetations directory.

thanks a lot

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Export blender vegetation models to md2
« Reply #5 on: August 25, 2010, 08:34:04 am »
compared to all our other trees a little bit too big imo ;)

OK, I can shrink them a little - trees do vary widely in size, after all, and I wasn't sure how big these trees were supposed to be.

btw. it would be nice if you could also split them to the several levels if they are going to get bigger - see the fir md2 model in the objects/vegetations directory.

I'll take a look.

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Export blender vegetation models to md2
« Reply #6 on: August 25, 2010, 10:05:11 am »
Personally, I think the scale was good. Our existing trees are quite small and don't give much of an impression of a forest. It would be nice to have some larger ones, though it may introduce difficulties in finding/controlling units on the ground in a forest.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Export blender vegetation models to md2
« Reply #7 on: August 25, 2010, 10:53:15 am »
but did you see the size of the leaves? we would need higher resolution textures then.

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Export blender vegetation models to md2
« Reply #8 on: August 25, 2010, 01:12:07 pm »
That's a good point. I could definitely make some new textures for them.

Destructavator: could you output the one on the right (the broad leaf, not the pine) in a smaller size, and the pines in their current size? I could create new textures for the pine, but the broad leaf should definitely be smaller.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Export blender vegetation models to md2
« Reply #9 on: August 26, 2010, 07:44:10 pm »
any progress on this front? ;)

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Export blender vegetation models to md2
« Reply #10 on: August 26, 2010, 08:24:10 pm »
any progress on this front? ;)

Sort of - I think that for realism we really do need some large trees, for forest areas, but upon examining the model inside Blender it looks like it might be less messy for me to create my own models of tree parts rather than try to break up these existing ones into sections by height, for the different map levels.

The pine trees actually appear to have a rather simple design - the branch/leaf texture is repeated and split into four quarters of a 2D plane, and those four sections of the plane are bent downward for each branch.

@H-Hour: Can you create a leaf/branch texture as shown in the attached pic for various types of trees?  For new textures the branches would have to go straight across the horizontal axis, like the existing one shown.

@Mattn: If I make sections for spanning multiple map height levels, wouldn't it be easy to have each level/model rotated along the vertical axis by a random amount during map creation?  This would randomize the trees, so they don't look like clones, and allow creation of a more realistic-looking forest, because the branches would be rotated to be in different places for each tree.

If you'd like, I could also attach TAGs (since models used for maps support them now) to the bottom-most section of each tree, and all the model parts that make up sections of the tree's trunk above it could be attached, allowing the tree to bend or sway in weather.  The only question I have about such a setup is whether or not the upper parts can still be switched visible/invisible, for when the player is viewing things at a lower vertical map level (and wouldn't want to see the upper parts of each tree).

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Export blender vegetation models to md2
« Reply #11 on: August 26, 2010, 10:23:39 pm »
well, if you could animate the trees then we would need tags, too - for static models we don't need them.

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Export blender vegetation models to md2
« Reply #12 on: August 27, 2010, 09:34:48 pm »
Destructavator, yes, I can make the branch texture for a pine at least. They can be time consuming and broad leaf branches can be much more difficult to construct. But let's see where we are when one is done. Might not happen super quick since I'm away until next week.