- Site Map >
- Modding and Creation >
- Sims 2 Creation >
- Modding Discussion >
- Research & Development >
- The in-game icon and a new object
- Site Map >
- Modding and Creation >
- Sims 2 Creation >
- Modding Discussion >
- Research & Development >
- The in-game icon and a new object
Posts: 203
Thanks: 10258 in 33 Posts
I haven't yet seen an explanation for beginners as to why this happens (it may exist, I just haven't seen it), so here's a brief explanation as I see it The diagramme is self explanatory. While describing a single tile object below, it is easy enough to work out how the 'green footprint' centre will move for objects 1,2,3 tiles wide or more than 1 tile deep
When I refer to Units, I mean one 1/10 of a square in unzoomed mode in Blender. I believe this is the same as Milkshake.
The general centre for an object in design mode is X:0,Y:0,Z:0 - the meeting of the X and Z axis and however many units above 'ground level' (Y:0). Maxis objects are however, not always centred on 0,0 but usually 5 units left or right or behind (for a single tile footprint object). For instance, the back of a wall surface object is always 5 units behind X:0 and Z:0, and Y:units high. Where on the wall it is to be located determines how far to the left or right along X it is (usually 0, centred). The green footprint you see when you place an object in the game is related to this design mode location and is virtuallly centred with the design mode X and Z axis at 0, (this changes with two and three tile objects..then it become X:.5 and X:1 and so on.
What this means for your object and how it appears as an icon:
The 'icon camera' view for an object in the game when loading a package is centred on the centre of the green footprint (that is usually X:0, Z:0) and at around 35-45 degrees to the right if the object is one square or more wider.
So, the short explanation is that the further away from X:0 or Z:0 your object is in design, and therefore further away from the centre of the green footprint, the less likely it is that when you load it in the game, it will be 'captured' as an image for the icon. (this also applies to an extent with Y. If your object is located 29 units above ground level (rare) you will just see the bottom of it as an icon. at 30 units you won't see it at all.
I hope this helps someone because I sure wish I'd known it when designing my gutters... :salute:
I live vicariously through my Sims. This is a sad reflection on my life and theirs.
Posts: 4,502
Thanks: 13197 in 63 Posts
Posts: 203
Thanks: 10258 in 33 Posts
I live vicariously through my Sims. This is a sad reflection on my life and theirs.
Posts: 203
Thanks: 10258 in 33 Posts
I live vicariously through my Sims. This is a sad reflection on my life and theirs.
Posts: 4,502
Thanks: 13197 in 63 Posts
Posts: 203
Thanks: 10258 in 33 Posts
I live vicariously through my Sims. This is a sad reflection on my life and theirs.
Posts: 548
Thanks: 104511 in 102 Posts
I'm very interested in trying to solve this mystery...and I'm hoping that somewhere in the package file there is a flag (or setting) that sets the 'zoom' level of the camera for taking the catalogue's icon pictures.
IB's 2 -> 3 tile coffee table icon probably worked because the 'zoom level' was the same for both objects (and I'm guessing here ...'no zoom') ....but the problem still persists if you clone a large object (like the apple sculpture, (which seems to have a 'no zoom' setting) and and then create a very small object, like an ashtray, from it, (which needs a closer 'zoom' setting...)...
any ideas anyone?
Posts: 4,502
Thanks: 13197 in 63 Posts
Posts: 203
Thanks: 10258 in 33 Posts
I live vicariously through my Sims. This is a sad reflection on my life and theirs.
Posts: 4,502
Thanks: 13197 in 63 Posts
These two windows were cloned from the same window, the Function of Plate Glass window. Both are one-tile windows, but one is a lot taller than the other one. Here's a screenshot of both of them in the game, and the thumbnail images for both of them from the catalog. I don't think the thumbnail images could be framed correctly like that without the zoom level being altered somehow.
I have also made a clone of the Maxis pine tree and resized the mesh (making it smaller). Both the normal sized and small trees have a thumbnail image of the same size. You can't tell from the thumbnails which is which.
Posts: 548
Thanks: 104511 in 102 Posts
No, I was not hallucinating about the thumbnail images: The zoom level is altered based on the shape of the mesh. I don't know what explains it, but it definitely works with many of the objects I've made, and I'm fairly sure it started happening like that after the bounding mesh function was introduced. These two windows were cloned from the same window, the Function of Plate Glass window. Both are one-tile windows, but one is a lot taller than the other one. Here's a screenshot of both of them in the game, and the thumbnail images for both of them from the catalog. I don't think the thumbnail images could be framed correctly like that without the zoom level being altered somehow. I have also made a clone of the Maxis pine tree and resized the mesh (making it smaller). Both the normal sized and small trees have a thumbnail image of the same size. You can't tell from the thumbnails which is which. |
well ....can you explain this for me then?...... clone the free standing 'Total' mirror .... make a NEW mesh, just a box, the size of an ashtray....and then check the thumbnail.....
the 'zoom' does appear to work....but within certain parameters.... it's really wierd...like there are 'levels'......I don't know....but 'certain ranges'...the zoom DOES work IF the object is within a certain range of the original...but if it's MUCH different...it doesn't??....maybe it's something to do with mirrors?
Posts: 4,502
Thanks: 13197 in 63 Posts
Posts: 548
Thanks: 104511 in 102 Posts
Correct: When I replaced the mirror mesh with a very small box, the thumbnail did not zoom correctly. So, maybe it only works within certain ranges. ... |
..... I knew I wasn't hallucinating either....
Posts: 4,502
Thanks: 13197 in 63 Posts
What I know about the thumbnails is the following:
The thumbnails are generated by a special "camera"; the resulting image is stored in the proper file located in the "Thumbnails" folder (in myDocuments\EA Games\The sims 2).
The settings for this "camera" can be either the games default ones, or can be tailored on the object.
The main CRES of each object always contains a "thumbnailExtension" block: it is often empty (which means that the default settings are to be used for the camera), or it may contain a reference to a special "..._thumbnailShape_cres", that in turn contains the information for the "camera".
The "default" camera settings are unknown, to me. I *guess* that they are not fixed: the camera, by default may be set up according to the bounding box of the mesh.
If I'm right, this may interfere with the mirrors, that have a special "bounding box", and this may create problems when auto-generating the thumbnails (i.e. mirrors may be "special objects", under this point of view).
The "custom" camera settings, as said, are contained in a number of special Resource Nodes (located in the Objects05.package, along with the normal CRES files); all these "special" Resource Nodes have a name ending in "..._thumbnailShape_cres"; the first part of the name identifies the object that it apply to (for instance, the "phoneWall_thumbnailShape_cres" is the special camera used in the "phoneWall_cres" (i.e. the Resource Node of the Wall Phone).
It may happen that some objects "borrow" the camera from another object: this means that the first part of the thumbnailShape name is irrelevant (we can put into the phoneWall_cres the reference to the candleCollection_thumbnailShape_cres, with the consequence that the thumbnail for the phone will be generated using the custom settings from the candles).
What about the information contained into the thumbnailShape_cres? These files are extremely simple CRES, that contain only one "cViewerRefNode" block (the cViewer blocks are the same "camera" blocks used to create the images reflected by mirrors). Just like any other CRES block, the cViewer contains information about the "translation" (i.e. the position of the camera compared to the {0,0,0} point in the 3D space) and the "Rotation" (i.e. the rotation around the X,Y,Z axis). This is not the right place where to discuss about *what* are rotation and translation, and how they are expressed (you can read the InfoCenter article about the CRES). Moving the camera along the three axis, and rotating them around the axis, we can position correctly the camera, so that it can "shot" the right picture to be displayed into the Catalogue.
IMPORTANT NOTE: I'm currently testing how the translation and rotation work.
What I know for sure is that:
1) we can include into the cThumbnailExtension block of our object's CRES the reference to any existing (Maxis) thumbnailShape_cres;
2) we can extract a Maxis thumbnailShape_cres from the Objects05.package and import it into our cloned object, rename it, fix TGI and put it into the 0x1c050000 group; then we can put into the cThumbnailExtension block (in the main CRES) the reference to our custom-named thumbnailShape (prefixed by ##0x1c050000!)
3) i've tried to edit the translation and the rotation of the custom thumbnailShape, but so far I've had no positive results (I will run more tests).
I've finally started my Journal. Information only, no questions.
My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)
If there is no value in the cThumbnailExtension block, you should check if, by chance, your clone is a mirror; as said, I have no "cure" for a bad mirror thumbnail
Last thing, you can brose the Maxis thumbnailShape_cres files (you can do that by using the "Finder" in SimPE and searching for files containing the word thumbnailShape); if you feel that the camera parameter contained in one of those files may be suitable for your object, you can open your main CRES, select the cThumbnailExtension block and add and "Array" entry, in wich you'll type the name of the chosen Maxis thumbnailShape (without any prefix, nor the _cres extension).
I've finally started my Journal. Information only, no questions.
My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)
Posts: 203
Thanks: 10258 in 33 Posts
I live vicariously through my Sims. This is a sad reflection on my life and theirs.
Posts: 203
Thanks: 10258 in 33 Posts
is the CRES of our clone: does it have a thumbnailShape reference? If so, the first try should be to delete the reference from the cThumbnailExtension block: it will re-enable the auto-adjusting default camera (remember to regenerate the catalog thumbnails as suggested by IgnorantBliss!) |
Did that :
"Application has crashed. Application will now terminate"
Once the cThumbnailExtention reference has been removed the is no way to get it back as it is not a choice in the Add/Delete dropdown..
I live vicariously through my Sims. This is a sad reflection on my life and theirs.
Posts: 203
Thanks: 10258 in 33 Posts
I live vicariously through my Sims. This is a sad reflection on my life and theirs.
Posts: 548
Thanks: 104511 in 102 Posts
Did that : "Application has crashed. Application will now terminate" Once the cThumbnailExtention reference has been removed the is no way to get it back as it is not a choice in the Add/Delete dropdown.. |
I think what Numenor meant was to delete any ENTRY in the tumbnail extention block....not the block itself....he does say that the cres MUST ALWAYS contain a thumbnail extention block...which is why your machine probably crashed....
Posts: 548
Thanks: 104511 in 102 Posts
I think I have an idea why the thumbnail resizing doesn't work for the mirror specifically: It has a third GMDC besides the frame and the glass called, errr, mirrorfloormoderate_glass_rot_mirror_boundingbox_gmdc. I tried to resize that mesh (called subset0), but it didn't really change it, either. I tried to even not to use that for the bounding mesh at all, but the clickable area of the object, and therefore neither the thumbnail, did not change. The clickable area of the object still goes far beyond the little box I replaced the mirror with. I wonder if it can't be edited at all for objects like these, or if there is some trick to it. But, in any case, it does really seem like the bounding box and the thumbnail zooming are connected somehow. |
could you explain "I think I have an idea why the thumbnail resizing doesn't work for the mirror specifically" ....because I can't see any explaination in the rest of your reply...:confused:...especially "But, in any case, it does really seem like the bounding box and the thumbnail zooming are connected somehow"
(Actually, I had already done all the things you mentioned above before I posted my question...so I knew it had nothing to with the subset0 ....)
Posts: 4,502
Thanks: 13197 in 63 Posts
could you explain "I think I have an idea why the thumbnail resizing doesn't work for the mirror specifically" ....because I can't see any explaination in the rest of your reply...:confused:...especially "But, in any case, it does really seem like the bounding box and the thumbnail zooming are connected somehow" (Actually, I had already done all the things you mentioned above before I posted my question...so I knew it had nothing to with the subset0 ....) |
Like Numenor mentioned in his explanation, since the mirror has a special "bounding box", the "use in bounding box" feature that works for most objects when importing the mesh doesn't seem to work with the mirror. So, when I noticed the separate GMDC for the bounding box, I figured it may have something to do with the bounding mesh problem, and the usual method not working. That you can't change the bounding mesh like you can with most objects.
And why I thought the bounding box and the thumbnail image were connected was simply because I could change neither the clickable area nor the thumbnail zooming for the mirror, even though I've been able to change both of those with other objects I've worked on. Even after I resized subset0 and used the new mesh for the mirror frame in the bounding mesh, the clickable area for the object in game didn't change, unlike with other objects. And while this problem occured at the same time with the non-changing thumbnail zooming level, and also because I'd noticed the thumbnail zooming changing with other objects when I used the bounding mesh option upon importing the mesh, I figured it seemed quite likely they were somehow connected. Which, I think, was a reasonable guess to make, I just didn't have a technical explanation on how it exactly it might work.
Posts: 2,832
Thanks: 6614 in 20 Posts
I don't know if this is significant in the discussion - but the thumbnail of my new object (based on the model plane) is "mirrored" - ie, the left side of the object is on the right in the thumbnail..I actually never noticed it before, but looking through, some are, some aren't? |
The difference between the game's (DirectX) right-handed coordinate system and the often used (OpenGL) left-handed system is X,Y,Z = -X,Z,Y.
Interestingly enough, bitmap images used in such things as paintings come out R/L swapped, too.
When converting, simply swapping Y & Z still leaves a left/right reversal. The X coordinates also need negated (0-X). If all you can get whatever you are using is swapping Y/Z, then mirror your mesh prior to exporting it.
<* Wes *>
If you like to say what you think, be sure you know which to do first.
Posts: 548
Thanks: 104511 in 102 Posts
Like Numenor mentioned in his explanation, since the mirror has a special "bounding box", the "use in bounding box" feature that works for most objects when importing the mesh doesn't seem to work with the mirror. So, when I noticed the separate GMDC for the bounding box, I figured it may have something to do with the bounding mesh problem, and the usual method not working. That you can't change the bounding mesh like you can with most objects. |
Actually, the clickable area of the mirror can be changed....very easily....by using the bounding box option of the GMDC that contains the FRAME of the mirror. The bounding box (clickable) area for the subset0 should never be used anyway (because it is always a large cube that bears no resemblence to the shape of the acualy mirror...
And why I thought the bounding box and the thumbnail image were connected was simply because I could change neither the clickable area nor the thumbnail zooming for the mirror, even though I've been able to change both of those with other objects I've worked on. Even after I resized subset0 and used the new mesh for the mirror frame in the bounding mesh, the clickable area for the object in game didn't change, unlike with other objects. . |
I'm not sure why you've not been able to change the clickable area for the frame...:confused: ...I have made many mirrors, all with the correct clickable areas (by using the bounding box setting for the frame ... as I have mentioned above) ...
whilst I agree with you that the bounding box setting does play some role on the 'framing' of the object (as I stated in a previous post), it appears that the 'camera' settings must, first and foremost, be the 'correct' one far a particular object in order for those to work...
what's confusing me the most is that I can't find any 'new' information in your replies... :confused: ...
Posts: 4,502
Thanks: 13197 in 63 Posts
Actually, the clickable area of the mirror can be changed....very easily....by using the bounding box option of the GMDC that contains the FRAME of the mirror. The bounding box (clickable) area for the subset0 should never be used anyway (because it is always a large cube that bears no resemblence to the shape of the acualy mirror... I'm not sure why you've not been able to change the clickable area for the frame...:confused: ...I have made many mirrors, all with the correct clickable areas (by using the bounding box setting for the frame ... as I have mentioned above) ... |
I can't explain it, then, but when I cloned the Total Mirror, replaced the frame mesh with a small box and used in the bounding mesh while importing the mesh, the clickable area of the mirror did not change.
what's confusing me the most is that I can't find any 'new' information in your replies... :confused: ... |
In my previous post I only explained my thought process that had lead to the conclusions I made earlier, because you asked for an explanation. That was the best explanation I could give, and I'm not sure what more you expected. I have nothing more to add, and I'm confused about what kind of new information you were looking for. Maybe we're not talking about the same thing.
Who Posted
|