Main Menu
Menu

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.

Show posts Menu

Topics - osamoelle

#1
Support / Atmosphere
October 09, 2013, 12:18:05 AM
Hello,
At first, thanks a lot for this very usefull library!
I'm trying to create an atmoshpere around planets.
To do that, I put a sphere around another slightly smaller with a transparent texture. But the largest sphere is not visible on the side of smallest sphere as i was hoping.
I tried different value of transparency, size, culling mode, etc... outside of the smallest sphere, the side of largest still invisible.
Do you have any idea how to do this ? what I'm doing wrong ?

Thanks a lot !

Some code:
        Object3D planet = Loader.loadASC(new FileInputStream("res/meshes/sphere.asc"), (float) planet_radius, true);
        Object3D atmo = Loader.loadASC(new FileInputStream("res/meshes/sphere.asc"), (float) planet_radius, true);
       
        atmo.rotateX((float) (Math.PI/2));
        planet.rotateX((float) (Math.PI/2));
       
        atmo.setOrigin(new SimpleVector( center[X], center[Y], center[Z]));
        planet.setOrigin(new SimpleVector( center[X], center[Y], center[Z]));
       
        atmo.scale((float) atmo_radius);
       
        atmo.setTexture("atmo");
        atmo.setSpecularLighting( true );
        atmo.setCulling(false);
        atmo.setTransparency(0);
        atmo.setTransparencyMode( Object3D.TRANSPARENCY_MODE_ADD);
        //atmo.setAdditionalColor(255,255,255);
        planet.setTexture( textureId );
       
        planet.build();
        atmo.build();
        planet.addChild(atmo);



[attachment deleted by admin]