Important information: this site is currently scheduled to go offline indefinitely by end of the year.

Spotlight: Señor Casaroja's Noesis

General game file tools that are useful for more than one game
ShinRa Inc
n00b
Posts: 10
Joined: Tue Aug 14, 2007 10:38 pm

Re: Señor Casaroja's Noesis

Post by ShinRa Inc »

Demonsangel wrote:http://usa.autodesk.com/adsk/servlet/pc ... d=10775855
FBX 2013.2 Converter for Windows (exe - 26327Kb)

Utility that converts between different versions of fbx and dae iirc. See if the -fbxtexext works for you and then just convert everything with the tool to dae.

If it still doesn't work at all, pm me the script( if it isn't builtin), one of the models and it's textures.
The FBX converter is displaying the Noesis exports correctly, but Blender is refusing to read any product from the FBX converter. And the .daes from FBX aren't working in Aurora, either.

There's no script to send, I've been using the manual menu commands. The .ff7ccmodel files contain the model and textures, I'll see about finding a place to upload one for you.
Satoh
mega-veteran
mega-veteran
Posts: 194
Joined: Sat May 09, 2009 3:07 pm
Has thanked: 13 times
Been thanked: 38 times

Re: Señor Casaroja's Noesis

Post by Satoh »

ShinRa Inc wrote:
Demonsangel wrote:http://usa.autodesk.com/adsk/servlet/pc ... d=10775855
FBX 2013.2 Converter for Windows (exe - 26327Kb)

Utility that converts between different versions of fbx and dae iirc. See if the -fbxtexext works for you and then just convert everything with the tool to dae.

If it still doesn't work at all, pm me the script( if it isn't builtin), one of the models and it's textures.
The FBX converter is displaying the Noesis exports correctly, but Blender is refusing to read any product from the FBX converter. And the .daes from FBX aren't working in Aurora, either.

There's no script to send, I've been using the manual menu commands. The .ff7ccmodel files contain the model and textures, I'll see about finding a place to upload one for you.
This is the failure of collada as a format... the 1.4.0 and 1.4.1 versions of teh formats aren't totally compatible with eachother and so many importers fail on one version or another...
and if you find a 1.3 version collada model... you are very very out of luck.

Blender not importing certain DAE's is one of the main reason I don't trust collada in general.
"Progress" can be a bitch.

Do let us know if you find any sort of reliable way to fix your DAE's.
ShinRa Inc
n00b
Posts: 10
Joined: Tue Aug 14, 2007 10:38 pm

Re: Señor Casaroja's Noesis

Post by ShinRa Inc »

I'm at a loss for anything else to try, to be honest. The collada format isn't my choice or preference, it's just what I'm forced into trying to get to work, since that's the only format that'll import.
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: Señor Casaroja's Noesis

Post by Demonsangel »

for me in the .dae noesis writes:

Code: Select all

  <library_images>
    <image id="Image">
      <init_from>../../noesis/ffccdif_0</init_from>
    </image>
  </library_images>
because it only has a name for the textures

the only thing I can advise is to manually change ll textures to

Code: Select all

  <library_images>
    <image id="Image">
      <init_from>c:/<your path>/ffccdif_0.png</init_from>
    </image>
  </library_images>
ShinRa Inc
n00b
Posts: 10
Joined: Tue Aug 14, 2007 10:38 pm

Re: Señor Casaroja's Noesis

Post by ShinRa Inc »

Unfortunately, that doesn't seem to be accomplishing anything in the long run. Still importing into Blender and Aurora untextured.
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: Señor Casaroja's Noesis

Post by MrAdults »

3.89 is up.
-3.89 - Added a generic input prompt method, noesis.userPrompt.
-3.89 - Added a new method for scripts to regiser tools, noesis.registerTool. New tools will be listed under the Noesis "Tools" menu once they're registered.
-3.89 - Added anaglyphic stereoscopic rendering, which can be enabled through the data viewer. (Persistent settings->View->Anaglyph 3D) Anaglyphic rendering obeys all of the same stereo settings as quadbuffered stereo rendering. (quadbuffering is only functional, to my knowledge, on nVidia Quadro cards)
-3.89 - Fixed matrix translation being uninitialized memory when converting a quaternion to a 4x3 matrix in Python.
-3.89 - User preference version value has been changed, so your preferences will be reset when you run this version.
-3.89 - Other assorted fixes and additions that I've lost track of.
Here's an example script showing how to register a tool and how to use noesis.userPrompt. You can save it as tool_test.py in your python folder to test it.

Code: Select all

from inc_noesis import *
import os

def registerNoesisTypes():
	handle = noesis.registerTool("&Test tool script", testToolMethod)
	return 1

def testValidateInput(inVal):
	if os.path.isdir(inVal) is not True:
		return "'" + inVal + "' is not a valid directory path!"
	return None

def testToolMethod(toolIndex):
	r = noesis.userPrompt(noesis.NOEUSERVAL_FOLDERPATH, "Open Folder", "Go find a folder.", "", testValidateInput)
	if r is None:
		return 0
	noesis.messagePrompt("Selected '" + r + "'")
	return 0
Currently, your tool can only access the noesis module, not the rapi module. I plan to allow querying the active loaded preview model and hooking into the rapi interface for the active preview at some point in the future, which will expand what you can do with tools scripts. For now, it's mostly useful for writing simple one-off tasks that you find useful during your Noesis usage. I'm going to write a binary find in files tool script next time I get a chance, because I can't find a nice tool to do that already.

Also, noesis.userPrompt has a number of native possible query types:

Code: Select all

	NOEUSERVAL_STRING,
	NOEUSERVAL_FLOAT,
	NOEUSERVAL_INT,
	NOEUSERVAL_BOOL,
	NOEUSERVAL_FILEPATH,
	NOEUSERVAL_FOLDERPATH,
Your validation method will receive the inVal parameter in the appropriate native Python type, so you could do something like this too:

Code: Select all

from inc_noesis import *

def registerNoesisTypes():
	handle = noesis.registerTool("&Test tool script", testToolMethod)
	return 1

def testValidateInput(inVal):
	if inVal is not True:
		return "Screw you, buddy, donkeys are always awesome."
	return None

def testToolMethod(toolIndex):
	r = noesis.userPrompt(noesis.NOEUSERVAL_BOOL, "Question", "Are donkeys totally awesome in all circumstances?", "Yes", testValidateInput)
	if r is None:
		return 0
	noesis.messagePrompt("That's right, donkeys are awesome.")
	return 0
(for the bool type, "yes" or "true" are true, anything else is false)
Darko
double-veteran
double-veteran
Posts: 723
Joined: Mon Jul 13, 2009 6:16 pm
Has thanked: 72 times
Been thanked: 138 times

Re: Señor Casaroja's Noesis

Post by Darko »

MrAdults wrote:
Darko wrote:Any news regarding noesis or you're still busy Mr. Adults??

See ya.
I'm still working on the next release, it's just taking a while, since I don't tend to get an average of an hour or so of work done on it every couple days. Maybe sometime in the next few days. I have a lot of features/fixes/additions being worked on concurrently.
Lol thanks for the answer, I really thought you were not going to answer, very kind of your part and yep, added new noesis to my collection :P.

See ya
Image
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: Señor Casaroja's Noesis

Post by finale00 »

Is it possible to write a tool that allows users to add more models to the current view without clearing out whatever has been loaded?

So one use might be

1: Open model
2: Add another model
3: Add another model...
...
Satoh
mega-veteran
mega-veteran
Posts: 194
Joined: Sat May 09, 2009 3:07 pm
Has thanked: 13 times
Been thanked: 38 times

Re: Señor Casaroja's Noesis

Post by Satoh »

binary find-in-files tool
BINARY FIND IN FILES. This will be a godsend.
also if I'm understanding this 'tools' functionality, I should finally be able to write a mesh tester that allows me to attempt loading things from an arbitrary offset user input I assume?

Then again I can't recall if I require rapi for that... in any case, when it's fully functional, this tools module, I should think it will allow me to not have to rewrite my script every time I want to test a theory... which will be very nice...

On the subject of loading multiple models... it would be useful for viewing models in games which assemble characters and objects from separate parts... but I also wouldn't consider it a top priority... for me anyway.

In any case, this sounds like a promising update.

EDIT: Ah, I'm curious... can separate scripts see each other in noesis?
For example if I have a txbLoadRGBA in a script, can I call that function from a different script?

I suppose a corollary of that is, can a tool call a format script function?
Demonsangel
mega-veteran
mega-veteran
Posts: 241
Joined: Fri Aug 05, 2011 9:31 pm
Location: Antwerp
Has thanked: 13 times
Been thanked: 41 times

Re: Señor Casaroja's Noesis

Post by Demonsangel »

ShinRa Inc wrote:Unfortunately, that doesn't seem to be accomplishing anything in the long run. Still importing into Blender and Aurora untextured.
That's blender's import script's fault, nothing we can do here.
It loads up in 3ds max textured, but in 3ds max you have to flip the uv.
EDIT: Ah, I'm curious... can separate scripts see each other in noesis?
For example if I have a txbLoadRGBA in a script, can I call that function from a different script?
It depends, is it just a function you defined in the script or is a function registered into noesis itself.
For the first you just imagine your script is called Testscript witha function dothis

Code: Select all

import Testscript

or

from Testscript import *
or
from Testscript import dothis
or
import Testscript as TS
Then you can call the function:

Code: Select all

Testscript.dothis()

or for the second one

dothis()
or
dothis()
or TS.dothis()
etc...
if it is registered in Noesis:

Code: Select all

file = open('path','rb').read()
texture = rapi.loadTexByHandler(file,'.extension') # the extension would be .png/.dds/ or whatever you have to use
or you could try to just link to the texture like you would for normal pngs etc, it might work.
finale00
M-M-M-Monster veteran
M-M-M-Monster veteran
Posts: 2382
Joined: Sat Apr 09, 2011 1:22 am
Has thanked: 170 times
Been thanked: 307 times

Re: Señor Casaroja's Noesis

Post by finale00 »

lol I can't figure out how to xor data on the spot

Code: Select all

data = bs.readBytes(200)
for i in range(200):
   data[i] ^= 0xFF

Code: Select all

TypeError: 'bytes' object does not support item assignment
It is already pretty slow in python, considering that I'm going to XOR several MB of data, but I don't want to create another byte array just to store the new bytes.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: Señor Casaroja's Noesis

Post by chrrox »

Code: Select all

#load the model
def mghmLoadModel(data, mdlList):
	ctx = rapi.rpgCreateContext()
	bs = NoeBitStream(data)
	idMagic = bs.readInt()
	if idMagic == 0x70637277:
		bs.seek(0x10, NOESEEK_ABS)
		xorData = []
		for a in range(0, len(data) // 4 - 4):
			xor = bs.readUInt() ^ 0x28129044
			xorData.append(xor)
		xorBuffer = struct.pack('I'*len(xorData), *xorData)
		bs = NoeBitStream(xorBuffer)
		idMagic = bs.readInt()
	version = bs.readInt()
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: Señor Casaroja's Noesis

Post by MrAdults »

finale00 wrote:Is it possible to write a tool that allows users to add more models to the current view without clearing out whatever has been loaded?

So one use might be

1: Open model
2: Add another model
3: Add another model...
...
Yeah, chrrox already requested that a little while ago. I didn't have time to get it into 3.89, but it's done for the next build now. I'll probably push a build out with that functionality whenever I'm next back at my house again.
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: Señor Casaroja's Noesis

Post by MrAdults »

3.9:
-3.9 - Added "mergeTo" and "mergeBones" options for .noesis scene files, which allow models (and their skeletons/animations/materials) to be merged into a single model.
-3.9 - Exposed new noesis.getScenesPath method.
-3.9 - Exposed new noesis.openFile method.
I've written a script to automatically merge all model files of a given type in a folder, by generating a .noesis scene file for them and auto-loading it. It's attached to this post.

chrrox/finale00: In that script, there's a line that says "MERGE_BONES = False". You can set it to True in order to collapse skeletons while merging based on bone names. That magical girl whatsit game that you're both working on should have it set to True to get the desired results.

Here's also a .noesis file that correctly combines one of the body models with the head using the new merging functionality:

Code: Select all

NOESIS_SCENE_FILE
version 1
physicslib		""
defaultAxis		"0"

object
{
	name		"node0"
	model		"c001.mdl"
	offset		"(0 0 0)"
	rotate		"(0 0 0)"
}
object
{
	name		"node1"
	mergeTo		"node0"
	mergeBones	"1"
	model		"h001.mdl"
	offset		"(0 0 0)"
	rotate		"(0 0 0)"
}
MrAdults
Moderator
Posts: 1007
Joined: Mon Mar 23, 2009 2:57 am
Has thanked: 44 times
Been thanked: 505 times

Re: Señor Casaroja's Noesis

Post by MrAdults »

Forgot to attach the script. Here it is.
You do not have the required permissions to view the files attached to this post.
Post Reply