PDA

View Full Version : Object reference not set to an instance of an object


kapete
15th Mar 2007, 12:36 AM
That's the message that appears when I try to import the new .obj replacing the old one, I don't know what to do, I made the mesh with 3d max 7 and the group names are correct. :cry:

What's the problem?

chrissy6930
15th Mar 2007, 7:50 AM
Hi!

best thing to do is to go to SimPE forum, sims.ambertation.de/en/, and post the error there. make sure to post the complete error - there is a copy to clipboard button in the error box - so all available info is being made available right away.

:)

Jasana_BugBreeder
15th Mar 2007, 9:14 AM
1. If you are using max - export in 3ds or smd format; obj format is not native to it, and import of 3ds/smd is supported by SimPE.
2. Which object did you cloned? There may be something special in its mesh (number of vertices, joints, morphs) which, when handled incorrectly, produce the error. This error occurs in many cases, so without more details it's impossible to tell what caused it.

kapete
15th Mar 2007, 4:07 PM
1. If you are using max - export in 3ds or smd format; obj format is not native to it, and import of 3ds/smd is supported by SimPE.
2. Which object did you cloned? There may be something special in its mesh (number of vertices, joints, morphs) which, when handled incorrectly, produce the error. This error occurs in many cases, so without more details it's impossible to tell what caused it.

I tried to make a bookcase, bookcases contain 2 meshes: the furniture and it's accesories (books, etc.) When I finnished meshing I grouped all into 2 groups named just the same as the two ones of the primitive object.

I'll try to make it exporting in .3ds or .smd

Thank you :) And sorry for my spanished english :lol:

Jasana_BugBreeder
15th Mar 2007, 5:12 PM
When I finnished meshing I grouped all into 2 groups named just the same as the two ones of the primitive object.
Do you mean the Max's grouping here (Group in main menu), or attaching (Attach button on rollout to the right, one object of type EditableMesh or EditablePoly must be selected to see the button)? If first, then it's incorrect - you need to attach them to have 2 objects in the end.
And, by the way, it's not necessary (and sometimes impossible, with long names) to have your objects in Max be named exactly the same as subsets in SimPE - it's not a problem, because with Replace option in import dialog you can select the name of subset to be replaced.
And sorry for my spanished englishEnglish isn't my native language either :lol: hope we still can understand each other :)

kapete
15th Mar 2007, 6:02 PM
What I do in order to 'group' or 'attach' them:
- I convert one of the forms to poly
- I click and attach it with the others forms which I want to attach.



English isn't my native language either :lol: hope we still can understand each other :)
Fantastic :anime:

Jasana_BugBreeder
16th Mar 2007, 1:00 PM
What I do in order to 'group' or 'attach' them:
- I convert one of the forms to poly
- I click and attach it with the others forms which I want to attach.Should be fine then.

Did you tried to export as 3ds - does the error appear with this format too?
Did you tried to export your obj back to Max - does the mesh look the same as before export, or maybe obj exporter corrupted the mesh somehow?

kapete
16th Mar 2007, 3:53 PM
Should be fine then.

Did you tried to export as 3ds - does the error appear with this format too?
Did you tried to export your obj back to Max - does the mesh look the same as before export, or maybe obj exporter corrupted the mesh somehow?

Ok, It works now, so I exported it in .3ds (Because in .smd, it said me There were too meshes to import (only two :S) )

When I imported it in 3d max It apeared horizontally (I think it isn't a problem) so I did all again and finally I exported and imported, it said me there were too much vertices and I had to turn simpe to advanced mode in order to import it, I did! and it worked.

Thank you so so so so MUCH! :rofl:

Now the problem is ...... I can't load a .3ds file in UVMapper... Should I export it to object only for UVMapping?

Jasana_BugBreeder
16th Mar 2007, 5:31 PM
Because in .smd, it said me There were too meshes to import (only two :S)For smd export, you must have at least one bone (with subset name :) and specific material assigned to your object - export one from SimPE and see how it appears in Max. And yes, you should export one subset at a time in smd.
When I imported it in 3d max It apeared horizontally (I think it isn't a problem)Near the Import button in SimPE, there's combobx with values XZY, XYZ - that's the axis order. Choose XYZ, and mesh would be positioned properly. Pay attention that this combobox selection is always the same when you export and import (if you exported a mesh before you changed it, then import - mesh will be rotated in game).
Now the problem is ...... I can't load a .3ds file in UVMapper... Should I export it to object only for UVMapping?You don't need any additional tools, Max has built-in uvwmapper. Apply Unwrap UVW modifier to your object, click Edit UVWs, do whatever you want there :) usually you would start from Mapping menu and one of choices there.

kapete
16th Mar 2007, 8:52 PM
For smd export, you must have at least one bone (with subset name :) and specific material assigned to your object - export one from SimPE and see how it appears in Max. And yes, you should export one subset at a time in smd.
Near the Import button in SimPE, there's combobx with values XZY, XYZ - that's the axis order. Choose XYZ, and mesh would be positioned properly. Pay attention that this combobox selection is always the same when you export and import (if you exported a mesh before you changed it, then import - mesh will be rotated in game).
You don't need any additional tools, Max has built-in uvwmapper. Apply Unwrap UVW modifier to your object, click Edit UVWs, do whatever you want there :) usually you would start from Mapping menu and one of choices there.

It's time to show an image of my work, but at first I want to re-thank you for you help, you really helped me, I'm so thankful :giggler:

Well I have investigated and think I've learnt the basics about UVWMapping in 3max, I had to download a plugin called texporter to save a .png image in order to import it on simpe. It works, I've already done the bookcase, It only rest UVWMapping books and other accesories which are a little bit more complicated, but I think I'll learn. I should have started with an easier object (it's my first :blink: ) It isn't so beautiful (normal :lol:) An I like the bookcase mesh its easy and hasn't so much vertexs.


Thankyou Jasana :!:

Jasana_BugBreeder
17th Mar 2007, 7:01 AM
I had to download a plugin called texporter to save a .png image in order to import it on simpeI don't know what texporter does :( can you please tell? If it's just for exporting textures from Max, then you can probably use Render To Texture (under Render menu).
Bookcase looks nice; for texturing accessories, it may be easier to first detach them into separate objects, UVWmap, then attach back and rearrange on common map. You may also find UVWMap modifier useful - for example, I usually apply Cylindrical UVWMap to vases, it's easier to start from then automatic mapping options in Edit UVWs dialog.

Good luck :)

kapete
17th Mar 2007, 12:43 PM
I don't know what texporter does :( can you please tell? If it's just for exporting textures from Max, then you can probably use Render To Texture (under Render menu).

Texporter is a plugin for gmax, you can download it here (http://www.cuneytozdas.com/software/3dsmax/) it works in all max versions and lets you separate all faces from the objects and then it makes a rendering (it works only using unwrap UVW) and then you can save the image. It's easy to use.

I didn't understand what you meant about detaching accesories separated :blink:

Jasana_BugBreeder
17th Mar 2007, 11:14 PM
Texporter is a plugin for gmaxThanks for the link, I'll take a look at it. Sounds like automatic unwrapper :)
I didn't understand what you meant about detaching accesories separatedJust like you attached all of them (vases, picture, books) into one object, you can detach them into multiple object. I think it's easier to map them separately (for a vase - start from cylindrical uvwmap, for books - from box uvwmap, and so on), then attach into one object; alternatively, in object containing all accessories, you can select polygons corresponding to vase and apply UVWMap just to those polygons, but I think it requires more accuracy.

kapete
18th Mar 2007, 12:46 AM
Thanks for the link, I'll take a look at it. Sounds like automatic unwrapper :)
Just like you attached all of them (vases, picture, books) into one object, you can detach them into multiple object. I think it's easier to map them separately (for a vase - start from cylindrical uvwmap, for books - from box uvwmap, and so on), then attach into one object; alternatively, in object containing all accessories, you can select polygons corresponding to vase and apply UVWMap just to those polygons, but I think it requires more accuracy.

I use second option :P I attached all and then separate faces, it works good I think :D