Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - dutch_delight

Pages: 1 2 3 [4]
Support / Re: model offsets problems
« on: March 19, 2011, 05:44:56 pm »
As a test, I'm using a generic object that I change to load a different model file.
I cant even see the 2nd and 3rd lod so I do this:
float dist = (LevelA.getTransformedCenter().calcSub(world.getCamera().getPosition()).length());

Lod1 = -2563.4226
Lod2 = -12606.766
Lod3 = -27966.719

In 3dsmax, they are all in the exact same position with identical pivots.

Support / model offsets problems
« on: March 17, 2011, 01:17:20 am »
Just been trying to get my gameworld lods to work and I'm having some trouble.

My world is a large quad plane (landscape) that is sliced up into smaller erm,... slices. Each slice is about 3000 faces.
I move each slice to position 0,0,0 in 3dsmax, reset the xform and set the object pivot to 0,0,0 and then export to 3ds format as lod1.
I then apply an optimize modifier so that there are about 1000 triangles and is saved as lod2.
Finally another optimize modifer results in about 200 triangles and that's saved as lod3.
(I need to do it like this because my gaming world is big. On top of the terrain are instances of all my objects so framerate is tight.)

When I load lod1, it is roughly where i expect it to be in world space
But when I display lod2, it is a lot lower in world space than lod1
Lod3 appears even lower down than that.

I'm not transforming the objects, just load and build.
I tried this with loading 3ds and serialized files.

I've tried everything I could find in the forum but no help. I've been using 3dsmax for a long time now (I am a full time game developer/technical artist in real life) so i know a little bit about 3dsmax and can't think of anything else to try.

I am just guessing here but could it be that the amount of verts or faces is being subtracted (or added) from the object position in the load process causing the offset?
(I know it is a known issue but I really need this to work)

Thanks for any advice

Support / Re: overlay help needed
« on: March 14, 2011, 10:16:58 pm »
Ah I see. And yes I am creating a new overlay every frame. Doh!

Code: [Select]
public void onDrawFrame(GL10 gl) {


Overlay uiRadar = new Overlay(world, fb, "tapache");


} catch (Exception e) {
Logger.log(e, Logger.MESSAGE);

I removed some of my (bad) code. But how should I be calling it then?
Declare it somewhere else first and then when it needs to be updated do:

Really appreciate your help.

Support / overlay help needed
« on: March 12, 2011, 01:13:40 am »
12 oclock on a friday night and I'm sitting behind my computer.  :'(

Anyway, I've been trying to work on a radar that is always visible on screen but I'm not fully understanding the overlay.

I've borrowed some code from the forum:

Overlay uiRadar = new Overlay(world, fb, "uiRadarT");

It does slow things down quite badly so something is working but the overlay isn't showing. Texture shows fine when i do this (using texturepack):

fb.blit(uiRadarT, 0, 0, 0, 0, uiRadarT.getWidth(), uiRadarT.getHeight(), 128, 128, 100, false, null);

It says this in the java Docs:
"A scaled blit has to be applied by the application each frame. "

But I'm not getting it. how do I apply a scaled blit? What is a scaled blit?

Support / Re: cant rotate custom object
« on: February 21, 2011, 07:35:16 pm »
Yeah, I figured as much  ;)  Still have a lot to learn.

I've got it all sorted out now by creating a class for my object. This is ok for the player object and a few other unique things but it's a bit tedious to do it for everything.

What I've got is a gaming world made up of ground terrain and on that terrain are lots of objects like trees, buildings and the usual props. I've got an xml file containing positions, rotations, textures and what model file to use for each element.
My plan was to create a generic object class and then run through my xml file and create a new object using that data but I'm not sure how to convert that string so I can load it with the deserializer.

r.raw.imported_object will not work because imported_object is not defined.

Although, thinking about it I'ts probably quicker to load and setup my models first and then extracting my xml.

Support / cant rotate custom object
« on: February 16, 2011, 01:22:49 am »
Hi all,

I've got a problem where I'm trying to rotate an object but it just gives me a NullPointerException.

I create a standard cube which I can rotate fine. no problems.
But when I load a serialized model and rotate the new object, the object cant be found and the screen stays black.
Funny thing is, if i comment out the line that rotates it, the new object gets displayed fine in the scene.

cube.rotateX(0.05f);  //works fine
building.rotateX(0.05f);  //doesnt work

Everything gets declared and added to the world.
Any ideas anyone?

Support / Re: help with converting 3ds model
« on: February 09, 2011, 10:04:12 pm »
It's the filestream i think.
I've had to wrap it in a try/catch and that gives this: such file or directory)

(I am testing on an android virtual device though.)

Support / Re: help with converting 3ds model
« on: February 08, 2011, 10:00:41 pm »
So I've got my model and now I want to load it. but no matter where I put my file, it's just wont load.
Keeps telling me that the file cant be found. Am I missing something here?
Code: [Select]
InputStream mesh_object;
mesh_object = new FileInputStream("c:/sphere.ser");
Object3D obj = Loader.loadSerializedObject(mesh_object);;

Support / Re: help with converting 3ds model
« on: February 07, 2011, 09:00:29 pm »
I've reinstalled the SDK and created a new project and the model went through first time. Sweet!

Thanks for the help.

Support / Re: help with converting 3ds model
« on: February 07, 2011, 11:01:43 am »
I think they do. When I run my AE version everything is just fine. I have been struggling/messing around for a while so maybe i'll try reinstalling the sdk?

Can you see anything wrong with my example code? Would you expect the file to just be converted?

Thanks for your help.

Support / Re: help with converting 3ds model
« on: February 06, 2011, 10:58:25 pm »
When I run the code I get no info or anything just this:
Could the path of the 3ds file cause a problem?

# A fatal error has been detected by the Java Runtime Environment:
#  Internal Error (classFileParser.cpp:3375), pid=3336, tid=6040
#  Error: ShouldNotReachHere()
# JRE version: 6.0_23-b05
# Java VM: Java HotSpot(TM) Client VM (19.0-b09 mixed mode windows-x86 )
# An error report file with more information is saved as:
# C:\Documents and Settings\rich\workspace\3d_engine_pc\hs_err_pid3336.log
# If you would like to submit a bug report, please visit:
---------------  T H R E A D  ---------------

Current thread (0x003a7000):  JavaThread "Unknown thread" [_thread_in_vm, id=6040, stack(0x008c0000,0x00910000)]

Stack: [0x008c0000,0x00910000],  sp=0x0090f8a4,  free space=318k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x200a27]
V  [jvm.dll+0xa536b]
V  [jvm.dll+0x761e8]
V  [jvm.dll+0x779ef]
V  [jvm.dll+0x1cfdc5]
V  [jvm.dll+0x1d069d]
V  [jvm.dll+0x1d0a65]
V  [jvm.dll+0x1d0aab]
V  [jvm.dll+0x1d0bd2]
V  [jvm.dll+0x1d0c4a]
V  [jvm.dll+0x1d0d2d]
V  [jvm.dll+0x1d0fd2]
V  [jvm.dll+0x1f0783]
V  [jvm.dll+0x1f0b5c]
V  [jvm.dll+0xdbd3c]
V  [jvm.dll+0x1e9c28]
V  [jvm.dll+0x106190]
C  [javaw.exe+0x1657]
C  [javaw.exe+0x1e2c]
C  [javaw.exe+0x8614]
C  [kernel32.dll+0xb729]

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )

Other Threads:

=>0x003a7000 (exited) JavaThread "Unknown thread" [_thread_in_vm, id=6040, stack(0x008c0000,0x00910000)]

VM state:not at safepoint (not fully initialized)

VM Mutex/Monitor currently owned by a thread: None

Dynamic libraries:
0x00400000 - 0x00424000    C:\Program Files\Java\jdk1.6.0_23\bin\javaw.exe
0x7c900000 - 0x7c9b2000    C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8f6000    C:\WINDOWS\system32\kernel32.dll
0x77dd0000 - 0x77e6b000    C:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 - 0x77f03000    C:\WINDOWS\system32\RPCRT4.dll
0x77fe0000 - 0x77ff1000    C:\WINDOWS\system32\Secur32.dll
0x7e410000 - 0x7e4a1000    C:\WINDOWS\system32\USER32.dll
0x77f10000 - 0x77f59000    C:\WINDOWS\system32\GDI32.dll
0x76390000 - 0x763ad000    C:\WINDOWS\system32\IMM32.DLL
0x7c340000 - 0x7c396000    C:\Program Files\Java\jdk1.6.0_23\jre\bin\msvcr71.dll
0x6d8a0000 - 0x6db4c000    C:\Program Files\Java\jdk1.6.0_23\jre\bin\client\jvm.dll
0x76b40000 - 0x76b6d000    C:\WINDOWS\system32\WINMM.dll
0x6d850000 - 0x6d85c000    C:\Program Files\Java\jdk1.6.0_23\jre\bin\verify.dll
0x6d3d0000 - 0x6d3ef000    C:\Program Files\Java\jdk1.6.0_23\jre\bin\java.dll
0x6d330000 - 0x6d338000    C:\Program Files\Java\jdk1.6.0_23\jre\bin\hpi.dll
0x76bf0000 - 0x76bfb000    C:\WINDOWS\system32\PSAPI.DLL
0x6d420000 - 0x6d449000    C:\Program Files\Java\jdk1.6.0_23\jre\bin\jdwp.dll
0x6d740000 - 0x6d746000    C:\Program Files\Java\jdk1.6.0_23\jre\bin\npt.dll
0x6d890000 - 0x6d89f000    C:\Program Files\Java\jdk1.6.0_23\jre\bin\zip.dll

Support / Re: help with converting 3ds model
« on: February 06, 2011, 05:08:31 pm »
Yes I am working with jPCT-AE and making some nice progress. I'm just a little stuck with the model conversion process.

Support / help with converting 3ds model
« on: February 06, 2011, 03:24:47 pm »
Hi all,

I'm just getting into java and want to do something with this engine. I'm a bit stuck with the model conversion. I'm using Eclipse and got the latest sdk. When I run this, eclipse throws a fit and gives me no real error message. First time using Eclipse as well so I think it's all configured correctly.
All I want is convert some models. :(

Also, is there any documentation on the .ser files? I was thinking of converting my max exporter to export .ser files directly.

Thanks for any help.

This is my code

Code: [Select]
package com.threed.jpct.example;

import com.threed.jpct.DeSerializer;
import com.threed.jpct.Loader;
import com.threed.jpct.Object3D;

public class model_converter {

    public static void main(String[] args) throws FileNotFoundException {
        Object3D modelfile = null;

        DeSerializer de;
        modelfile = Loader.load3DS("C:/sphere.3ds",1)[0];;
        de = new DeSerializer();
        de.serialize(modelfile, new FileOutputStream("C:/sphere.ser"), true);


Pages: 1 2 3 [4]