Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. DLC
      2. Find Lobbies & Players
      3. Guides & Strategies
      4. Vehicles
      5. Content Creator
      6. Help & Support
      7. The Diamond Casino Heist
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

aru

[REL|BIN/SRC|Beta] SparkIV

Recommended Posts

jjcoolj91
Some very nice work here guys... I'll try to see how much of this I can reintegrate back into the SparkIV codebase and also try to add bones/skeleton support.

 

 

I don't know how to contact the author of this wonderful tool, so I post my contribution here hoping he could notice.

 

PM here, or my email is also available in the readme.txt file smile.gif

this is, THE BEST NEWS i have heard all day, i hope you can do that aru for us

Share this post


Link to post
Share on other sites
solecist

agh, when will we be able to import audio? the waiting is makin me crazy!

Share this post


Link to post
Share on other sites
simkas

Would it be possible to make that importer not import the whole model as one mesh? Because for example the multiplayer character models have all the different head models and all the hair/facial hair models in one part and you can't even seperate them by selecting seperate elements.

Share this post


Link to post
Share on other sites
uomoartificiale

1) Well, actually I suppose that the second version I posted (http://www.gtaforums.com/index.php?showtop...entry1059008508) should produce a smd file starting with:

 

 

version 1nodes0 model_bone -1endskeletontime 00 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000end

 

 

followed by the list of 3d vertices/faces:

 

 

trianglesLOWR_DIFF_001_A_UNI0 -0.1582031 0.1806641 -0.9736328 0.8554688 -0.3359375 -0.390625 0.4984436 -0.31080630 -0.1801758 0.1079102 -0.9594727 0.8554688 -0.3359375 -0.390625 0.4974518 -0.30653380 -0.1914063 0.08349609 -0.9633789 0.8554688 -0.3359375 -0.390625 0.4968109 -0.3051605LOWR_DIFF_001_A_UNI0 -0.159668 0.1499023 -0.04492188 -0.1796875 -0.1171875 0.9765625 0.1687317 -0.0066223140 -0.1967773 0.04052734 -0.07958984 -0.25 -0.25 0.9375 0.2462158 -0.00503540 0.006347656 0.02539063 -0.02978516 0 -0.2695313 0.9609375 0.2184601 -0.003845215LOWR_DIFF_001_A_UNI0 0.1704102 0.1811523 -0.9746094 -0.09375 -0.2304688 -0.96875 0.5062256 -0.32888790 0.2133789 0.09033203 -0.9570313 -0.09375 -0.2304688 -0.96875 0.5068054 -0.32353210 0.1923828 0.1079102 -0.9594727 -0.09375 -0.2304688 -0.96875 0.5058899 -0.3247681LOWR_DIFF_001_A_UNI0 0.06494141 0.06054688 -0.9589844 0.01171875 -0.1523438 -0.9882813 0.4968262 -0.32476810 0.08105469 0.1704102 -0.9755859 0.01171875 -0.1523438 -0.9882813 0.5003967 -0.32997130 0.08251953 0.1049805 -0.965332 0.01171875 -0.1523438 -0.9882813 0.4989777 -0.3266907[[[... more and more stuff like this...]]]end

 

 

Do your exported files follow this template?

 

I post the output of the first ped in the componentpeds.img archive, the one named: f_m_business_01.wdd (middle-age woman): http://rapidshare.com/files/203555551/output.zip

please confront your output with mine.

 

2) In max you can select the model then go to the modifier tab (left panel); then select the edit_mesh block (a warning message will pop-up: ignore it); select "element"; then select the different parts.

 

3) sorry aru I was probably blinded by the deprivation of sleep. I'm writing you right now.

 

By the way, yes I'm italian. colgate.gif

Share this post


Link to post
Share on other sites
simkas
2) In max you can select the model then go to the modifier tab (left panel); then select the edit_mesh block (a warning message will pop-up: ignore it); select "element"; then select the different parts.

 

I said in my post that I can't even select the seperate heads in the MP character mesh even when using the element selection.

Share this post


Link to post
Share on other sites
simkas

By the way, aru, could you add in something similar to the "change levels" function in OpenIV in the next version?

 

Crap, double post.

Share this post


Link to post
Share on other sites
mcal9909

Hmm i got a problem with spark 0.6.2, it wont load anymore! sad.gif

it used to work as i used to it import the fual pump icons for the fuel mod thats on here, that was a week or so ago.

now when i click the icon it crashes straight away confused.gif

 

this is the only info i could copy from the error report

 

EventType : clr20r3     P1 : sparkiv.exe     P2 : 0.6.2.0     P3 : 49a24ac6P4 : mscorlib     P5 : 2.0.0.0     P6 : 4889dc80     P7 : 343f     P8 : 119P9 : system.io.directorynotfound

 

 

any ideas? i tried redownloading it and extracting again but no joy.

Share this post


Link to post
Share on other sites
aru

@solecist... no ETA on audio import.

 

@simkas... should be able to seperate WDD models into separate export.. wouldn't be that hard.

 

Changing levels is really an odd feature that I don't want to support because it assumes that space is allocated for the extra levels if increasing (and its not always true), and it wastes memory space anyway when decreasing levels because all the existing data is still there. Changing levels should mean regenerating the entire texture memory data, which is better suited to an app like G-Texture.

 

@mcal9909.. did you delete/reinstall GTAIV recently? It looks like its trying to find some directory and failing. I'd think its trying to find your GTAIV directory from your registry and failing. Try putting a gtaiv.exe in the same directory as SparkIV.

Share this post


Link to post
Share on other sites
mcal9909

 

@mcal9909.. did you delete/reinstall GTAIV recently? It looks like its trying to find some directory and failing. I'd think its trying to find your GTAIV directory from your registry and failing. Try putting a gtaiv.exe in the same directory as SparkIV.

Thanks dude it worked, didnt reinstall it tho my hdd did fail a few days ago and decided to change drive letter so i guess that was the problem. but all is working now smile.gif

 

found the reg entry and yeah.. was showing f: instead of d: changed it and now works without the exe in the folder

Edited by mcal9909

Share this post


Link to post
Share on other sites
DerPlaya78

I coded a basic COLLADA exporter for SparkIV.

 

Here's the source for a modified RageLib.Models.dll

 

http://rapidshare.com/files/205759765/RageLib.Models.7z.html

 

The new files are in the COLLADA subdir + export button code in ModelViewController and ModelView...

 

This is not really finished, just a proof-of-concept (and won't be, don't have much time).

 

For anyone who's interested here is what i did:

- downloaded the COLLADA schema from http://www.collada.org/2005/11/COLLADASchema

- removed some stuff from xsd file until the VS included xsd.exe could produce a CS classes file

- cleaned the .cs and removed probably unused classes

- wrote Exporter class which takes the data from a ModelNode and its Children and creates a COLLADA object, serializes this object with XMLSerializer into dae file and exports textures

 

I only tested vehicle files...

Normal map info is not exported because COLLADA format seems to have no standard format for normal maps and the proper way would be using the same shaders as the game. (i'm just using the first texture param for material...)

 

Share this post


Link to post
Share on other sites
Switch_Designs

I need the ability to delete textures from a wtd file or to add new ones or at least the ability to rename a texture in a wtd file. My reason for needing this is for an example i could take a ped model and say replace it with a ped stripper model but say the ped model has 10 variations of model parts to the model if i can delete textures then certian model parts for the different model variations will not show up leaving me with just the parts i wanna see... I know this sounds complicated but thru testing I have seen that this will work and as modding gtaiv advances we will need an ability to delete rename and add textures to wtd files not just replace.....

 

As of right now I would just be happy with a delete option in the edit function for wtd files in spark iv.... I NEED TO DELETE TEXTURES.

 

I have made this work so far by taking a wtd file from a different model and loading the textures into it.... Actually never mind me tring to explain how I made a custom texture file or why I want too it will hurt my brain too much to explain.

 

I sent a pm about this request but did not get a reply hope you see this!

 

Again I need to delete textures from a wtd file please help! (as in completely remove the texture and texture name from the wtd file.)

Edited by Switch_Designs

Share this post


Link to post
Share on other sites
Gforce

i've been asking him for weeks (2 months !!! ) on irc for add/delete/rename features in SparkIV.

 

doing any kind of real modding experiments in IV is pretty much impossible without them and flicking between OpenIV and SparkIV is too much of a headache, so i just don't bother trying confused.gif

Share this post


Link to post
Share on other sites
Rich246

I am getting this error pretty much out of the blue:

 

I have the newest SparkIV, with Windows Vista Home Premium X64, no problems up untill now

 

I get this error when I try to view any kind of model.

 

 

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************System.TypeInitializationException: The type initializer for 'System.Windows.Media.Animation.Storyboard' threw an exception. ---> System.TypeLoadException: Could not load type 'System.Windows.FreezeValueCallback' from assembly 'WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.  at System.Windows.Media.Animation.Storyboard..cctor()  --- End of inner exception stack trace ---  at System.Windows.Media.Animation.Storyboard.GetComplexPathValue(DependencyObject targetObject, DependencyProperty targetProperty, EffectiveValueEntry& entry, PropertyMetadata metadata)  at System.Windows.FrameworkElement.EvaluateBaseValueCore(DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry& newEntry)  at System.Windows.DependencyObject.EvaluateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry newEntry, OperationType operationType)  at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)  at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp)  at System.Windows.FrameworkElement.UpdateStyleProperty()  at System.Windows.FrameworkElement.OnInitialized(EventArgs e)  at System.Windows.FrameworkElement.TryFireInitialized()  at System.Windows.FrameworkElement.AddLogicalChild(Object child)  at System.Windows.Controls.Decorator.set_Child(UIElement value)  at System.Windows.Documents.AdornerDecorator.set_Child(UIElement value)  at System.Windows.Forms.Integration.ElementHost..ctor()  at RageLib.Models.ModelView.InitializeComponent()  at RageLib.Models.ModelView..ctor()  at SparkIV.Viewer.Models.ModelViewer.CreateControl(File file, IModelFile modelfile)  at SparkIV.Viewer.Models.ModelViewer.GetView(File file)  at SparkIV.Viewer.Viewers.GetControl(File file)  at SparkIV.MainForm.PreviewFile(File file)  at SparkIV.MainForm.PreviewOrEditFile(File file)  at SparkIV.MainForm.lvFiles_MouseDoubleClick(Object sender, MouseEventArgs e)  at System.Windows.Forms.Control.OnMouseDoubleClick(MouseEventArgs e)  at System.Windows.Forms.ListView.WndProc(Message& m)  at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)  at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)  at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)************** Loaded Assemblies **************mscorlib   Assembly Version: 2.0.0.0   Win32 Version: 2.0.50727.3074 (QFE.050727-3000)   CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll----------------------------------------SparkIV   Assembly Version: 0.6.2.0   Win32 Version: 0.6.2.0   CodeBase: file:///C:/Users/Rich/Desktop/GTA%20IV%20Tools/SparkIV/SparkIV.exe----------------------------------------System.Windows.Forms   Assembly Version: 2.0.0.0   Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------System   Assembly Version: 2.0.0.0   Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll----------------------------------------System.Drawing   Assembly Version: 2.0.0.0   Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------RageLib.Common   Assembly Version: 0.6.2.0   Win32 Version: 0.6.2.0   CodeBase: file:///C:/Users/Rich/Desktop/GTA%20IV%20Tools/SparkIV/RageLib.Common.DLL----------------------------------------RageLib.FileSystem   Assembly Version: 0.6.2.0   Win32 Version: 0.6.2.0   CodeBase: file:///C:/Users/Rich/Desktop/GTA%20IV%20Tools/SparkIV/RageLib.FileSystem.DLL----------------------------------------System.Xml   Assembly Version: 2.0.0.0   Win32 Version: 2.0.50727.3074 (QFE.050727-3000)   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll----------------------------------------System.Configuration   Assembly Version: 2.0.0.0   Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll----------------------------------------xfvo4q0o   Assembly Version: 0.6.2.0   Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll----------------------------------------RageLib.Models   Assembly Version: 0.6.2.0   Win32 Version: 0.6.2.0   CodeBase: file:///C:/Users/Rich/Desktop/GTA%20IV%20Tools/SparkIV/RageLib.Models.DLL----------------------------------------ICSharpCode.SharpZipLib   Assembly Version: 0.85.5.452   Win32 Version: 0.85.5.452   CodeBase: file:///C:/Users/Rich/Desktop/GTA%20IV%20Tools/SparkIV/ICSharpCode.SharpZipLib.DLL----------------------------------------RageLib.Textures   Assembly Version: 0.6.2.0   Win32 Version: 0.6.2.0   CodeBase: file:///C:/Users/Rich/Desktop/GTA%20IV%20Tools/SparkIV/RageLib.Textures.DLL----------------------------------------PresentationFramework   Assembly Version: 3.0.0.0   Win32 Version: 3.0.6920.1500 built by: QFE   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/PresentationFramework/3.0.0.0__31bf3856ad364e35/PresentationFramework.dll----------------------------------------PresentationCore   Assembly Version: 3.0.0.0   Win32 Version: 3.0.6920.1500 built by: QFE   CodeBase: file:///C:/Windows/assembly/GAC_32/PresentationCore/3.0.0.0__31bf3856ad364e35/PresentationCore.dll----------------------------------------WindowsBase   Assembly Version: 3.0.0.0   Win32 Version: 3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109)   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/WindowsBase/3.0.0.0__31bf3856ad364e35/WindowsBase.dll----------------------------------------WindowsFormsIntegration   Assembly Version: 3.0.0.0   Win32 Version: 3.0.6920.1109 (lh_tools_devdiv_wpf.071009-1109)   CodeBase: file:///C:/Windows/assembly/GAC_MSIL/WindowsFormsIntegration/3.0.0.0__31bf3856ad364e35/WindowsFormsIntegration.dll----------------------------------------************** JIT Debugging **************To enable just-in-time (JIT) debugging, the .config file for thisapplication or computer (machine.config) must have thejitDebugging value set in the system.windows.forms section.The application must also be compiled with debuggingenabled.For example:<configuration>   <system.windows.forms jitDebugging="true" /></configuration>When JIT debugging is enabled, any unhandled exceptionwill be sent to the JIT debugger registered on the computerrather than be handled by this dialog box.

 

 

 

I pasted it all, because I do not know what is important and what is not

Edited by Rich246

Share this post


Link to post
Share on other sites
Switch_Designs

 

i've been asking him for weeks (2 months !!! ) on irc for add/delete/rename features in SparkIV.

 

doing any kind of real modding experiments in IV is pretty much impossible without them and flicking between OpenIV and SparkIV is too much of a headache, so i just don't bother trying confused.gif

Well I have some really great mods waiting on an add/delete/rename feature and all i need now is to have the ability!

Edited by Switch_Designs

Share this post


Link to post
Share on other sites
the hubster
I need the ability to delete textures from a wtd file or to add new ones or at least the ability to rename a texture in a wtd file. My reason for needing this is for an example i could take a ped model and say replace it with a ped stripper model but say the ped model has 10 variations of model parts to the model if i can delete textures then certian model parts for the different model variations will not show up leaving me with just the parts i wanna see... I know this sounds complicated but thru testing I have seen that this will work and as modding gtaiv advances we will need an ability to delete rename and add textures to wtd files not just replace.....

 

As of right now I would just be happy with a delete option in the edit function for wtd files in spark iv.... I NEED TO DELETE TEXTURES.

 

I have made this work so far by taking a wtd file from a different model and loading the textures into it.... Actually never mind me tring to explain how I made a custom texture file or why I want too it will hurt my brain too much to explain.

 

I sent a pm about this request but did not get a reply hope you see this!

 

Again I need to delete textures from a wtd file please help! (as in completely remove the texture and texture name from the wtd file.)

The tool G-Texture posted in this forum can do this for wtd

Share this post


Link to post
Share on other sites
bbydino05

yes is there a way i can mod with the latest patch cause i used the new york mod and it worked fine but if i want to do a suit mod it wont let me please respond

Share this post


Link to post
Share on other sites
gtaps2modder

aru, can you help me a bit?

 

I know that PC resources has got Zlib compression, but what about Xbox360 resources? What is compression type?

Share this post


Link to post
Share on other sites
gamerzworld
aru, can you help me a bit?

 

I know that PC resources has got Zlib compression, but what about Xbox360 resources? What is compression type?

Zlib as well I believe.

Share this post


Link to post
Share on other sites
gtaps2modder

Zlib is used on PC... On Xbox360 compresion is different.

 

I started work on XTD viewer. Pixel format differentses between Xbox360 and PC textures writen in SparkIV sources. But there is no info about RES compression...

Share this post


Link to post
Share on other sites
Millenia
I need the ability to delete textures from a wtd file or to add new ones or at least the ability to rename a texture in a wtd file. My reason for needing this is for an example i could take a ped model and say replace it with a ped stripper model but say the ped model has 10 variations of model parts to the model if i can delete textures then certian model parts for the different model variations will not show up leaving me with just the parts i wanna see... I know this sounds complicated but thru testing I have seen that this will work and as modding gtaiv advances we will need an ability to delete rename and add textures to wtd files not just replace.....

 

As of right now I would just be happy with a delete option in the edit function for wtd files in spark iv.... I NEED TO DELETE TEXTURES.

 

I have made this work so far by taking a wtd file from a different model and loading the textures into it.... Actually never mind me tring to explain how I made a custom texture file or why I want too it will hurt my brain too much to explain.

 

I sent a pm about this request but did not get a reply hope you see this!

 

Again I need to delete textures from a wtd file please help! (as in completely remove the texture and texture name from the wtd file.)

Use G-Texture to delete stuff from the WTD.

Share this post


Link to post
Share on other sites
DerPlaya78

@aru:

 

...little info on wft model hierachy:

 

Add RageLib.Models.HierachyNode

 

using System;using System.Collections.Generic;using System.Text;using System.IO;using RageLib.Common;using RageLib.Common.Resources;namespace RageLib.Models{   public class HierachyNode : IFileAccess   {       public uint Offset { get; private set; }       public uint NameOffset { get; private set; }       public string Name { get; private set; }       public uint Unknown { get;private set; }       public HierachyNode Sibling { get; private set; }       public HierachyNode FirstChild { get; private set; }       public HierachyNode Parent { get; private set; }       public HierachyNode(BinaryReader br) {           Read(br);       }       public HierachyNode(BinaryReader br, HierachyNode parent)       {           Parent = parent;           Read(br);       }       #region IFileAccess Members       public void Read(BinaryReader br)       {           Offset = (uint)br.BaseStream.Position;           NameOffset = ResourceUtil.ReadOffset(br);           long _position = br.BaseStream.Position;           br.BaseStream.Seek(NameOffset, SeekOrigin.Begin);           Name = ResourceUtil.ReadNullTerminatedString(br);           br.BaseStream.Position = _position;           Unknown = br.ReadUInt32();           uint _siblingOffset = ResourceUtil.ReadOffset(br);           if (_siblingOffset > 0)           {               _position = br.BaseStream.Position;               br.BaseStream.Seek(_siblingOffset, SeekOrigin.Begin);               Sibling = new HierachyNode(br);               br.BaseStream.Position = _position;           }           uint _firstChildOffset = ResourceUtil.ReadOffset(br);           if (_firstChildOffset > 0)           {               _position = br.BaseStream.Position;               br.BaseStream.Seek(_firstChildOffset, SeekOrigin.Begin);               FirstChild = new HierachyNode(br);               FirstChild.Parent = this;               br.BaseStream.Position = _position;           }           uint _parentOffset = ResourceUtil.ReadOffset(br);           if (_parentOffset > 0 && Parent != null)           {               if (_parentOffset != Parent.Offset) throw new Exception("parent missmatch");           }       }       public void Write(BinaryWriter bw)       {           throw new NotImplementedException();       }       #endregion   }}

 

 

replace UnDocInfo in DrawableModel...

 

           br.BaseStream.Seek(modelInfoOffset, SeekOrigin.Begin);           uint HierachyOffset = ResourceUtil.ReadOffset(br);           br.BaseStream.Seek(HierachyOffset, SeekOrigin.Begin);           ModelInfo = new HierachyNode(br);

 

 

Edited by DerPlaya78

Share this post


Link to post
Share on other sites
aru

@DerPlaya78, thats the skeleton/bone hierarchy and it exists for any drawable (not just wfts). I have it implemented it into my local working copy already, just haven't checked it in yet smile.gif Its coming soon I suppose.. I'll try to merge in your Collada export as well as the audio changes as well.. thanks for them!

 

@Rich246... no idea what that bug is about... I'd suggest trying to reinstall .NET framework 3.5

 

@Gforce/Switch_Designs... add/del/rename is in the plan as well... just too many feature requests, and too little people to code them smile.gif

Share this post


Link to post
Share on other sites
Rich246

@aru I already tried doing that, I even installed Sp1 for .net 3.5

Share this post


Link to post
Share on other sites
DerPlaya78

@aru: some more stuff about models...

 

RageLib.Models.Resource.Shaders.ShaderParamNames.ShaderParamNames

- corresponds to the hash of names stored in fxc files

 

RageLib.Models.Resource.MaterialInfoDataID

- hashes are also in fxc files, there are many more possible texture types/names (dirtTexture, DamageTexture, etc)

 

RageLib.Models.Resource.Models.Geometry.Unknown9 is an offset (ResourceUtil)

- RageLib.Models.Resource.Models.Geometry.Unknown10 is the count of entries of the table at that offset

- the table consists of short values which seem to be indices into the bone structure (flattened)

- the blendindicies in VertexBuffers seem to be indexes into this table...

 

PROOF: http://img23.imageshack.us/img23/9749/admiralwft.jpg

 

more stuff in FragTypeChild:

 

public void Read(BinaryReader br){   br.BaseStream.Seek(0x90, SeekOrigin.Current);   uint offset = ResourceUtil.ReadOffset(br);   if (offset != 0)   { 	/* unknown start */ 	Unknown = br.ReadUInt32(); 	UnknownOffsets1 = new uint[4]; 	UnknownInts = new uint[4]; 	for (int i = 0; i < 4; i++) {      UnknownOffsets1[i] = ResourceUtil.ReadOffset(br); 	} 	for (int i = 0; i < 4; i++) 	{      UnknownInts[i] = br.ReadUInt32(); 	} 	UnknownOffset2 = ResourceUtil.ReadOffset(br); 	 	UnknownBytes1 = br.ReadBytes(200); 	UnknownOffset3 = ResourceUtil.ReadOffset(br); 	 	UnknownBytes2 = br.ReadBytes(200); 	UnknownOffset4 = ResourceUtil.ReadOffset(br); 	/* unknown end */...

 

 

more stuff in FragTypeModel::Read()

 

 

   UnknownDamageData = new UnknownDamageData[childCount];   br.BaseStream.Seek(208, SeekOrigin.Begin);   uint unknownDamageDataOffset = ResourceUtil.ReadOffset(br);   if (unknownDamageDataOffset > 0) {       for (int i = 0; i < childCount; i++)       {           br.BaseStream.Seek(unknownDamageDataOffset + i * 4, SeekOrigin.Begin);           UnknownDamageData[i] = new UnknownDamageData(br);       }               }...

 

 

and more

 

 

   public class UnknownDamageData : IFileAccess   {       public uint Offset { get; private set; }       public byte[] UnknownBytes { get; private set; }    // 192       public uint UnknownInt { get; private set; }       public byte[] UnknownBytes2 { get; private set; }    // 12              public float[] UnknownFloats { get; private set; } // [13] Weight ?       public uint[] UnknownInts { get; private set; } // 2       public float[] UnknownFloats2 { get; private set; } // 2       public string Name { get; private set; }       public UnknownDamageData(BinaryReader br) {           Read(br);       }              #region IFileAccess Members       public void Read(System.IO.BinaryReader br)       {           Offset = ResourceUtil.ReadOffset(br);           br.BaseStream.Seek(Offset, SeekOrigin.Begin);           UnknownBytes = br.ReadBytes(192);           UnknownInt = br.ReadUInt32();           UnknownBytes2 = br.ReadBytes(12);                      UnknownFloats = new float[15];           for (int i = 0; i < 15; i++) UnknownFloats[i] = br.ReadSingle();           UnknownInts = new uint[2];           for (int i = 0; i < 2; i++) UnknownInts[i] = br.ReadUInt32();           UnknownFloats2 = new float[2];           for (int i = 0; i < 2; i++) UnknownFloats2[i] = br.ReadSingle();           Name = ResourceUtil.ReadNullTerminatedString(br);       }...

 

Edited by DerPlaya78

Share this post


Link to post
Share on other sites
JostVice

RageLib.Models.Resource.MaterialInfoDataID

- hashes are also in fxc files, there are many more possible texture types/names (dirtTexture, DamageTexture, etc)

 

That is pretty interesting, could you give more info about all the types/names of texture there are? Any example of model with them?

Share this post


Link to post
Share on other sites
DerPlaya78

these are just textures referenced in the shaders:

- some are ordinary textures contained in the wtd files and processed in a special way by vertex/pixel shaders (dirt texture + diffuse texture + dirt color = dirty car wink.gif

- others are generated dynamically by vertex shaders (damageTexture)

 

you can take a look at the shaders with this http://www.gtagarage.com/mods/show.php?id=5793

 

until we can use the shaders this is pretty useless info...

Share this post


Link to post
Share on other sites
jjcoolj91

just a question for aru

 

I was wondering what you are starting to make as we havent heard much update from ya

Share this post


Link to post
Share on other sites
DerPlaya78

@aru:

small change to DrawableModel:

- add uint Offset Property to Resource.Skeletons

- make Drawable.Skeleton in FragTypeModel a static Member of FragTypeModel

- assign it to FragTypeChild.Drawable.Skeleton before FragTypeChild.Drawable.Read()

 

This way you read the skeleton just once if it is the same for all FragTypeChilds (which it is in vehicle files)

 

           if (Skeleton == null || Skeleton.Offset != skeletonOffset) {                if (skeletonOffset != 0)               {                   br.BaseStream.Seek(skeletonOffset, SeekOrigin.Begin);                   Skeleton = new Skeleton();                   Skeleton.Offset = skeletonOffset;                   Skeleton.Read(br);               }           }

 

this is only true for FragTypeModel and makes no difference for ModelFile and ModelDictionary...

Share this post


Link to post
Share on other sites
jjcoolj91
@aru:

small change to DrawableModel:

- add uint Offset Property to Resource.Skeletons

- make Drawable.Skeleton in FragTypeModel a static Member of FragTypeModel

- assign it to FragTypeChild.Drawable.Skeleton before FragTypeChild.Drawable.Read()

 

This way you read the skeleton just once if it is the same for all FragTypeChilds (which it is in vehicle files)

 

           if (Skeleton == null || Skeleton.Offset != skeletonOffset) {                if (skeletonOffset != 0)               {                   br.BaseStream.Seek(skeletonOffset, SeekOrigin.Begin);                   Skeleton = new Skeleton();                   Skeleton.Offset = skeletonOffset;                   Skeleton.Read(br);               }           }

 

this is only true for FragTypeModel and makes no difference for ModelFile and ModelDictionary...

so i was wondering if you are going to plan to make anything for model import for simple things like weapons for a start seeing your the guy thats getting charge for the bigger picture of SparkIV

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • 2 Users Currently Viewing
    0 members, 0 Anonymous, 2 Guests

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.