So I've used Son of Persia's tool to extract camera info from the .cci file, and I'm trying to see (just as a test) whether or not I could recreate Room 118 (the east wing save room) in Blender. It says that the FOV is 55, and that seems to be right, but I was wondering if the other information could be helpful as well. Since I'm working in Blender, I don't know of an easy way to get things like collision data that can help orient what I'm doing, so I'm just trying to do it by eye using this method cgi.tutsplus.com/tutorials/modeling-a-modern-interior-scene-in-blender--cg-15294.
(EDIT: Actually, the .mod file in the shd folder seems helpful enough, but no matter how much I play with the camera I can't get the model to even closely line up with the background.)
So for example I get:
Camera 0 Information : Camera Position = (-132.137604, 182.521591, -288.915619) Target Position = (-50.652100, 150.698410, -76.638702) Unknown Position = (0.000000, 0.000000, 0.000000) Roll = 0.000000 FOV = 55.000000
What's the unit of measurement for camera position? What does target position refer to? Am I on a fool's errand and these numbers only make sense in 3DS Max?
Alternatively, how does one use this data in 3DS Max? If I can figure out how to make a room there, I should be able to do it in Blender I think.
Last Edit: Feb 11, 2016 2:50:15 GMT 10 by reaccount
Yeah, that's probably it. Looking up what a "target camera" is in 3DS Max suggests as much as well. Just putting in the numbers for the camera's position and its angle, however, causes it to be completely off. Part of the problem, too, is that importing the .mod file results in a super huge model in Blender. I saw that Bunny mentioned something about dividing the numbers by 100, and I tried that for both the model's scaling and the camera positions, but it's still goofed. (Not as goofed if you inverse the -288.91 to a positive, but still wrong.)
Even just playing around with the .mod file and the camera in free cam doesn't do much. Mostly I can't get the camera to "fan out," if that makes any sense, even if I do play with the FOV. (Notice the right wall.) I may just be in over my head, but I'll keep messing around with it.
Okay, so, update: After much weeping and gnashing of teeth, as well as pestering Bunny (sorry/thank you Bunny), I think I finally figured out what's up.
"Camera position" is just, well, the camera's position, but in Blender the Y and Z coordinates are flipped. "Target camera" is a function in 3DS that can be replicated easily enough in Blender (easy to YouTube), and its coordinates are listed in the .cci. Okay, so I figure: All I gotta do is plug them up!
Still doesn't work!
And so now I'm positive that it either is Blender importing the .mod file wrong (as an .obj) or the .mod file itself is messed up. That's when I remember that Codeman had previously taken the .sbc data from R112 (one of the 3D rooms) and made that into a big .obj. So I figure, let's see if I can accurately replicate a camera angle with it: After all, while the .mod file might for whatever reason be inaccurate, the .sbc absolutely should be.
And after plugging in camera 0's and its target's coordinates, it's still messed up. But, it's messed up in an easily recognizable way: The camera just seems to be on the opposite side of the map along one dimension. It turns out that all I had to do was make the Y coordinate negative (or positive if already negative). Why this is the case, I don't know; but it worked!
Also of note: In Blender, there are two settings for FOV, the focal length in mm and, uh, the same measured in "Field of View." You'd think the latter would be what corresponds to the .cci, but actually it's the former. So that was probably throwing me off, too.
I'm going to try to get R118 to line up again, and if I can't, I'm just going to chalk it up to the .mod file being inaccurate. If that's the case, though, I'm not really sure what to use as a template. I think the Max Script by Codeman is able to convert .sbc data to .obj somehow, but as I don't have 3DS Max, I may be in a pickle.
Also, I'm not really sure why the window and the window alone is slightly off to the left in the .obj; maybe it's a texture on the wall that makes the pane look like it extends further to the right?
Update: Following the very same procedure as above, with one important caveat, I was able to get this:
Once again, not everything is perfectly aligned. Take, for example, the toolbox. But it's exceedingly close! So what's the deal? The FOV.
Neither plugging in 55 in mm or Field of View results in an accurate rendering. Actually, both were way too far zoomed in. Whatever "FOV" means in the game's engine or whatever must be measured in a third, different way. Just playing around with the number gets me the above, so it's not a huge issue, but it was still throwing me off.
Last Edit: Feb 13, 2016 11:26:54 GMT 10 by reaccount
(Ignore the ladder, I forgot it was in the way before I started rendering, and I am entirely too lazy to go back and fix it.)
So plus side: Adding in backgrounds is easy enough. Problem: Shadows. They're all messed up, although this was expected. I don't know what controls shadows: Is it r11801_000_z.tex? Some other file? Can this even be edited? And if it can, how would I possibly go about doing that?
The mysteries deepen.
EDIT: You know what, that .mod file I've been using from the shd folder? Duh, it's for shadows. The end table is off because I moved it to the right. The hand cart doesn't look great but it's aligned, I'll have to mess around with it.
You could probably very easily change shadow placement assuming you could convert .obj to .mod. Which I believe you can with 3DS Max. Unfortunately, the export function for the Blender script is broke, and probably wasn't intended to handle REmake data anyway. (At this point I don't even use it to load the maps, I use Noesis for that anyway.) Still, maybe useful to know for other people out there.
EDIT #2: Or not.
Moving it over to the left to where the model in the .mod file was moves it too far left. So maybe it is that z texture file, but I read elsewhere that that's only for controlling fog. Blah.
Last Edit: Feb 23, 2016 18:40:25 GMT 10 by reaccount
Post by FluffyQuack on Feb 23, 2016 22:53:16 GMT 10
I'm pretty sure the z texture behaves as z buffer for the background so it clips correctly with real-time rendered models.
Looking in r10a.arc there's a couple of files which might be related to lighting: r10a_light.sbc - Has light in the name. I think SBC are collision files? r10a.sst - Contains an array of items with position, colour, and other variables. Maybe those are lights for the room? It also has effect reference ids, so this might just be for adding effects to a room.
But there has to be something for each room which defines the position of lights which would correspond to position of lights in the background.
I'm thinking it has to be a collision issue, since the light source behaves as though the original end table is still there with its exact same position and dimensions. Looking at the R112 model, it's far more complete than the .mod file in shd, although it still lacks some details (such as the chains hanging from the ceiling which do cast shadows). As far as I know, Nevertheless, codeman here seemed to think that collision data is responsible for the casting of real time shadows. (And here is where he confirms that the room he created was composed of .sbc file data.) Later, however, he concluded that the .mod file in shd was responsible for shadows (which again, I can open, but cannot replace due to an inability to export .mod files).
Also, weirdly, R118 lacks a "light"-designated .sbc file. I'm not sure what R10a's refers to. Maybe it's for when lightning strikes? (That's the room that leads to the painting room and to the courtyard, right?) In any event, simply deleting or replacing these files with another room's causes a crash, so I can't really test it either way.
Meanwhile, even if I bit the bullet and bought 3DS Max, it sounds like a) 2016 doesn't work with codeman's .mod import/export Maxscript, and b) I'm not really sure how the .mod file functions anyway. As I mentioned, I tried lining up the models I made with the .mod file, and that was a no-go. But maybe that was itself the wrong thing to try. After all, the models in the .mod file aren't completely built (the end table lacks a leg, for example). This also explains why despite trying to line up the camera as precisely as possible, objects are still shifted weirdly around.
Even so, there's got to be a better way to do this than sort of guessing by eye. (Probably: Import both the .mod file and the .sbc and see how they interact.) I don't want to bug bunny again, but like the camera data issue, I may be pounding my ahead against the wall to no avail until I do so. On the other hand, without 3DS Max, I don't think I can do anything more.
(Something interesting: R112, one of the 3D built models, lacks a shd folder altogether.)
Last Edit: Feb 24, 2016 5:25:25 GMT 10 by reaccount
My understanding from various threads is that they work with 3DS Max 2012, but again, I don't have a way to verify that. I'm also not sure if they can import .sbc files or not, I just know that codeman was somehow able to extract the collision data about a year back.
Anyway, I talked to Bunny, and it doesn't sound like he's editing any of those things. Which is fine, since it can still be done by eye, and it's good to know that there isn't something obvious I'm missing. That said, it'd still be good to look into these things: If we could re-position lights and stuff, that'd be of course very helpful for creating custom backgrounds and the like.
I've done a little hex editing in the past for DMC4 and music files, but I'm pretty much clueless outside of that. Is there a way one would go about checking to see if it affects light sources? I could try messing around with the sst files in my spare time.
SST: I removed all the entries, and I got this result: abload.de/img/bhd2016-02-2503-19-21c4si9.jpg - Notice how the lantern doesn't look as "bloomy" anymore. I think this file defines effects and extra elements to render in a room. RTP: No idea. Almost no information in the file. FSP: One 3D volume in the file. I changed it and I couldn't tell any difference. CCI: We already know this contains the camera locations. For the heck of it, I changed the FOV to 105, and you get the expected result: abload.de/img/bhd2016-02-2503-21-398fs5s.jpg CCH: This contains the position triggers for camera changes. I changed the volume coordinates to 0, and then the current camera would never change. ADR: This contains information about doors: where they are, and where they lead you if you interact with them. AEV: This contains information about things you can interact with the room (a lot of volumes defining the "hitbox" for items). Changing all the coordinates to 0 made it impossible to interact with anything in the room (besides the door, which is defined in ADR).
And that's it for the XFS files in the room. I tried replacing item_r118.sdl with the file from another stage, and I couldn't see any difference. Maybe it defines item glints or item positions? I tried replacing r118.sdl (in scheduler\filter) and that seems to be what we're looking for. Changing it gave me this result: abload.de/img/bhd2016-02-2503-34-29qzs6p.jpg
As you can see, Chris' shadow is now in a different position. So that file defines the position and other information related to lights. The annoying thing is that we have no convertor for SDL files (as far as I know, the file format is similar to XFS but I suspect it's simpler in that all the information is in a list). I spent a lot of time on my XFS convertor so I'm not feeling motivated right now to start working on the SDL format. But maybe it would be possible to find the exact position of lights by looking at the file in a hex editor and finding all the instances of 3 floats in a row (which would correspond to XYZ coordinates).
Nice! Being able to reduce the amount of bloom is a big deal by itself, at least for me. One of the things I really disliked about the remaster was how intense some of the lights are. I can also play around with the SDL file you mentioned. Just to clarify, when you say 3 floats in a row, does that mean something like 00 XX XX XX 00 (the Xs being the numbers in question)? (Again, extremely minimal experience using a hex editor.) I'm going to try changing some of these three in a rows in the meanwhile.
It may also be worthwhile posting this information in the tutorial section or somewhere else for reference.
Line 110: Changing 0b 03 2a to 44 44 44 causes a crash, as does 0a 04 2c. (For reference, changing other three XX strings like this hasn't done obviously done anything, and didn't cause crashes.)
Line 5b0: Related? Changing 0c 02 01 to various different values results in no shadows. (Changing to 0b 01 01 crashes. Changing to 0c 02 02 or 44 44 44 eliminates shadows.) i.imgur.com/F36itOH.png
Correction: Changing 5b0 to 0c 02 02 moves the light source, it seems. i.imgur.com/NPQsz4b.png (A little hard to tell, but it looks like changing the last value to 02 raised the light. Jill does not case shadows against the wall and such as she normally does. Or maybe it was lowered, hard to tell.)
Last Edit: Feb 25, 2016 14:45:06 GMT 10 by reaccount
WELCOME TO RE MODDING. Please use [u-rl][/url] (remove the - in the first tag) tags at the start/end of links.
knightley: Could someone tell me why the wilsonsos trainer REV1 doesn't work anymore? I love this trainer, I would like to know if there is any correction that can resolve the error
Jul 24, 2020 10:42:09 GMT 10
jetseb: Hi Darksamus, I've been trying to work on this converter but it's too complicated for me I'm a reshade adept but my modding skills are limited. I currently have 2 weapons files from 2007 that I'd like to convert to make me happy. Do you think someone
Jul 27, 2020 16:51:23 GMT 10
jetseb: can help me to do it please?
Jul 27, 2020 16:53:56 GMT 10
DerpyPlayz: jetseb Yhea, if anyone wants to they will help ya.
Jul 27, 2020 22:35:42 GMT 10
jetseb: DerpyPlayz I'm happy to read this but should I address myself to someone in particular?
Jul 28, 2020 0:44:13 GMT 10
DerpyPlayz: jetseb I mean I don't see why you couldn't although you should post your help question in the proper re help category as well as the shoutbox.
Jul 28, 2020 7:06:50 GMT 10