Talk:OniSplit/Archive1: Difference between revisions
m (link fix, marking dead links) |
m (++cat) |
||
Line 283: | Line 283: | ||
::Or allow us to export geometry without exporting the textures. :p [[User:Gumby|Gumby]] 08:47, 25 July 2009 (UTC) | ::Or allow us to export geometry without exporting the textures. :p [[User:Gumby|Gumby]] 08:47, 25 July 2009 (UTC) | ||
:::Moving the sub level0 folders, (Textures, Characters, etc) into the level0_Final folder fixed the AKEV issue. However, exporting ONCC as obj does not include the textures and exporting as dae gets an error message (same issue with missing textures and animations). The fix is to move the level0_Textures and level0_Animations folders into the level0_Characters folder. (Though only those who are interested in 3D modeling would need this info) [[User:EdT|EdT]] | :::Moving the sub level0 folders, (Textures, Characters, etc) into the level0_Final folder fixed the AKEV issue. However, exporting ONCC as obj does not include the textures and exporting as dae gets an error message (same issue with missing textures and animations). The fix is to move the level0_Textures and level0_Animations folders into the level0_Characters folder. (Though only those who are interested in 3D modeling would need this info) [[User:EdT|EdT]] | ||
[[Category:Completed modding tools]][[Category:Bi-platform modding tools]] |
Revision as of 01:33, 4 May 2022
Here's is my latest on creating a modified TRBS.
I call this The Fly! lol
I used the head from owldreamer's Masterchief. It looked correct in Blender, but it is rotated wrong here. There is no texture map for it. Also, the texture mapping is off for the rest of the body, even though I did not make any changes.
Neo: Also can you take a look at this blender file and tell me what I did wrong:
http://edt.oni2.net/OniSplit/MasterChief.blend.zip
I imported owldreamer's Masterchief, renamed the geometries, set the parents, all the rotations were set to 0. But when importing to Oni, it was broken.
I also had a question about the naming of the geometries. In Blender the names go right_thigh, left_calf and so on. But when I looked at an exported ONCC as an OBJ, they are named thigh_right, calf_left. Which is correct? Especially when naming in Blender? Also, why does Blender have the the name left_left? I looked at the naming structure from the extracted ONCCkonoko_generic.dae which was imported into Blender.
I hope you don't mind all these newbie questions.
Thanks,
EdT
First the simple problems: OniSplit 0.9.4 contains:
- fix for flipped textures
- corrected left_left to left_thigh
Then the case of thigh_right, calf_left: these are old names, they should not show up in newly exported files anymore. I changed them to match the ones found here TRIA. In addition the old names were swpped left was right, right was left and this was fixed too when I changed them.
The rotated head: It happened to me too, not sure what I did to get it working. What I think you should try is to unparent the head, move it to origin and rotate it so that it has the same orientation as Konoko's original head (along the X axis, not the Y axis). After that you can use that "Apply Scaling/Rotation to ObData" option, reparent it to neck and translate it back in its place. I'll experiment more with this later and I'll try to make a definitive list of steps to take to do this type of thing.
The MC body: this one has a slightly different problem than the head but not totally unrelated. Note than when you select a body part the "center" point for rotations (the origin of bone's coordinate system) shows up somewhere at the bottom. Compare this with what happens when doing the same thing with an exported TRBS: that point is where the "joint" is. Currently I don't know how to move this in Blender. For head I used that ObData To Center option but this is does not always work, the joint is rarely the center of the bone.
I see from this discussion that from now on I should be working with newly-exported TRBS files. Unfortunately, I've already put a lot of work into Griffin in Blender, so I'll have to manually fix things like wrong part names (I do see calf_left and thigh_right in my file, for instance). From now on, I'll only work on newly-exported models. But on that note, is it better to export as OBJ or DAE? Should I be going with DAE from now on?
Also, what does it mean when OniSplit doesn't return an error (or any message at all) when I use create:trbs, but it generates a file that's only 984 bytes? Because that's what happened when I selected Disable Physics and Current Scene Only and then used OniSplit 0.9.3 on the resulting DAE file. It's like there's header info for different file types but no actual data there.
For the most part, it seems like I should wait for you two to sort the problems out before I continue trying to import. EdT is already further along than I am, even with his horror-movie-like results. :-) --Iritscen 15:45, 11 April 2008 (CEST)
Neo: Thanks for the update and the instructions.
Iritscen: Have you tried selecting all before exporting from blender? Also, couldn't you extract the TRBS for Griffin and them import the your modified head into it? Is it possible to select an object in one file (such as your modified head) and then copy and paste it into another (the new TRBS file) in Blender?
Yesterday, Macupdate had a promo on Cheetah3D for $79.00, I quickly got it. I like using Cheetah3D, its much more intuitive for me. Right now, I'm trying to fix owldreamer's Masterchief. It looked odd, many of the surface triangles were black compared to the regular ones. You can see how they looked in the Oni Spartan thread at OCF. But when I applied "flip normal" to them, they looked correct. What does flip normal do?
Anyways, once I fix all those triangles, then I'll try getting the Masterchief into Oni.
EdT
I have not tried selecting all, but I also don't have "Selection Only" checked (I don't think that's the exact name). Still, I can try selecting all first. But at least the head should have been exported, because it was definitely selected. Re copying from one file to another, I think Blender is a one-document application. Perhaps I can copy the head, then close the document and open another one, then paste the head in. It's certainly worth a try.
"What does flip normal do?" As Wikipedia puts it, "Surface normals are commonly used in 3D computer graphics for lighting calculations". A normal is simply a calculation of a line passing through the polygon at a right angle that is best performed at the time of saving the file rather than at runtime in a game, to save CPU cycles. But which *way* is the line going through the 'gon? If it's set to go the wrong way, the polygon will be lit on the inside, not the outside (at least, the outside won't be lit), hence black polygons. As to why normals get flipped in the first place, *shrug*. --Iritscen 16:42, 11 April 2008 (CEST)
Hmm... a bunch of comments :). Let's see a couple of them:
- Selection: you should have no trouble with selection if "Only Export Selection" options is not used. Of course, since Blender "checkboxes" differ only in colour between checked/unchecked states you may want to be carefull about what options are checked. In addtion make sure you selected the scene you want to export before exporting if you have more than one scene.
- Copy/Paste: I have no idea how to copy/paste stuff in Blender. I wonder if it actually supports that, I have a feeling that it does not...
- Blender - one document application: Yes, it is. But you should be able to import a file (obj, dae) in a "document".
- Cheetah3D: no idea how it is but it's probably better than Blender, anything's better than Blender (at least in terms of user interface) :). Not sure if it has a Collada exporter/importer?
Just a brief update, the latest version of Onisplit works fine. I am making some progress, though working with Blender can be frustrating. I lost a few hours of work, don't know what happened. I had hoped to have the Masterchief done over the weekend, but maybe in a couple more days, when I have more time.
EdT
Didn't you say you bought Cheetah3D? Even if it cannot export Collada you may still be able to fix normals and geometry positions using it and then export the bones to OBJ and assembly and export them using Blender. Blender only makes sense if you are willing to spend a lot of time to learn its user interface. My opinion is that it's a terrible waste of time.
Neo, that's about the workflow that I developed in working with the 3D models. I probably should have tried something basic, like swapping geometries from different characters, instead of trying to import the Masterchief model. But that's me. :-)
I tried a couple of approaches, first, I imported the entire Masterchief model into Cheetah3D, then positioned the parts similar to the way Blender imports the TRBS Collada files (That weird looking way that the arms and legs are rotated, though, I don't think I got the arms rotation correct) Since Cheetah3D cannot import or export Collada yet (The author says after the next FBX SDK comes out, he'll work on Collada) I have been exporting the file as .3DS. Next import into Blender, scale the model to size. Use the clear/apply scaling to obdata. Move the center point (object/transform center to cursor) to hopefully the correct position for each part, rename each part (Blender does not import the names correctly). Parent all the parts. Export the current scene with triangles, disable physics, use relative paths (is that needed?). Import into Oni... start game, select level where I imported the character. CRASH!
To isolate the cause, I then tried another approach. Import into Blender the Elite Hard TRBS Collada file created by Onisplit, then replaced a part, with the Masterchief part. Import into Oni and I would see the Elite with some Masterchief part. Next add another part and so on. This is time consuming, saving as I'm going along. Then, made another change, imported to Oni, CRASH. No problem, just delete the part and try again. But from that point on, any changes, even trying to undo the changes and go back to a point that worked, resulted in Oni crashing. That's where I lost the few hours work. Next time, as I make a change, I'll save the file in a different name.
But while, doing this process revealed some errors in the Masterchief's parts which owldreamer was able to fix.
If you see anything I'm doing wrong, or can suggest a better workflow, please let me know.
Thanks,
EdT
How many polys is the Master Chief model? --Iritscen 16:01, 14 April 2008 (CEST)
It would help if you can give me one of those TRBS.oni files that crash Oni so I can try to figure out the reason.
Here is the version with the Masterchief directly imported from the start. Both Blender and TRBS.oni files: http://edt.oni2.net/3D/MCfiles.zip (dead link)
According to Cheetah3D for the Masterchief model: 19 polygon objects, 2580 polygons, 2580 triangles.
This is one screenshot I got before the lost data:
EdT
A quick update until I sort things out:
- the .oni file from MCfiles.zip is strange, it only contains the chest.
- exporting your .blend model to Collada and then creating a TRBS out of it seems to work fine, the body is complete
- it crashes for me after a while. More exactly it crashes when I get close to the MC (I replaced Barabus's body with the MC and I'm testing in level3). If I stay far enough it seems to be stable... really odd.
Have any of us exported a character and then imported them back in, without making any changes (aside from the format conversions)? In any case, it sounds like something in the rendering info (normals, bone center points, etc.) is messed-up, if Oni crashes when it's near to the model, because that's when the engine starts to calculate line-of-sight using model info, to know whether to render it or not. But I really don't know that much about how Oni's engine works. (You're sure it's not a scripted command that kicks in for Barabas that has a problem with the new model, right?) Also, at what point does the highest LOD kick in? It's been said to be pretty far away. Perhaps the crash happens when you cross that threshold?
Ed, it may not be relevant, but I'm curious as to which part you added before that crash after which the model became unuseable. Was it the pelvis?
--Iritscen 21:07, 14 April 2008 (CEST)
Yes, I have some exported/imported models, konoko_generic and tctf_swat, no problems with them.
LOD stuff: it looks like something LOD related since it crashes when you get closer but OniSplit does not currently support different LODs so it just uses the same geometry for all. Nothing really changes when it switches from one LOD to another.
The crash is caused by something that looks like memory corruption and last time I saw this it was related to high triangle count but it does not seem to be the case here, the triangle count is low enough.
Even more interesting: OniBrowser loads that "crashy" TRBS just fine. Now it's true that OniBrowser allows stuff that Oni does not allow (like more triangles) but it is also more likely to crash on bad geometric data (like bad vertex indices).
And one thing that I forgot about fbx/collada:
Autodesk has a converter that it is able to convert back and forth between the two. I tried the Windows version and it seem to work, hopefully the Mac version works too so you can use it to convert fbx exported from Cheetah3D.
Here it is: Autodesk FBX. It's a bit of hassle with "registration" but it's free.
Neo, Can you post the working Masterchief TRBS file so I can try it on my Mac. Here is the TRBS file again that I exported from Blender (It seems the previous one had the chest selected when exporting the TRBS file) and the crash log (May give you an idea what went wrong) : http://edt.oni2.net/3D/MC_crash.zip (dead link)
I will take a look at the Autodesk converter.
EdT
I did not say mine was working completly. It crashes after a while too.
Anyway your new .oni file looks like mine and your crash log indicates that your Oni crashes in the exact same place as mine so it's not an OS X version problem or something.
It may be an OSX issue too, because, I'm not able to load the level at all with that TRBS file. In some versions, it crashes as the progress bar reaches around 60%, other times, the progress bar completes, but before the Intro screen appears, it crashes. So I wonder why you can use the character for a while, before crashing, but the Mac crashes right away. On another note, when I'm able to view the character, like in the screenshot above, I would also get a crash when the character got near the camera.
Iritscen: Please join us in the fun/frustration of importing 3D models into Oni. The more people are testing it out, the quicker we can provide Neo with information and feedback, that may help him with Onisplit.
EdT
Neah, I don't think it has anything to do with OSX because the stack trace in your crash report looks to damn similar to the one I get on PC. It's just that memory corruption (if that is what's happening) has different effects depending on operating system and the compiler that was used to compile the executable.
And we have the first dead MC in Oni! :)
geyser told me something about texture coordinates messing his OBJ viewer so I removed all texture coordinates from MasterChief and reimported and now it seems to work. At least long enough to kill BarabusMC.
I'm still getting a crash but only when moving the camera very very close to MC and it's a different place in code where it happens.
This is awesome! I have a fighting EliteMC. Now we need to fix his body a bit more, I noticed his left biceps is higher than the right one and his standing posture looks a little off. Can you post the collada version of MC so I can take a look. Also, how did you remove the texture coordinates? Will that affect our ability to add more complex texture maps instead on the simple single color ones?
EdT
Here's my collada file: MasterChief.
To remove texture coordinates: select a bone and below there is a Mesh panel. Somewhere in that panel there is an UVTex field with a X button to its right. Use that button to delete the texture coordinates for the current bone. You need to do that for every bone
As for adding texture maps: the problem is that the current texture coordinates are sort of broken and Oni does not like them. Once someone fixes the coordinates it will work.
What's broken about them? Some coordinate are outside of 0..1 range and Oni does not seem to like that.
Why deleting them makes it work (and result in a somewhat coloured MC)? When no texture coordinates are present in the Collada file OniSplit uses (0,0) texture coordinate for all vertices and so the colour you see it's he colour of the texture in that point.
So, to recap, there's two observed issues with MC: the texture coord.s being out-of-range for Oni, which you more or less know how to prevent, and an unknown issue that causes a crash at very close range. Is that right? And how close are we talking about? Are you moving the camera with the Dev Mode camera controls? Is the camera entering the model?
--Iritscen 18:56, 15 April 2008 (CEST)
Yes, the current texture coordinates are out of range and make Oni crash. Anyway even if they weren't out of range they're still bad/useless.
Yes, it happens with devmode camera and it appears to happen only when camera enters the body though I'm not sure.
Ok. Where does this .oni file go? How do I import it? Second question: How do I spawn him?
Gumby 07:28, 16 April 2008 (CEST)
Gumby, perhaps the easiest way is pick a character like Barabas, look for the file ONCCbarabus.oni in the level0_Folder. Open the ONCCbarabus.oni with a hex editor. Scroll to the end of the file, you should see the text TRBSbarabus_body_high, find that file in level0_Final folder and move it to a safe place. Rename TRBSMasterChief.oni to TRBSbarabus_body_high.oni and put it in the level0_Folder and then recompile level0. Now Barabus will look like the Masterchief. You can do the same with any other character.
Of course, if you want the Masterchief to be a new character and not a replacement, then its a bit more work.
EdT
Neo, Is it possible for you to program OniSplit to automatically change the rotation so that when extracting and creating, the 3D model will appear in the standard 3D pose? (Standing up right, with the arms stretched out parallel to the ground).
It will make it easier for myself and others to add new character models without having to deal with rotating the pelvis, thigh, shoulder and fist from a standard 3D pose to the current TRBS extraction/creation pose.
Also, in testing the Masterchief model, it seems only the texture coordinates for the neck is out of range.
- Just curious, I know with OniSplit, we can export ONWC as an .obj. But now lets say, we modify that .obj, can we now import it back to Oni?
- EdT
- Er... DeLorean, anyone? An ONWC can link to any M3GM.
- geyser 11:30, 29 April 2008 (CEST)
Got it, I thought it was more complicated when I looked for a M3GM for a specific weapon by name and could not find it in the level0_Final files. There was only about 40 M3GM files listed. But using OUP, I found the mesh for the weapon. But it seems that adding weapons is something that can be done only in OUP, since you need to link to the fileid. In the files generated by Onisplit, I could not find the fileid.
EdT
I forgot to mention that I was able to change the appearance of the chaingun weapon, using 17 secs rifle model. Obviously, the model still needs work to get it to look right, but this is more of a proof of concept than anything. Here is the new weapon: http://edt.oni2.net/AE/w16crb.zip
EdT
OS v0.37 extracts no files. If I use level 14 it extracts only the first ONCC file (obj, material, plus the textures). (Same problems with OS v0.30. Other versions not tested.) Where did I go wrong?
Ssg 09:11, 4 May 2009 (UTC)
It's because it doesn't search the level0_Final.dat for character animations. I patched the existing 0.9.37 version, redownload it. See my talk page if you don't know the link.
Thank you. Ssg 12:02, 5 May 2009 (UTC)
Neo, in the latest version of OniSplit, when a TRAM is extracted as .xml, the framecount is not included. Previous versions would have attributes like this: <FrameCount>52</FrameCount> <Duration>52</Duration>. In a couple of modified TRAMs, I used that attribute to shorten an animation. For example, I would change <FrameCount>52</FrameCount> to <FrameCount>45</FrameCount>.
Could you please add that attribute back to the xml? Thank you EdT
Nope, I'm not adding that back. If you want to shorten an animation the do the right thing and edit the Heights, Velocities, Rotations and Positions elements. I realise that's more complicated to do (especially for Rotations) but setting the FrameCount directly is a hack. Hopefully we'll have soon a Collada animation importer and that will simplify editing animations a bit.
- Ok, you know what's best. So how soon is soon for the Collada importer? :-) EdT
I got the following error message when extracting AKEVAirport.oni using version version 0.9.40.0 and the GameDataFolder from the AE Installer.
System.InvalidOperationException: The comparer threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object at Oni.Akira.EnvironmentExporter+Polygon.System.IComparable<Oni.Akira.EnvironmentExporter.Polygon>.CompareTo (Oni.Akira.Polygon other) [0x00000] at System.Collections.Generic.GenericComparer`1[Oni.Akira.EnvironmentExporter+Polygon].Compare (Oni.Akira.Polygon , Oni.Akira.Polygon ) [0x00000] at System.Array.compare[Polygon] (Oni.Akira.Polygon value1, Oni.Akira.Polygon value2, IComparer`1 comparer) [0x00000] at System.Array.qsort[Polygon,Polygon] (.Polygon[] keys, .Polygon[] items, Int32 low0, Int32 high0, IComparer`1 comparer) [0x00000] at System.Array.Sort[Polygon,Polygon] (.Polygon[] keys, .Polygon[] items, Int32 index, Int32 length, IComparer`1 comparer) [0x00000] --- End of inner exception stack trace ---
at System.Array.Sort[Polygon,Polygon] (.Polygon[] keys, .Polygon[] items, Int32 index, Int32 length, IComparer`1 comparer) [0x00000] at System.Array.Sort[Polygon] (.Polygon[] array, Int32 index, Int32 length, IComparer`1 comparer) [0x00000] at System.Collections.Generic.List`1[Oni.Akira.EnvironmentExporter+Polygon].Sort () [0x00000] at Oni.Akira.EnvironmentExporter.CreateMeshes () [0x00000] at Oni.Akira.EnvironmentExporter.Export (Oni.InstanceDescriptor akev, Oni.Geometry.Dae.Document document, System.String outputDirPath) [0x00000] at Oni.DaeExporter.ExportInstance (Oni.InstanceDescriptor descriptor) [0x00000] at Oni.Exporter.ExportInstanceList (System.Collections.Generic.List`1 descriptors) [0x00000] at Oni.Exporter.Export (Oni.InstanceFileManager fileManager, System.String sourceFilePath, System.String filter) [0x00000] at Oni.Program.ExtractGeometry (System.String[] args) [0x00000] at Oni.Program.Main (System.String[] args) [0x00000] (1)
Im pretty sure the problem is that it cant find the textures. Gumby
- Yep, you're right, this is very likely caused by missing textures. All AKEV related textures need to be in the same directory as the AKEV .oni file. Sheeesh, I really need to check for that and provide a meaningfull error message, right now it just crashes :)Neo
- Or allow us to export geometry without exporting the textures. :p Gumby 08:47, 25 July 2009 (UTC)
- Moving the sub level0 folders, (Textures, Characters, etc) into the level0_Final folder fixed the AKEV issue. However, exporting ONCC as obj does not include the textures and exporting as dae gets an error message (same issue with missing textures and animations). The fix is to move the level0_Textures and level0_Animations folders into the level0_Characters folder. (Though only those who are interested in 3D modeling would need this info) EdT
- Or allow us to export geometry without exporting the textures. :p Gumby 08:47, 25 July 2009 (UTC)