Archangel35757 Posted May 24, 2013 Posted May 24, 2013 First I would like to ask this sub-forum admin to create additional topic tags relevant to tools development, like: "Plugin" or "Plugin WIP", etc. or tags for the specific 3D modeling package the plugin is for: "3dsMax Plugin", "Maya Plugin", "Softimage Add-On" etc. Because currently the only tag is "JK2." Secondly, I would ask that there be a sub-forum under coding for "Tools Development" and move this thread under it. So, with the Beta(R1) dotXSI exporter out and continuing beta testing (seems pretty quiet out there), and before I get back to creating a controls rig for the 3ds Max Humanoid Skeleton, I thought I would try to re-create the ROFF exporter for 3ds Max 6+ (as the only working version was for 3ds Max 5). I've read Mr. Wonko's blog about his recreating the ROFF exporter for Blender (kudos to him for that); and I have his scripts, as well as the ROFF header file from the JKA source code release. So hopefully I'll be able to pull this off. So for those of you who don't know... what is a ROFF??? It stands for Rotation Origin File Format with an extension of ( .ROF ). A ROF contains position and rotation data for very complex trajectories and paths, animated using a 3D modeling program for either one or multiple objects, and exported as a binary file. More specifically it constains delta positions and delta rotations from the previous frame of animation. It enables/allows for scripting very complex world object animations of brushes/models. How? You create a brush entity, which must be square or rectangular and apply the origin shader to it. The origin point is the exact center of the origin brush and the center of rotation. You then export this origin brush out of GtkRadiant and into your modeling program (making sure you are using consistent units) to get the initial position and orientation of the origin brush entity. Then animate whatever complex trajectory you want in your modeling program and export this trajectory out as a .ROF. When included in scripting, the game uses this .ROF file to play the animation in-game. A ROF in the hands of a knowledgable scripter could probably pull off some amazing things... and not just your ordinary fly-by. Think of this as like "motion-capture" data for brush models (that could even be grouped with misc_model entities) or baking in motion data from Physics simulations. Or what if you tagged the bone joints of the AT-AT Walker's legs with these origin brushes and then exported out a walk cycle? Mo-Cap for brushes! Allowing you to maybe have better interaction with the models and pull of a Luke Skywalker AT-AT take down... who knows. Perhaps ROFFs are being heavily used once again since Mr. Wonko's Blender scripts were released... but I'd like to be able to create these files from my favorite 3D modeling program. So back to the point of this thread... I don't know how long it will take, but I'm hopeful I can pull this off as my knowledge of the 3ds Max SDK grows. I'll post updates here...
Szico VII Posted May 24, 2013 Posted May 24, 2013 Basically it allows you to animate map objects from my understanding?
Archangel35757 Posted May 24, 2013 Author Posted May 24, 2013 Basically it allows you to animate map objects from my understanding?Yes... through scripting.
Szico VII Posted May 24, 2013 Posted May 24, 2013 You can do that anyway....ROFF animations arent done via icarus are they?
Archangel35757 Posted May 24, 2013 Author Posted May 24, 2013 In my opinion, without a ROF animation you are severely limited in what "entity animation" you can script... and not drive yourself crazy. Complex 3D non-linear paths are what makes a ROF shine... and it is implemented via scripting. See the SoF2 Mapping Documentation for the best explanations and Icarus manual.
Corto Posted May 24, 2013 Posted May 24, 2013 It can be used for more complex scripted animations I guess. Like buildings crumbling down, nice background animations, space battles, etc. Right?
Corto Posted May 24, 2013 Posted May 24, 2013 Once again, I think there's so much more potential in this aging engine that most believed (including me). Just but watching how far you and Moondog push the level design and now, finding out you can make nice scripted animations for world events. That's a something that can be used to make richer levels.
Tempust85 Posted May 24, 2013 Posted May 24, 2013 I don't know much about level design or ROF for that matter, but why can't we just use Ghoul2 animated models?
Archangel35757 Posted May 24, 2013 Author Posted May 24, 2013 I don't know much about level design or ROF for that matter, but why can't we just use Ghoul2 animated models?Perhaps @@mrwonko can answer this question better... but I imagine it would be less processor load to use this scripted animation on non-bone brush models and misc_models than ghoul2 models. Plus I believe there is a limit in how many Ghoul2 models can be visible at a time.
mrwonko Posted May 24, 2013 Posted May 24, 2013 I don't know much about level design or ROF for that matter, but why can't we just use Ghoul2 animated models?Because you don't collide with them. Whenever you want to move brushes/models but scripting each move/rotate manually using ICARUS is just not feasible (say for baked rigid body physics) ROFF is your friend. It's also the only way to do a relative move, i.e. you specify an offset, not a destination. Another thing besides moving brushes you can do with ROFF is animating camera paths. Again, this can also be done manually using icarus, but it's a major PITA compared to simply using some proper 3d modelling/animation package.
Archangel35757 Posted May 24, 2013 Author Posted May 24, 2013 Because you don't collide with them. Whenever you want to move brushes/models but scripting each move/rotate manually using ICARUS is just not feasible (say for baked rigid body physics) ROFF is your friend. It's also the only way to do a relative move, i.e. you specify an offset, not a destination.Another thing besides moving brushes you can do with ROFF is animating camera paths. Again, this can also be done manually using icarus, but it's a major PITA compared to simply using some proper 3d modelling/animation package.And the increased CPU cost for Ghoul2 collision detection is prohibitive??? Can't remember having just looked at the code but I think there is an artificial cap on the number of ROFFs permitted as well. :/
Archangel35757 Posted May 24, 2013 Author Posted May 24, 2013 In looking at the source code pertaining to ROFFs... they currently have a hard-coded limit of 32 in a Level.
Archangel35757 Posted May 25, 2013 Author Posted May 25, 2013 So from what I've gathered by studying the available ROFF source code... is that there are two versions: 1 and 2. ROFFs also have a Note Track feature... however, only Version 2 supports Note Tracks-- thus I will only make a ROFF2 exporter. There are at least two types of Note Tracks that can be embedded in the ROF file that the game code makes use of: (1) effects and (2) sounds. There doesn't appear to be a max number on these Note Tracks... and so, if I'm reading the code correclty, for each frame of animation you can play both effects and sounds. So I imagine one could use these to add more realism to a brush/model entity's scripted animation... say engine glow, or trailing fire and smoke with debris chunks while playing appropriate sounds... any effects or sound FX really. ***I think*** you could even have them cease for any number of frames you want... (i.e., have a sputtering engine or something). I'm certainly going to have to study the ROFF system deeper to figure out how these are added... I suspect I could use the Note Track that exists in 3ds Max that would allow me to make any kind of notes I want on any frame... so I just need to specify the "effect" or "sound" in accordance with the mapping/scripting manuals-- now I just need to go find where that is...
Archangel35757 Posted May 25, 2013 Author Posted May 25, 2013 So if you have multiple nodes in your scene that you want to export out as ROF, it generates a ROF file for each object-- which makes since. So you could do like I say, for example, and bind Dummy Nodes to the legs of an AT-AT Walker (or whatever...) and export out the ROFs for a walk-cycle... then you could build the legs from brush objects and use these ROFs to drive the walk-cycle. Wouldn't this allow the player (either on foot or flying a T-47) to be able to run/fly under or between the brush object legs??? Since they wouldn't have collision bounding boxes like models??? I'm going to need the assistance of a proficient mapper and scripter to help me beta test this ROFF exporter-- I don't have time to learn everything (mapping, scripting, etc. :wacko: ) ...so do I have any volunteers?
Szico VII Posted May 25, 2013 Posted May 25, 2013 *I can help with the mapping* Corto and Archangel35757 like this
Archangel35757 Posted May 27, 2013 Author Posted May 27, 2013 *I can help with the mapping*Great! Thanks. Szico VII likes this
Corto Posted May 27, 2013 Posted May 27, 2013 Ok, I retire what I said. Pande, Sizco, MaceMad... hahahaha. What you guys do looks way better than the original maps, that's enough for me.
Boothand Posted October 14, 2013 Posted October 14, 2013 Hey. Did this have any results yet? Also, any ideas if this could possibly work in multiplayer, in JK2?
eezstreet Posted October 14, 2013 Posted October 14, 2013 Also, any ideas if this could possibly work in multiplayer, in JK2?NOPE
Tempust85 Posted October 14, 2013 Posted October 14, 2013 I think Archangel never got back to this, he's been caught up in other things. But tbh, I can't find a decent ROFF tutorial anywhere so whats the point?
eezstreet Posted October 14, 2013 Posted October 14, 2013 I think Archangel never got back to this, he's been caught up in other things. But tbh, I can't find a decent ROFF tutorial anywhere so whats the point? Pff. Real men don't need tutorials.
Archangel35757 Posted October 23, 2013 Author Posted October 23, 2013 I think Archangel never got back to this, he's been caught up in other things. But tbh, I can't find a decent ROFF tutorial anywhere so whats the point? Sorry... no I haven't gotten back around to this yet... but it is still on my "To Do" list. Is there a pressing need to put this at the top of my priorities? I'll try and spend some time on it this Friday. @@DT85 -- Somewhere on my PC I have decent tutorial... I'll try to dig it up-- or just make a new one when I have a working plugin. Tempust85 likes this
Archangel35757 Posted November 15, 2013 Author Posted November 15, 2013 Update: So I started writing the meat of the ROFF exporter code today. Hope to have more of an update soon. Boothand and Tempust85 like this
Archangel35757 Posted November 20, 2013 Author Posted November 20, 2013 Ok... so I'm trying to verify the actual format for the noteTracks that can be used in ROFF files. Basically, in 3ds Max you use the NoteTrack feature to add sound and effects files to your ROFF. Sounds always play on CHAN_BODY. An example of what you would enter into the NoteTrack is shown below: "sound sound/world/drone6.wav" And for an efx notetrack you would enter: "effect effects/explosion1.efx 0+0+64 0-0-1" My understanding of the 0+0+64 represents an offset from the object's origin of where you want the effect to originate on the object and the 0-0-1 is a unit vector relative to the object for the direction you want the effect to play... in the above example this explosion will be offset 64 units in the z-axis and is directed along the z-axis unit vector. @@mrwonko has pointed me to the cgame camera files that deal with ROFF Note Tracks For animating a camera along a ROFF defined path. So I am studying those now.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now