Topic: Blender to .mod scripts are there any working?  (Read 53549 times)

0 Members and 1 Guest are viewing this topic.

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Blender to .mod scripts are there any working?
« Reply #220 on: February 06, 2012, 12:59:14 am »
yeah, sorry.  I was working on the blender script to import .mod.  Ran into stuff I couldn't figure out at the time (how to do the textures on import).  I got it so it will bring in the mesh, but doesn't have the texture on it yet.

Have lots of projects being worked on will see if I can get back on this one in the near future, but can't say when.

If the mesh is importing all good!  :notworthy: :thumbsup: Gmax or milkshape can map the model if needed.
What Type of mesh was tested tris or quads?   
Import blender to .mod more usefull than the export from.mod .

I guess it would be tris, as they are triangles (although for some reason graphic stuff still call that a quad).

remapping a model would be a pain for some people.  So will have to re-check on how to do the textures.
The smell of printer ink in the morning,
Tis the smell of programming.

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Blender to .mod scripts are there any working?
« Reply #221 on: February 06, 2012, 01:01:49 am »
yeah, sorry.  I was working on the blender script to import .mod.  Ran into stuff I couldn't figure out at the time (how to do the textures on import).  I got it so it will bring in the mesh, but doesn't have the texture on it yet.

Have lots of projects being worked on will see if I can get back on this one in the near future, but can't say when.

If it will bring in the mesh, does it also retain the UV mappings, or are they stripped with the textures?

And as a thought, I don't suppose comparing the plugins for something that may be more complete (.3ds maybe?) for Blender against a similar import script for Max or Milkshape would help?  And I don't suppose anyone still has Chris' (Assimsoft's) old import/export stuff (AssimView) around anymore?  Darkdrone?  :)

right now the UV mapping is dropped.  Reason being I don't know what internal structures are used for the textures and how they work.  Will have to do a search on more docs and see if I can find it.  Since I don't know how the program holds the texture haven't been able to set it up for it.  It has been along time now, and python is not my language of choice so will have a learning curve to get back into it.  (plus time, never time).
The smell of printer ink in the morning,
Tis the smell of programming.

Offline FoaS_XC

  • Photorps, Sammiches, woot woot.
  • Global Moderator
  • Commander
  • *
  • Posts: 4571
  • Gender: Male
    • Robinomicon
Re: Blender to .mod scripts are there any working?
« Reply #222 on: February 06, 2012, 02:43:40 am »
Quads an Triangles in some ways are semantic distinctions and in some ways technical distinctions. When it comes to the MOD file (and most other simple object formats), A quad really is nothing more than two triangles seamed together by an edge. However: in advanced modelling apps (like 3ds Max) quad faces are a class (to use the programming context of the word "class") unto themselves, with separate methods (which sometimes are similar to those of distinct triangles).

(okay, technically object classes that have distinct methods for their quads are of a separate class from objects without quad-specific methods).

I'm fairly certain I remember how UVW mapping is stored by an object in 3ds Max - I know nothing behind the inner workings of blender, sadly :/

What I do know forces me to stress one particular point: in XYZ space (your typical 3d-space) a vertex can only have one location, its X,Y, and Z... However in UVW space, that same vertex can have N locations where N = number of faces said vertex is used in constructing (this upcoming example DOES get a tad more complicated when dealing with triangulation, but hold that thought): The corner of a cube can have a set 3 UVW coordinates. (with a triangulated cube, that number might be anywhere from 3 to 6, depending on how it triangulates).

this gets even MORE complicated when dealing with multiple mapping channels (think an array of 3 dimensional UVW spaces), but that falls out of the purview of what MOD files can do at this time.


Hope that helps rather than hinders :3
Robinomicon
"When I was 5 years old, my mom always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down “happy.” They told me I didn’t understand the assignment and I told them they didn’t understand life."

Offline Kreeargh

  • Retired.
  • Lt. Commander
  • *
  • Posts: 1476
  • Gender: Male
  • Life is as is worth only what you learn from it!
Re: Blender to .mod scripts are there any working?
« Reply #223 on: February 06, 2012, 10:52:32 pm »
http://blendernewbies.blogspot.com/2008/11/3d-mesh-topology-tip-quads-vs-triangles.html

No matter what the end result is ,.  Whatever to .modplugin is needed the most.  Export from .mod format is just a nother way of theift.  The " .Mod format is about the game" Convert to the game but do not rip from it!
« Last Edit: February 06, 2012, 11:19:05 pm by Kreeargh »
Time for life!

Offline marstone

  • Because I can
  • Commander
  • *
  • Posts: 3014
  • Gender: Male
  • G.E.C.K. - The best kit to have
    • Ramblings on the Q3, blog
Re: Blender to .mod scripts are there any working?
« Reply #224 on: February 08, 2012, 03:46:12 am »
thanks for the link for the read on quads and triangles.  It was interesting but doesn't help on the code side as I need.  As the .mod only uses triangles, it would be rough to try and figure out quads from them so the import will only have triangles. 

Export will be an interesting things as you have so many tools and ways for making a model in programs these days, and it has to convert to triangles when exported.

As for the import (or export) have to find better documentation on the structures that are underlying blender so I can do the translate to or from them.  So far, haven't located that much that helps, but looking slowly.
The smell of printer ink in the morning,
Tis the smell of programming.