Results 1 to 4 of 4

Thread: MaxScript

  1. #1
    Member Contributor
    Join Date
    Oct 2000
    Location
    london, england
    Posts
    76

    MaxScript

    Dose any one know of a good max script that can be used to export model vertecies along with the texture coordinates. I have a script which exports the vertecies but in doing so i loose the texture coordinates.

    The Script also captures frame out put. The reason i am doing this is for fast loading and increased performance in my demos. I any one has a good script can u send it to me

    e-mail: ZeeBoy@techillusion.co.uk

    any help would me most appriciated

    Thanxs


    ZeeBoy
    Later

    Zee

  2. #2
    Senior Member Frequent Contributor
    Join Date
    Aug 2000
    Location
    Portsmouth, Hampshire, England
    Posts
    926

    Re: MaxScript

    I used to use max scripts... heres one that outputs texture coords.

    Code :
    filename = "c:\\" + $.name as string + ".hto"
    myfile = createFile filename
     
    print $.name to: myfile
     
    print "MATERIALS" to: myfile
    print sceneMaterials.count to: myfile
    --for i= 1 to sceneMaterials.count do
    --(
    --	print sceneMaterials[i].diffusemap.filename to: myfile
    --)
     
     
    -- This prints out the vertex data of the normals of the object.
    print "VERTICIES" to: myfile
    print $.verts.count to: myfile
    for i= 1 to $.verts.count do
    (
    	print $.verts[i].position to: myfile
    )
     
    -- this prints out the normals, currently the mode is undefined. face normals.
    print "NORMALS" to: myfile
    for i= 1 to $.verts.count do
    (
    	norm = getnormal $ i
    	print norm to: myfile
    )
     
    --This prints out the vertex colors of the object.
    --printf "VERTEX COLORS" to: myfile
    --for i= 1 to $.verts.count do
    --(
    --	col = getVertColor $ i
    --	print col to: myfile
    --)
     
    -- This then prints out the face indexes, i.e. the set of indexes which make up
    -- each face.
    print "FACE INDEXES" to: myfile
    print $.numfaces to: myfile
    for i= 1 to $.numFaces do
    (
    	k = getface $ i
    	print k to: myfile
    )
     
    -- Print out the material id for each face.
    print "MATERIAL IDS" to: myfile
    for i= 1 to $.numfaces do
    (
    	m = getfacematid $ i
    	print m to: myfile
    )
     
     
    -- Now we will output the texture coords.
    print "TEXTURE COORDS" to: myfile
    m = getNumTVerts $
    print m to: myfile
    for i= 1 to getNumTVerts $ do
    (
    	l = getTVert $ i
    	print l to: myfile
    )
     
     
    print "TEXTURE INDEXES" to: myfile
    for i= 1 to $.numFaces do
    (
    	m = getTVFace $ i
    	print m to: myfile
    )
     
     
    print "END" to: myfile
     
    close myfile
    Not sure if the material stuff works though.
    hope that helps.

    Nutty



    [This message has been edited by Nutty (edited 12-08-2000).]

  3. #3
    Member Contributor
    Join Date
    Oct 2000
    Location
    london, england
    Posts
    76

    Re: MaxScript

    Thanks a lot for ur input my freind. much appriciated
    Later

    Zee

  4. #4
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    milano, italy
    Posts
    282

    Re: MaxScript

    hi nutty.
    maybe you know how to do this.
    i wrote a ascii exporter for max, using MAXscript, but i've problems when extracting normals to verts.

    it seems that in maxscript you can only access one normal per vertex, when instead is correct to have multiple normals per vertex, as in the junction between different smoothing groups.

    .ase follow this rule, in fact in the normals section you get 4 normals each face.

    can you help me?
    or better, where i can find resources?

    thanx
    DMY
    Dolo/\/\ightY

Similar Threads

  1. Creating a collada effect with Maxscript
    By ChrisWhatever in forum COLLADA
    Replies: 1
    Last Post: 03-03-2010, 12:42 AM
  2. 3dsMax exporter (maxscript question)
    By lowelllynnduke in forum COLLADA
    Replies: 7
    Last Post: 03-26-2006, 11:41 AM
  3. error in MaxScript of Collada exporter ?
    By chris_haarmeijer in forum COLLADA
    Replies: 7
    Last Post: 06-23-2005, 06:34 PM
  4. fast exporting using maxscript
    By melax in forum COLLADA
    Replies: 1
    Last Post: 12-02-2004, 12:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean