The Forum is up for sale: XeNTaX Forum looking for new owner

publicly importing DoA3 to Noesis(voyearism, gang bang)

Post questions about game models here, or help out others!
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4231
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1139 times
Been thanked: 2222 times

Re: publicly importing DoA3 to Noesis(voyearism, gang bang)

Post by shakotay2 »

b0ny wrote:but when calculating the angle between the generated normal and vertice's normals i get a complex number, and python gives me an error because of this. how do i fix the angle function to avoid these complex numbers.
python console: "ValueError: negative number cannot be raised to a fractional power"
This is python 2.6.2.

python 3(?): "TypeError: unorderable types: int() > complex()"
So, yes, old pythons message is "straight forward", new one is too sophisticated, isn't it?
veclengtha = sum([a for i in range(len(a))])**.5 #Calculates the size of a vector

There's the square missing for the vector components. This ends up in the square root of a negative number.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: publicly importing DoA3 to Noesis(voyearism, gang bang)

Post by MrAdults »

There's no reason to be doing any of that. Use NoeVec3/NoeMat43/etc. It performs better and isn't as ugly.
b0ny
mega-veteran
mega-veteran
Posts: 239
Joined: Sat May 22, 2010 10:10 am
Has thanked: 22 times
Been thanked: 121 times

Re: publicly importing DoA3 to Noesis(voyearism, gang bang)

Post by b0ny »

Image

Noesis import script for Dead or Alive 3 characters (thanks guys for helping me with this script)

importing for now mesh only, character skins only (optionally textures from doax/doau)

so:
- Noesis supports only cubemap environment textures, while doa3's environmet textures are 2d matcap like.

- some doa3 headers of the cat files have an unknown encryption

- kasumi00 is missing heaps joints and some foot parts - should find why is that so
- zack01 crashes if calculating vector's angle with Noesis built in functions - to do

- team ninja in doa3 format don't use weights for bending, they use the some shit that works on the morphing principle by replacing the location/normal vector from the vertex buffer with some calculated value.
it multiplies the matrices of the bodyparts the joint is joining then operates with some scale and bending(?) vectors from the joint's data(for doao is called some d3d9 method i can't identify), then it's added to some base (?morph)target and swaps the location vector shown in the indices list.

has anyone before broke in the doa joints format?
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: publicly importing DoA3 to Noesis(voyearism, gang bang)

Post by MrAdults »

If you mean an actual crash where Noesis exits completely, please send the script, model, and anything else I may need to reproduce it.
b0ny
mega-veteran
mega-veteran
Posts: 239
Joined: Sat May 22, 2010 10:10 am
Has thanked: 22 times
Been thanked: 121 times

Re: publicly importing DoA3 to Noesis(voyearism, gang bang)

Post by b0ny »

i don't now why i used this word. it just shows a python error window with zero division error. i haven't detected any stability problems with noesis
Doronetty
advanced
Posts: 53
Joined: Thu Jun 03, 2010 11:05 am
Has thanked: 26 times
Been thanked: 3 times

Re: publicly importing DoA3 to Noesis(voyearism, gang bang)

Post by Doronetty »

Thanks a lot 4 script!
Have you any plan to make also *.olk SC2 support (like Greed Xplorer) or even SC3?! :wink:
b0ny
mega-veteran
mega-veteran
Posts: 239
Joined: Sat May 22, 2010 10:10 am
Has thanked: 22 times
Been thanked: 121 times

Re: publicly importing DoA3 to Noesis(voyearism, gang bang)

Post by b0ny »

Doronetty wrote:Thanks a lot 4 script!
Have you any plan to make also *.olk SC2 support (like Greed Xplorer) or even SC3?! :wink:
i started this "project" to discover the potential of noesis, and research on the doa3 format. and i'm not really interested in doa3 format - i'm only interested in porting it correctly to doao(doa2u), and documenting joints format(too dumb though to do that).

but i'm not interested in soul calibur at least for now. why not using greed xplorer(pcsx2) and capture the 3d model from it's viewport with a directx(opengl?) ripper. also i think i've seen mariokarts64 modding a version of soul calibur, you should check on his channel on youtube...
Last edited by b0ny on Wed Aug 14, 2013 4:47 am, edited 1 time in total.
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: publicly importing DoA3 to Noesis(voyearism, gang bang)

Post by MrAdults »

That's completely wrong, again. And on export, too, you can use globally-indexed mesh data. I think you have the problem of miscomprehending most of what I try to tell you and moving on under your poor assumptions instead of taking the time to reprocess.
b0ny
mega-veteran
mega-veteran
Posts: 239
Joined: Sat May 22, 2010 10:10 am
Has thanked: 22 times
Been thanked: 121 times

Re: publicly importing DoA3 to Noesis(voyearism, gang bang)

Post by b0ny »

MrAdults wrote:That's completely wrong, again. And on export, too, you can use globally-indexed mesh data. I think you have the problem of miscomprehending most of what I try to tell you and moving on under your poor assumptions instead of taking the time to reprocess.
ok. then fix for me, to see what i'm doing wrong, this example script to load both materials in one mesh:

Code: Select all

#Noesis test script, pretends to open *.txt files to run itself
from inc_noesis import *
import noesis
import rapi #rapi methods should only be used during handler callbacks
import struct

def registerNoesisTypes():
    handle = noesis.register("test script", ".txt")
    noesis.setHandlerTypeCheck(handle, noepyCheckType)
    noesis.setHandlerLoadModel(handle, noepyLoadModel) #see also noepyLoadModelRPG
    noesis.logPopup()
    return 1

def noepyCheckType(data):
    return 1

def noepyLoadModel(data, mdlList):
    vtxdata = struct.pack("<20f", 1,1,0, 1,1,  1,-1,0, 1,-1,  -1,-1,0, -1,-1,  -1,1,0, -1,1)#four vertices with location and uv
    mat1idxdata = struct.pack("<3H", 2,1,0)#first triangle uses the material mat1
    mat2idxdata = struct.pack("<3H", 0,3,2)#second triangle uses the material mat2

    matList = []
    material = NoeMaterial("mat1", "")
    material.setDiffuseColor(NoeVec4([0.0, 0.0, 1.0, 0.0]))
    material.setDefaultBlend(0)
    matList.append(material)
    material = NoeMaterial("mat2", "")
    material.setDiffuseColor(NoeVec4([1.0, 0.0, 0.0, 0.0]))
    matList.append(material)

    ctx = rapi.rpgCreateContext()
    meshname = "meshwithtwomats"
    rapi.rpgSetName(meshname)
    rapi.rpgSetMaterial("mat1")
    rapi.rpgBindPositionBufferOfs(vtxdata, noesis.RPGEODATA_FLOAT, 20, 0)
    rapi.rpgBindUV1BufferOfs(vtxdata, noesis.RPGEODATA_FLOAT, 20, 12)
    rapi.rpgCommitTriangles(mat1idxdata, noesis.RPGEODATA_USHORT, 3, noesis.RPGEO_TRIANGLE, 1)

##    rapi.rpgSetName(meshname)
    rapi.rpgSetMaterial("mat2")
    rapi.rpgCommitTriangles(mat2idxdata, noesis.RPGEODATA_USHORT, 3, noesis.RPGEO_TRIANGLE, 1)#not allowing to add this data to the same mesh
    rapi.rpgClearBufferBinds()

    mdl = rapi.rpgConstructModel()
    mdl.setModelMaterials(NoeModelMaterials([], matList))
    mdlList.append(mdl)
    return 1
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: publicly importing DoA3 to Noesis(voyearism, gang bang)

Post by MrAdults »

You're misunderstanding what a "mesh" is at the fundamental level. It's just a draw. For multipass draws on the same mesh you use additional passes in the material. This reflects the way every piece of dedicated graphics hardware has operated over the last 20 years.

If you then want the model as a flat vertex/index array on export (you're still going to have to specify unique draws for each material, just like DOA does), you can just use the model's globalVtx and globalIdx lists. That's why they exist. So that you can be lazy.
b0ny
mega-veteran
mega-veteran
Posts: 239
Joined: Sat May 22, 2010 10:10 am
Has thanked: 22 times
Been thanked: 121 times

Re: publicly importing DoA3 to Noesis(voyearism, gang bang)

Post by b0ny »

MrAdults wrote:If you then want the model as a flat vertex/index array on export (you're still going to have to specify unique draws for each material, just like DOA does), you can just use the model's globalVtx and globalIdx lists. That's why they exist. So that you can be lazy.
can you be more detailed about globalVtx and globalIdx lists? can't find any description anywhere. how to access these from rapi interface? are those per mesh or per the whole model? maybe some links to more detailed description...
Last edited by b0ny on Wed Aug 14, 2013 4:48 am, edited 1 time in total.
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: publicly importing DoA3 to Noesis(voyearism, gang bang)

Post by MrAdults »

That wasn't mean, it was blunt. And they're just Python lists. Print them out and investigate, and/or see remarks in inc_noesis.py. They're a couple of the many thousands of things lacking documentation in Noesis.
b0ny
mega-veteran
mega-veteran
Posts: 239
Joined: Sat May 22, 2010 10:10 am
Has thanked: 22 times
Been thanked: 121 times

Re: publicly importing DoA3 to Noesis(voyearism, gang bang)

Post by b0ny »

MrAdults wrote: And they're just Python lists. Print them out and investigate, and/or see remarks in inc_noesis.py.
yeah, i've seen the inc_noesis.py, but these are part of "mesh" class and i don't have a mesh object when using the rapi interface.(right?)
MrAdults wrote:They're a couple of the many thousands of things lacking documentation in Noesis.
*sigh*
Last edited by b0ny on Wed Aug 14, 2013 4:48 am, edited 1 time in total.
User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 4231
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 1139 times
Been thanked: 2222 times

Re: publicly importing DoA3 to Noesis(voyearism, gang bang)

Post by shakotay2 »

b0ny wrote:see i'm right and you are wrong
Ehm, well, you're partially right, b0ny.

Noesis is a strong tool if you know how to use it.

I'd like to start reading this thread from the beginning again to see whether I could contribute a little bit.

But seeing you're coding things that are usually hidden in a graphics library (or blender or Noesis) I'm seeing your dilemma. (Which is mine, too.)

I would like to check your Noesis script - but I'm lacking in a DOA3 sample.
So if you don't mind sending me one via PM?
If so I could have a look and maybe help. But don't expect too much.

(A documentation for Noesis covering all the special aspects of 3D coding you and alsair are wanting to implement would be a dream. And it will be, I guess.)
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b0ny
mega-veteran
mega-veteran
Posts: 239
Joined: Sat May 22, 2010 10:10 am
Has thanked: 22 times
Been thanked: 121 times

Re: publicly importing DoA3 to Noesis(voyearism, gang bang)

Post by b0ny »

trololo post
Last edited by b0ny on Wed Aug 14, 2013 4:49 am, edited 1 time in total.
Post Reply