OBJ Loader

I'm doing a project to transmit OBJ file from server to client. At the client side, it will render the OBJ file using Java 3D.

I managed to complete the project using socket (TCP) to send the OBJ file. At the client side, it will receive the stream and run it using load(Reader) method in Java 3D. example: I used load(InputStreamReader) method.

But, now, I want to change the transmitting of OBJ file to using DatagramSocket (UDP) instead.

I need advice on whether it is possible to implement the sending of OBJ file using DatagramSocket?

Is it a easy job to switch to DatagramSocket?

A OBJ file can be of size 200 KB. And, I do not know how to run the packet received in Java 3D. As DatagramSocket do not send stream compared to Socket which can be used in the load method.

I'm new in Java programming and really appreciate your help. I need advice on implementing DatagramSocket to send OBJ file and method to do rendering for the packet received in Java 3D.

Thanks a million in advance~

[1044 byte] By [joyce1710a] at [2007-11-26 22:40:14]
# 1
And one more simple question:Is objload (source code provided in Java 3D example) using pure immediate mode rendering?Please advice me.Thanks.
joyce1710a at 2007-7-10 11:53:54 > top of Java-index,Security,Cryptography...
# 2

hi,

I cannot anderstand why you want to use J3D method to receive OBJ from remote server. May be you got a 3D application in which you want to inject 3D object from server. YOu must know that some 3D objct can be very large in data vector. In this case the TCP or UDP transfert can be a little bit dificult to write. Did you think about using a normal FTP request to get object from the server. than when it is copy on your client you can write a litlle injector using the loadinputstreamreder.

If you use TCP or UDP ( i recomand TCP if you want be sure that all the data will be received UDP does not check the transfert) you will have t cut in small part your object and you will need to reasseble all the part in the client.

It is a good idea if you want to write an 3D object server. Think about writing a small class that other poeple could use to load such object.

regards and bon courage.

hterrollea at 2007-7-10 11:53:54 > top of Java-index,Security,Cryptography...
# 3

Concerning the objload. You cannot play directly an loaded object. it depends if you are in compiled mode or not.

There is some mecamisn that could allow you to insert and run object. Everithing are in the tutorial.

regards.

By the way, i would before writing the server. Implement and test the method how make the object displayable on your 3D application. Then you can concentrete on how to get it from remote server.

Regards

hterrollea at 2007-7-10 11:53:54 > top of Java-index,Security,Cryptography...