meshes are all over the place(i seen this problem before)

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
a_haouchar
Posts: 97
Joined: Sat Oct 14, 2006 10:51 am
Location: Australia,melbourne

meshes are all over the place(i seen this problem before)

Post by a_haouchar »

Im using 3ds max to export my level in irrlicht under level.3ds and all the meshes are all over the place,they not correct!! and i exported under object(obj) and still does the same thing, tried to attach them together,tried to group them together,tried to explode them!!!! tried alot and still not correct. the code is exact the same as the quake tudurial example!.

oh yea and im using the third person camera files from the smooth 1st and third person thread but from trooper and now the ferrie and lara is moving REALLY SLOW! using irrlicht 1.1 because everything crashes in 1.2
area51
Posts: 338
Joined: Thu Mar 18, 2004 10:20 pm
Location: UK
Contact:

Post by area51 »

I had the same problem with .3ds meshes using Irrlicht-1.1 for the first time, dropped back to Irrlicht-1.0 and it was fine, you can try that. (then you'll be 2 versions behind like me, lol)

I use .X files for everything, had a nasty clipping bug in Irrlicht-1.1 which is the main reason I havn't gone with the latest.

For your slow faerie, you can check your main game loop, rendering loop, Update function or whatever you use each frame, to check if your doing something silly. Maybe another loop or some other expensive functions being called? Not much help really, but look for that sort of thing.
________
Mercedes-Benz Vito Specifications
Last edited by area51 on Fri Feb 25, 2011 12:10 am, edited 1 time in total.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

iirc the 3ds problems are fixed in 1.2.
what do you mean by "crashes all over the place"? can you provide a test case, or point us towards the problem?
if you insist on using 1.1, you can just copy the 3ds loader files from 1.2 and recompile
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
a_haouchar
Posts: 97
Joined: Sat Oct 14, 2006 10:51 am
Location: Australia,melbourne

Post by a_haouchar »

on dev c++ when i compile(same as quake 3 tud) on 1.2 files, i Press A and then i loads the level and the camera falls on a mesh thats all out of place then then crashes.

on visual c++ when i comile it under 1.2 files and under the smooth mix of first and third camera.

i get this:
------ Rebuild All started: Project: myProject, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'myProject', configuration 'Debug|Win32'
Compiling...
CCameraRPGSceneNode.cpp
CCameraSceneNode.cpp
c:\users\haouchars\desktop\3d\ccamerascenenode.h(140) : error C2079: 'irr::scene::CCameraSceneNode::ViewArea' uses undefined struct 'irr::scene::SViewFrustrum'
c:\users\haouchars\desktop\3d\ccamerascenenode.cpp(264) : error C2440: 'return' : cannot convert from 'int *__w64 ' to 'const irr::scene::SViewFrustrum *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\users\haouchars\desktop\3d\ccamerascenenode.cpp(271) : error C2440: '<function-style-cast>' : cannot convert from 'irr::core::matrix4' to 'irr::scene::SViewFrustrum'
Source or target has incomplete type
c:\users\haouchars\desktop\3d\ccamerascenenode.cpp(273) : error C2228: left of '.cameraPosition' must have class/struct/union
type is 'int'
c:\users\haouchars\desktop\3d\ccamerascenenode.cpp(274) : error C2228: left of '.recalculateBoundingBox' must have class/struct/union
type is 'int'
IrrCameraRPG.cpp
stdafx.cpp
Generating Code...
Build log was saved at "file://c:\Users\Haouchars\Desktop\3d\Debug\BuildLog.htm"
myProject - 5 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

i seriously dont get it that irrlicht 1.1 compiles it fine and with 1.2 i get errors that relate that the code is wrong!!!.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You have to update some includes. Since the code for the new camera is copied from CCameraSomething you have to adapt all changes that are made to this camera. E.g. adding the includes which were changed between 1.1 and 1.2
a_haouchar
Posts: 97
Joined: Sat Oct 14, 2006 10:51 am
Location: Australia,melbourne

Post by a_haouchar »

do i copy the files from 1.1 becuase they might be buggy?

i copied the Icamerascenenode and it worked but then once i ran the project and selected A and loaded everything. It crashed

this happened:
Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Now, you should only take the code from someone else if a) you know how to fix it in case it breaks, or b) you are sure that this someone will fix the code for you. So the answer is no, you don't mix up 1.1 and 1.2 files. You have to fix the files you're using - one or the other way. Maybe try to diff the files that are copied and you can see the differences. But I think the only thing that was missing is the include of SViewFrustrum.h
a_haouchar
Posts: 97
Joined: Sat Oct 14, 2006 10:51 am
Location: Australia,melbourne

Post by a_haouchar »

awwwww ok

well here is the direct problem

screenDim.Width = (f32)d->getScreenSize().Width;

its a float varible so i need to change a value?

edit:
Image

edit: im going to stay with 1.1 since the camera files ARE for 1.1 and i just want to solve the meshes are all over the place issue!
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I think screenDim is completely useless, you could also calculate the aspect ratio directly. It's just f32 to not just get ratios 1,2,3,..., but a correct float. But what's really the problem with this code?
Post Reply