Export Blender To Java

edit

---------------------NOTE------------------------

I just found out that the j3d package that i used for making this isnt part of standard JRE so if the applet didnt load for you, u didnt have that package. if you are still interested in deploying 3d files on your website using this applet, u must upload the j3d package files onto your server, so the clients who dont have the package, can download it.

hi blenderists

ive recently been working on writing an export script for blender objects to be used in my 3d applet which you can download below.
its in its early stage but should be easy to use.
it works only with all quad objects.
exports vertex colors and also texture coords
//Those who dont know what an j3d applet is, its a piece of java code that enables you to host your 3d models on web, so that visitors can interact with the model live.
the export script and all applet files can be found here
(link updated)
http://www.truploader.com/uploads/920724EmbedBlender.rar

http://img38.imageshack.us/img38/7341/appletscreen.png
and here is a sample blender model
http://web.zone.ee/gamenet/applets/Viewer/Embeded3DPlayer.html

and one more with vertex colors
http://web.zone.ee/gamenet/applets/Viewer/WaterMolecule.html

it looks something like this
![file:///E:/DOCUME%7E1/Rainer/LOCALS%7E1/Temp/moz-screenshot.jpg](file:///E:/DOCUME%7E1/Rainer/LOCALS%7E1/Temp/moz-screenshot.jpg)http://img31.imageshack.us/img31/9827/appletscreen2.png

I also Added a New parameter to embed code.
it enables you to change the polygon mode.
filled, wire frame and vertexes

here is an example of Wire framed object
http://web.zone.ee/gamenet/applets/Viewer/JavaPoints.html

http://img527.imageshack.us/img527/4080/appletscreen3.png

you can see the page source how it has been embed.
it takes one parameter, which is a file location that the export script generates.

i know there are allot of java 3d applets and loaders available. i made it mainly as studying purposes

Use mouse to move the model
anyway what do you think.

Well, Im a bit disappointed… The download files are accessible only with an eSnips account… :eek:

Applet failed to initiate… and I am sure that JAVA works perfectly well at me --> tested thousand of times…

hmm…the folder containing files is puplic. maybe its the link that is flawed.
ill check it out.


here is another link to the same file
hope it works
http://www.esnips.com/doc/c78ca92c-05bf-4230-80b0-8775497d5d40/EmbedBlender

For me, the new link only added one step more --> it sends you in a place where you can see the file in a form of an icon, then after pressing on icon it send you again at the registration window of that site. Right-clicking results in the same…

weird…it lets me download it, even if im signed out.
anyway i uploaded it to some free web hosting site
http://www.truploader.com/uploads/920724EmbedBlender.rar
no accounts needed.

this link works… what about the applet in action? Would be good to see the results

didnt you check the second link in my first post?
http://web.zone.ee/gamenet/applets/Viewer/Embeded3DPlayer.html

it may happen that the applet screen comes up black. if so…just refresh or reload the page.
i keep changing the data of that applet when im testing it.

some things about using it.

  1. you need a server to host the content. and some file reading privileges for your applet
    Before exporting name your model MESH, and Scene, those names will be used as file names, so e.g plane.001 is not good name for file.
  2. after exporting your model, the script generates some files for you
    a) META file containing couple lines with info about the model. like nr of verts,edges,faces, etc
    b) VCOL file, containing the vertex colors
    c) TEXCO file containing the texture coordinates
    d) NOR file containing normals.(applet generates the normals automatically so its not needed, unless you have some specific requirements.
  3. Move the generated files to your server, to adress specified in python RemotePath variable.
  4. in applet Embed code, the model location link is the location of the Scene file(a file with scene name)

at the begining of the python script between the configure script lines you specify the paths for the files.
FilePath is the path files are saved on your local machine.
RemotePath is the path you are going to host the files, some http link
VCOL = true, sets using vertex colors true, you must have model with sticky vertex colors
TEXCO = true, uses uv texture. model must be uv mapped
META = true, should allways be true.
NOR = false, should be false, as i sayd applet generates normals itself, and does it faster than it would take reading the file.

At that link nothing loads for me… Applet cannot initialize :no:

did you try refreshing it.
as i said i keep changing it and sometimes it does it.
just reload the page.
actually i guess i have to remake the applets init() method. it initializes the applet too early, before it has loaded all the data. its my guess. just refresh it.
this is how it should look a like
http://img38.imageshack.us/img38/7341/appletscreen.png

Added another example link
http://web.zone.ee/gamenet/applets/Viewer/WaterMolecule.html
a water molecule with vertex colors
making it took 2-3 min including modeling,painting and uploading.
http://img38.imageshack.us/gal.php?g=appletscreen.png

sorry for bump, but ive got some questions and a new update.

  1. how do i get light properties, like intensity, color, fade etc. i tried light.color and light.PIStrenght, but those are allways 0. i guess im getting them in a wrong way.

and some updates.

Added Pan / Zoom features.
to zoom, just use mouse wheel.
to pan, right click and drag the model.

also added lights export, but as i said earlier, i could only get the lamp coordinates. no other parameters are exported.

Download link for the Applet And Blender export script.
http://www.truploader.com/uploads/372771EmbededBlender3.rar

Lights apply only to textured objects.

Btw, has anyone tried to embed models on their web pates? successfully?

an updated example of a model.
http://web.zone.ee/gamenet/applets/Viewer/Embeded3DPlayer.html


---------------------NOTE------------------------

I just found out that the j3d package that i used for making this isnt part of standard JRE so if the applet didnt load for you, u didnt have that package. if you are still interested in deploying 3d files on your website using this applet, u must upload the j3d package files onto your server, so the clients who dont have the package, can download it.

Hi there can I use java applet in blender

Technically, yes. What do you need to do?

Hi there , if go on to the link you will see this java applet I want it in blender and I have no clue
Thanks
http://www.falstad.com/membrane/
rectangular membrane