SC4 Devotion Forum Archives

SimCity 4 General Discussion and Tutorials => Tips, Tricks and Tutorials => Questions About Custom Content Creation => Topic started by: littlewhitebutterfly on April 03, 2012, 05:54:30 AM

Title: Unexpected S3D format
Post by: littlewhitebutterfly on April 03, 2012, 05:54:30 AM
Hi! I exported my last BAT model several times -after merging and saving with new name, resetting lights, etc- and the result is always the same: I open it in the Reader, the fsh files look alright to me, but when clicking on any S3D file I get the message:

"unexpected S3D format"

I click OK and I get:

"Insufficient memory"  &sly

Meanwhile, no S3D model shows on the window on the right. Similarly, if I run the model through the Plugin Manager, I get an invisible prop on the Lot Editor -that is, you see the square blue shape when you add it, but no model at all on the preview. 
I can't figure out what is wrong with this last BAT of mine. I have rendered many, also larger ones over 2MB, and they came out alright. Why the "insufficient memory" message?  :bomb:
I hope you can help me, it would be a pity to give up my nice block of flats!
Title: Re: Unexpected S3D format
Post by: Lowkee33 on April 03, 2012, 06:19:36 AM
Is this BAT or 3dsMax?
Title: Re: Unexpected S3D format
Post by: xannepan on April 03, 2012, 09:50:24 AM
This sometimes occured to me, when i had a LOD that only consisted of a flat plane, or was not a " mesh". Can you tell me a bit more about your LODS?

-alex
Title: Re: Unexpected S3D format
Post by: littlewhitebutterfly on April 04, 2012, 01:07:55 AM
@Lowkee:
It's a BAT.

@Xannepan:
I made custom LODs, they are simple booleans made of two extruded splines -I sometimes make much more complex ones and they still work. In this case I remade them several times so it's unlikely they are the problem, I think. &Thk/(
Title: Re: Unexpected S3D format
Post by: Girafe on April 04, 2012, 01:31:22 AM
Host your LODs somewhere, someone will check them  &Thk/(
Title: Re: Unexpected S3D format
Post by: littlewhitebutterfly on April 05, 2012, 01:08:19 AM
Ok, so here is the model:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg62.imageshack.us%2Fimg62%2F7733%2Fshot3h.jpg&hash=aba56ca11dc3d4671ba6f8dee106551bd701f5ea)
By lilwitebutterfly (http://profile.imageshack.us/user/lilwitebutterfly) at 2012-04-05
and here the LODs:
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg850.imageshack.us%2Fimg850%2F6831%2Fshot4y.jpg&hash=53e15d7102e2a10673cfe1e07d1e53dba1544065)
By lilwitebutterfly (http://profile.imageshack.us/user/lilwitebutterfly) at 2012-04-05
Title: Re: Unexpected S3D format
Post by: Girafe on April 05, 2012, 03:21:00 AM
Save only the LODs and host them on a website (not the pcitures the .gmax itself) like filemail and send us the link. We will export only the LODs for checking if they are the problem or not
Title: Re: Unexpected S3D format
Post by: xannepan on April 05, 2012, 07:48:12 AM
Mmmm don't think LODs are the problem after all... I'm affraid I can't help you any further with this :(

The only question is why you would need such a complex LODs at all (?) i can understand the large 'indents' at the main four corners, but I don't see why the smaller ones are needed.

Title: Re: Unexpected S3D format
Post by: jmyers2043 on April 05, 2012, 02:59:17 PM
Quote from: xannepan on April 05, 2012, 07:48:12 AM
Mmmm don't think LODs are the problem after all... I'm affraid I can't help you any further with this :(

The only question is why you would need such a complex LODs at all (?) i can understand the large 'indents' at the main four corners, but I don't see why the smaller ones are needed.

It's time to do an experiment. Load your model the same way you describved above. Do not merge the custom LOD. Click 'refit lods' the 'reset lights' and export. How does the building look now?

QuoteI made custom LODs, they are simple booleans made of two extruded splines

Secondly, after using the boolean tool I usually convert the element (in this case, the LOD) to an editable poly. This simplifies the modifier list.


Good Luck

- Jim
Title: Re: Unexpected S3D format
Post by: littlewhitebutterfly on April 06, 2012, 03:57:08 AM
Thank you all, now we know LODs are not the problem: I have merged only the model and refitted LODs, exported, and still got the "unexpected S3D" message.

However there might be a hint: every time I merge the model into a new file, it looks much much lighter until I reset lights and cameras and then it looks as you see it. Seems like the model carries with it some different light/camera settings, which doesn't happen with any other BAT of mine. You see, I first downloaded a BAT similar to this one, modified, saved, and exported it, and got the error message you know. So I deleted everything, including lights and materials, and made the BAT from scratch, but still on the same file. Now when I merge it into a new file it seems it reverses to its original light settings.. possible?

Also another important thing: I now notice the night fsh files look weird: why the black background rather than the usual transparent one?
(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg38.imageshack.us%2Fimg38%2F92%2Fshot5a.jpg&hash=7b2e1b108f5ccab5c30b453deacfb07f0c35fe14)
By lilwitebutterfly (http://profile.imageshack.us/user/lilwitebutterfly) at 2012-04-06
Title: Re: Unexpected S3D format
Post by: jmyers2043 on April 06, 2012, 04:46:50 AM
Quote from: littlewhitebutterfly on April 06, 2012, 03:57:08 AM
Thank you all, now we know LODs are not the problem: I have merged only the model and refitted LODs, exported, and still got the "unexpected S3D" message.

Good

Quote from: littlewhitebutterfly on April 06, 2012, 03:57:08 AM
... Seems like the model carries with it some different light/camera settings...

I was going to ask if this was an imported model then read the question a second time. gmax does not always import the various flavors or versions of 3ds files perfectly for one reason or another. You have no option but to move on. I'm surprised that you got as far as you did. I personally find that importing a 3ds into gmax is more of a pain in the butt than it is worth.

Take Care - Jim



Title: Re: Unexpected S3D format
Post by: littlewhitebutterfly on April 06, 2012, 07:45:47 AM
@jmyers:
As I say, I initially imported the model but then I made a new one all from scratch, albeit on the same file. There is not one single line from the original building, the one you see was created by myself completely, as well as materials and textures. Also, I merged it into new files several times, so I can't understand how it is possible that this "bug" passes on to them. &sly No objects of the original model are there, as far as I can tell, and anyway when I merge, I select the objects I made. Gosh, are you telling me there's no way to get my building onto a clean file?
PS The original building was a gmax too.
Title: Re: Unexpected S3D format
Post by: vester on April 06, 2012, 07:47:39 AM
Have you tried to selected all the part of the model and do a "Save Selected"

You might lose some of the unwanted objects.
Title: Re: Unexpected S3D format
Post by: cogeo on April 06, 2012, 09:29:45 AM
When merging the object into a new file, DO NOT highlight TB2CameraHandle in the list. This should be created by you. So try merging once more, following the steps below:
- Open gmax/BAT.
- In the (empty) scene create a new omni- (or any otther type) light, and then delete it. This should create the yellow rays (converging to the middle of the scene).
- Select File->Merge, open the old file. In the list that follows highlight everything EXCEPT TB2CameraHandle and cick OK.

I also see some very large IID numbers in the pic. This can be fixed taking the following steps:
- Open the Registry Editor (in the Windows Taskbar select Start->Run and type-in regedit).
- Go to key HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\SimCity 4\Tools.
- There are two values (entries) there, Model ID and User Group ID. Delete them both (don't just clear their contents, delete them completely - right-click and select Delete).
- Open your BAT and start exporting. Don't wait the export to complete, as we will have to scrap this model anyway. So open the Task Manager (Alt+Ctrl+Delete) and kill gmax.exe.
- Go to the Plugins folder and delete the partially exported model.
- Open the Registry Editor again, go to HKEY_LOCAL_MACHINE\SOFTWARE\Maxis\SimCity 4\Tools and you will see the two entries again. Model ID should now have a value of 0x00010000 or 0x00020000 (can't remember exactly). Change it to 0x00030000 or 0x00040000 (I personally prefer the latter).
- New exports will now be using a new sequence of IDs.

If the above haven't helped, send me the BAT (along with its textures) to take a look.
Title: Re: Unexpected S3D format
Post by: jmyers2043 on April 06, 2012, 09:30:45 AM
Quote from: littlewhitebutterfly on April 06, 2012, 07:45:47 AM
.... @jmyers:
As I say, I initially imported the model but then I made a new one all from scratch, albeit on the same file....

I'm not surprised. That's happened to me too. Some unwanted unseen object or metadata lingers.

Title: Re: Unexpected S3D format
Post by: DebussyMan on April 06, 2012, 10:17:30 AM
Try attaching all geometry in a single mesh and import it into a new file. That usually solves all my rendering problems.  ;)
Title: Re: Unexpected S3D format
Post by: littlewhitebutterfly on April 06, 2012, 01:54:09 PM
Really guys, thank you so much for your help!  :) In fact, I fixed it!  :thumbsup:
I just merged the model into an already existing scene, rather than into a new one. This must have fixed the light issue, as the rendering is now perfect. Yay!!  :P

@cogeo:
Is it a bad thing for the fsh files to have large numbers? Do you still advice to change the sequence of IDs? Could you please explain to me how it works?

PS of course if somebody is interested in my BAT, please just let me know!  ;)
Title: Re: Unexpected S3D format
Post by: Lowkee33 on April 06, 2012, 04:44:16 PM
Glad you fixed your problem.

The night FSH may have been messed up by the lighting, but it could also be that you were looking at the alpha map.

By default, every model you make will have an Instance plus 1 what it was before.  Most of the time this is okay, but sometimes this will have the FSH conflict with Maxis FSH.  Reader might look okay, but in-game your model will have a scatter of Maxis FSH strewn about over it (you would know it if you saw it).

Cogeo's advise will work.  Maxis also released a fix for this:LINK (http://sc4devotion.com/forums/index.php?page=14), and find the "Texture Fix" (also called the model names fix).

I was looking at this earlier, funny thing is that 0x0567#### is a gap for Maxis, so this particular model should be fine.
Title: Re: Unexpected S3D format
Post by: littlewhitebutterfly on April 07, 2012, 06:41:47 AM
@Lowkee:
Oh yes, I know what you are talking about, I had the texture problem dozens of times! I didn't know there was a script that fixes this, so my heartfelt thanks!
In fact I always wondered how it can be that there's no conflict between the hundreds of custom buildings. Anyway, this one works!  ;D
Title: Re: Unexpected S3D format
Post by: Lowkee33 on April 07, 2012, 07:02:42 AM
Quote from: littlewhitebutterfly on April 07, 2012, 06:41:47 AM
In fact I always wondered how it can be that there's no conflict between the hundreds of custom buildings.

Without the fix, the Group ID of every one of your models will be the same and the Instance keeps counting.  Everyone has their own Group ID, so that is why we didn't conflict with each other.  I guess the Maxis Instances take precedence over a unique Group.

With the fix, your Instances are always going to be 0x0003####.  The Group is created off of what time it is, so that helps ensure that we wont conflict with each other.  Maxis didn't use that Instance.