Transparency and complex 3D object

Hello,
My application builds a complex 3D object.
With huge data (coordinates and points connections) the application generates a shape based
on the TriangleStripArray primitive. (minimum 15000 triangles)
The problem is that when I enable the transparency mode, the rendering isn't correct.
That's not really a surprise unfortunately...
Any idea on how to fix this ???
Is there a way to render transparency correctly on a such object, independantly from the view point ?
Thx in advance

Imagine rendering a human brain on screen, it's quite a complex 3d object because of
the internal structures like encephal for example.
All the mesh is based on little triangles which compose the TriangleStripArray object.
Each face is visible from it's two sides: Im using front and back culling.
The blending fonction I'm using is the default one.
Depending on the view point, some internal parts disappear : I can see the background
through some triangle faces.. It whould be better to see triangles faces which are behind.
I tried some tricks I've found on J3D.org but.. no success: other problems appears.
Unfortunately it's impossible to give you a screenshot, that's not for public domain.
Thanx in advance for any idea or solution

Similar Messages

  • Problem with adjusting both transparency and color of an object

    I am writing a program where when an object is picked, both it's transparency and color will be altered (the object will become opaque, and its color will turn to a predefined "selected" color), while the previously selected object will return to its original transparency and color. I am able to get this to work, except that objects that were picked two or more picks ago will remain in the selected color, albeit in their original transparency. This problem only seems to occur when transparency is factored in. The picking/color & transparency altering code is as follows.
    public class PickingListener extends MouseAdapter {
         private PickCanvas pickCanvas;
         private TextDisplay overlay;
         private Primitive p;
         private Primitive lastP;
         private ColoringAttributes origColor;
         private TransparencyAttributes origTransparency;
         public PickingListener(PickCanvas pickCanvasArg, TextDisplay overlayArg) {
              pickCanvas = pickCanvasArg;
              overlay = overlayArg;
         public void mouseClicked(MouseEvent e) {
              pickCanvas.setShapeLocation(e);
              PickResult result = pickCanvas.pickClosest();
              if (result == null) {
                   System.out.println("Nothing picked");
              } else {
                   p = (Primitive) result.getNode(PickResult.PRIMITIVE);
                   if (p != null) {
                        setSelectedColor();
                        overlay.setPickedBarInfo((BarInformation) p.getUserData());
                   else
                        System.out.println("null");
         private void setSelectedColor() {
              ColoringAttributes barCA = new ColoringAttributes();
              TransparencyAttributes barTransp = new TransparencyAttributes(TransparencyAttributes.NICEST, 0.0f);
              barCA.setColor(ColorConstants.SELECTED);
              if (lastP != null) {
                   lastP.getAppearance().setColoringAttributes(origColor);
                   lastP.getAppearance().setTransparencyAttributes(origTransparency);
              origColor = p.getAppearance().getColoringAttributes();
              origTransparency = p.getAppearance().getTransparencyAttributes();
              p.getAppearance().setColoringAttributes(barCA);
              p.getAppearance().setTransparencyAttributes(barTransp);
              lastP = p;
    }Capabilities to alter the primitive's color and transparency are all set.
         barAppearance.setCapability(Appearance.ALLOW_COLORING_ATTRIBUTES_READ);
              barAppearance.setCapability(Appearance.ALLOW_COLORING_ATTRIBUTES_WRITE);
              barAppearance.setCapability(Appearance.ALLOW_TRANSPARENCY_ATTRIBUTES_WRITE);          barAppearance.setCapability(Appearance.ALLOW_TRANSPARENCY_ATTRIBUTES_READ);
    ColoringAttributes barCA = new ColoringAttributes();
    barCA.setCapability(ColoringAttributes.ALLOW_COLOR_WRITE);
    barCA.setCapability(ColoringAttributes.ALLOW_COLOR_READ);)
    Any insight as to why this would occur would be greatly appreciated.
    -Adrian Benton

    A Behavior is the preferred way to make changes in a scenegraph. Here is an example from a previous post that changes the appearance of a shape when it collides with another shape.
    The javadoc for javax.media.j3d.Behavior appears to refer to the issue you have.
    Transparencies are confusing, different display adapters deal with them differently. Suggest you search the forum at
    http://forums.java.net/jive/forum.jspa?forumID=70
    for more detailed information.
    regards
    class CollisionDetector extends Behavior {
      private static final Color3f highlightColor = new Color3f(0.0f, 1.0f, 0.0f);
      private static final ColoringAttributes highlight = new ColoringAttributes(
          highlightColor, ColoringAttributes.SHADE_GOURAUD);
      private boolean inCollision = false;
      private Shape3D shape;
      private ColoringAttributes shapeColoring;
      private Appearance shapeAppearance;
      private WakeupOnCollisionEntry wEnter;
      private WakeupOnCollisionExit wExit;
      public CollisionDetector(Shape3D s) {
        shape = s;
        shapeAppearance = shape.getAppearance();
        shapeColoring = shapeAppearance.getColoringAttributes();
        inCollision = false;
      public void initialize() {
        wEnter = new WakeupOnCollisionEntry(shape);
        wExit = new WakeupOnCollisionExit(shape);
        wakeupOn(wEnter);
      public void processStimulus(Enumeration criteria) {
        inCollision = !inCollision;
        if (inCollision) {
          shapeAppearance.setColoringAttributes(highlight);
          wakeupOn(wExit);
        } else {
          shapeAppearance.setColoringAttributes(shapeColoring);
          wakeupOn(wEnter);
    }

  • Many pages and complex data model in JHS app

    I am using JHS to create an application containing data that is structured something like:
    - Country
    - Company
    - Department
    - Employee
    - Payments Details
    I have created entity and view objects corresponding to each of these and the appropriate accessors/view links. We need the user to be able to search, work on data and 'drill down' from any level (not always starting with company). In order to make this possible my JHS application has 5 'top level' tabs corresponding to each of the above entities. From each of these top level pages users can drill down to the children.
    This works but we end up with many pages and a large data model with lots of replication and nesting.
    Country - 5 pages
    Company - 4 pages
    Department - 3 pages
    Employee - 2 pages
    Payments - 1 page
    total 15
    You can picture how the data model is structured. Obviously this is a very simple example but I hope it illustrates my concerns. We have so many pages that post-generation changes are going to be difficult to manage. I'm also worried about the size and complexity of the data model. In this case views are almost all entity based so I guess the data is only cached once but supposing they were not?
    Are we using JHS in the best way ? perhaps I'm overcompilcating it ?
    I have started to rewrite the JHS generated application so that it (almost) always reuses the same top level generated pages (with some modifications). When the user wants to navigate to a child I modify the whereClause of the target ViewOjbect appropriately, reexecute it and forward to the corresponding 'top level' page. This approach seems to work well, cuts down the number of pages enormously and simplifies the data model (and has enabled me to put breadCrumbs in).
    In doing this though, am I creating work for myself that JSH could have done if we had used it differently in the fist place?

    This sounds like a valid approach in your situation. We have been playing with the idea of having something like 'Group Links' where you can generate navigation items from one group to the other. Then, you would need to have one, 5 level deep nested group, and 4 other top level groups to provide the search&select on each of the nested groups, but they themselves would not need to have nested groups, but a navigation link to the nested groups in the 5-level deep group.
    Although nice and simple in theory, the details are a bit tricky to work out with all the possible layout- and samePage settings, so we have not implemented this yet. So your approach seems a valid one. If you have any suggestions on a way to generate what you are now doing manually, we'll be interested.
    Kind regards,
    Peter Ebell
    JHeadstart Team

  • Transparency and effects not working

    I am kind of new to Indesign, but no matter what tutorial I follow, I can't get transparency (or any effect) to work. Is there some fundamental thing I could be missing? For example, I tried to have both a text frame and a graphics frame be semi-transparent. I selected them (separately), and changed the object and fill % in the Effects panel to something low. Nothing happened. I have not been able to apply drop shadows or any other effects either. All the tutorials make it seem like it should be so easy, so I am confused. I have InDesign CS5, version 7.0.4, which I updated to right before I posted this question.

    I'm sorry, right after I posted this I discovered there was a display setting in preferences that turns transparency on my screen off. Oops. Leaving this up in case someone else does the same thing.

  • Large and Complex Applicaton development process in Apex

    Hi,
    Apex can scale well in terms of Data size, number of users etc. We are trying to decide if Apex is suitable for our next large and complex application (Large and complex in terms of quantity and efforts of work and business logic). We have already identified that Apex can handle complexity of our transaction/business logic management. My question is about scaling application development process in Apex. I am curious to know about what other people are doing with Apex in terms of:
    * What is the largest Number of Pages, Forms, Reports etc. within a single application one has developed
    * Assuming with so many pages (objects) to be developed, more than one developers must have worked on the project and the project is divided into multiple phases release. What was/is the max number of developers in your project?
    * Did you run into "Code Conflct" issues for Apex Shared Objects when multiple people had to work on them? How did you manage it and merge the changes?
    * How did you identify, track and manage changes in Apex objects between various project phases and between various environments (DEV, TEST, UAT, PROD).
    * What else you would like to add (in terms of development life cycle only) to my thoughts above that we need to consider while choosing Apex for our next project.
    * Based on your experience would you recommend Apex for our large and complex application?
    Many thanks in advance for your responses.
    Paresh (yparesh at gmail dot com)

    Hi Przemek, Jerry and Roel,
    Thanks to all of you for your helpful responses. If we follow best practices mentioned like trying to centralize code in Page 0, db packages/procedures, JS libs shared components (especially "Shared App" having Shared components between multiple apps) we can minimize code management efforts and use existing technologies to identify, merge, promote code changes. This still leaves with some code and changes that will localized to individual pages (and we still need to manage page 0 and Shared object code changes. I will explain what I am trying to say with an example below about managing changes in a page.
    Przemek, and Jerry,
    How are you identifying, managing and promoting changes between applications environments say TEST to PROD. For example we have 2 separate dbs (and hence workspaces) to host Apex TEST and Apex PROD environment. If I have modified page 15 in TEST and now need to promote changes made to page 15 (deltas) to PROD how do I compare and identify the deltas? Apex can not migrate the whole page across apps in different workspaces and even if Apex can I don't think it is a good idea to overwrite page 15 in PROD with page 15 in TEST unless we can compare them, identify the deltas and make sure the changes are what we intended to promote. Exporting pages and comparing using a text editor is time consuming because of various ids and the way New Line characters can get embedded in page export. Logic that the TEST env should have identical copy of prod due to a refresh before promoting changes from DEV won't help because then whole of above will apply between DEV and TEST (albeit with little less risk as the target is TEST and hopefully any unintended changes will be caught during testing).
    Apex 3.1 has Apex Applications Compare facility? If you have used it, what is your take on it? I think it is too basic but a good start. Won't it be good if there was a nice full fledged compare tool for Apex objects?
    Thanks
    Paresh

  • Complex type objects

    hi i'm newbie. can somebody let me know some good tutorials and samples on complex type objects.
    regards.
    ushan

    following are my classes which i have created ....
    customer.java :
    package org.ushan.wssample.ws;
    public class Customer {
         private String cid;
         private String name;
         private int phone;
         private int home;
         private String street;
         private String town;
         private int age;
         private double balance;
         public Customer(String cid, String name, int phone, int home, String street, String town, int age, double balance){
              this.cid = cid;
              this.name = name;
              this.phone = phone;
              this.home = home;
              this.street = street;
              this.town = town;
              this.age = age;
              this.balance = balance;
         public String getCid() {
              return cid;
         public void setCid(String cid) {
              this.cid = cid;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public int getPhone() {
              return phone;
         public void setPhone(int phone) {
              this.phone = phone;
         public int getHome() {
              return home;
         public void setHome(int home) {
              this.home = home;
         public String getStreet() {
              return street;
         public void setStreet(String street) {
              this.street = street;
         public String getTown() {
              return town;
         public void setTown(String town) {
              this.town = town;
         public int getAge() {
              return age;
         public void setAge(int age) {
              this.age = age;
         public double getBalance() {
              return balance;
         public void setBalance(double balance) {
              this.balance = balance;
    }CustomerDatabase.java :
    package org.ushan.wssample.ws;
    import java.util.*;
    public class CustomerDatabase {
         private static List<Customer> customers;
         public static List<Customer> list(){
              return customers;
         public static Customer getCustomer(String cid){
              Iterator<Customer> iterator = customers.iterator();
              while (iterator.hasNext()){
                   Customer customer = iterator.next();
                   if (customer.getCid().equals(cid)){
                        return customer;
              return null;
         static {
              initCustomers();
         static void initCustomers(){
              customers = new ArrayList<Customer>();
              customers.add(new Customer("AAA", "Ushan", 239875456, "Kandy", 25, 25000.00));
              customers.add(new Customer("BBB", "Gayan", 567567787, "Colombo", 26, 35000.00));
              customers.add(new Customer("CCC", "Kasun", 345689745, "Galle", 24, 15000.00));
    }CustomerService.java :
    package org.ushan.wssample.ws;
    import java.util.List;
    public class CustomerService {
        public String getNameForCustomer(String cid){
            return CustomerDatabase.getCustomer(cid).getName();
        public int getPhoneForCustomer(String cid){
            return CustomerDatabase.getCustomer(cid).getPhone();
        public String getAddressForCustomer(String cid){
            return CustomerDatabase.getCustomer(cid).getAddress();
        public int getAgeForCustomer(String cid){
            return CustomerDatabase.getCustomer(cid).getAge();
        public double getBalanceForCustomer(String cid){
            return CustomerDatabase.getCustomer(cid).getBalance();
        public String listAllCustomers(){
            List<Customer> customers = CustomerDatabase.list();
            StringBuilder result = new StringBuilder();
            for(Customer customer : customers){
                result.append(customer.getCid() + " ");
            return result.toString();
    }i hav done up to here.i don't know how to include the address object in this.

  • What is aggregation and composition of objects?

    Hi,
    Please tell me What is aggregation and composition of objects?
    What are the difference ? Is there anyother type of Object in java ?
    Thankzx
    MerlinRoshina

    Hi,
    Composition is developing a single , complex system by combining subparts.
    Aggregation :
    a composition that encapsulates (hides) the parts . User cant able to access the parts outside .
    Association:
    a composition of independently constructed and externally visible parts. User can access the parts outside .
    To get more detailed information,
    http://people.cs.vt.edu/~kafura/cs2704/basic.concepts.html
    thanks,
    nvseenu.

  • Stop transparency and overlapping in Calendar?

    Hey there,
    Is there a way to stop the transparency or overlapping of events when having multiple calendars. It overlaps and can be incredibly confusing. I know the easy answer is to turn some calendars off but we can't really do that, we need to see everyones events at one time.
    Cheers
    Jacob

    Assuming "angled pieces" are paths, select all the paths involved and then select Object>FlattenTransparency. In the resulting dialog, move the slider all the way toward vector.
    JET

  • Consolidate transparency and blue screen?

    Hi- I have a transparent movie with an object in the center that then has a window open up revealing a blue screen. In the blue screen I want to place one image and in the backround (behind the transparency) I want to place another image. The problem I'm running into is that once the blue screen appears, it takes precedence over the transparency and my backround image dissapears. I can either have the backround image show through the transparency or the image show in the blue screen, but not both. I've tried nesting in layers, doesn't seem to make a difference. Anyone have any ideas?
    Thanks!
    Robert

    It sounds like you've not yet keyed out the blue screen. Is that right?

  • Complex mesh objects slow to work with

    I am using Ilustrator CS3 on a G4 powermac with an 800 mg processor. Complex mesh object are extremely laborious and time consuming. Do I need a faster processor? Is it time to upgrade? The new high end I Macs are running with 2 gig processors. Would this solve my problem?

    It would probably be a bit faster, but given, that AI is still a 32bit app and that an X number of mesh points would still require equally as may cycles for calculating the blending, you're not getting a Ferrari where you now may have an old Chevy, but rather a not so old Chevy. The only thing that will improve performance is to work with smaller meshes and otehr techniques, where applicable. Or you just wait for CS6 and hope for the best...
    Mylenium

  • What is the diffrence between extends and creating new object?

    HI ALL,
    what is the diffrence between extends and creating new object?
    meaning
    class base{
    class derived extends base{
    class base{
    class derived {
    derived(){
    base var = new base();
    can u people tell me diffence from the above examples.
    THANKS.
    ANANDA

    When you create a new object you have to supply the class to which that
    object belongs. A class can extend from another class. If it does so
    explicitly you can define the 'parent' class from which the class extends.
    If you don't explicitly mention anything, the class will implicitly extend
    from the absolute base class named 'Object'.
    Your example is a bit convoluted: when you create a Derived object,
    its constructor creates another object, i.e. an object from the class from
    which the Derived class extends.
    Extending from a class and creating an object don't have much in common.
    kind regards,
    Jos

  • What's the difference between a not-initialed object and a null object

    hi guys, i wanna know the difference between a not-initialed object and a null object.
    for eg.
    Car c1;
    Car c2 = null;after the 2 lines , 2 Car obj-referance have been created, but no Car obj.
    1.so c2 is not refering to any object, so where do we put the null?in the heap?
    2.as no c2 is not refering to any object, what's the difference between c2 and c1?
    3.and where we store the difference-information?in the heap?

    For local variables you can't have "Car c1;" the compiler will complain.That's not true. It will only complain if you try to use it without initializing it.
    You can have (never used, so compiler doesn't care):
    public void doSomething()
       Car c1;
       System.out.println("Hello");
    }or you can have (definitely initialized, so doesn't have to be initialized where declared):
    public void doSomething(boolean goldClubMember)
       Car c1;
       if (goldClubMember)
           c1 = new Car("Lexus");
       else
           c1 = new Car("Kia");
       System.out.println("You can rent a " + c1.getMake());
    }

  • Before Firefox 16 I was able to have full transparency and see through to my desktop. Now I am unable to do this but want it back, can I still do this and how?

    Depending on my theme and style I was able to force Firefox to be transparent and work with Aero to show through to my desktop or other windows behind the browser. I really liked this ability, however, sometime after Firefox 16 this stopped working and I have been looking for a solution ever since. I am currently on the the release version of Firefox.
    Does Firefox not allow this anymore or is there a way I can code this feature back using Styles or modifying one of the files in Firefox?

    Attached screen shot with Firefox version...Everything you see should be transparent.
    You might be seeing I have an old version as I have a few privacy apps running.
    I just attempted another reset and copied my old profile data back in.
    I've attempted in the past, disabling and removing extensions and apps one by one.
    Could my Styles code be incorrect?

  • Creating and Binding View Objects dynamically : Oracle Jdeveloper 11g

    Hello,
    We are trying to create and bind view objects dynamically to adf data visualization components.
    The view object is a result of multiple tables.
    We are using Oracle JDeveloper 11g Technical Preview. ( can't upgrade to TP2 or TP3 now).
    We have found this : http://radio.weblogs.com/0118231/stories/2003/07/15/creatingUpdateableMultientityViewObjectDefinitionsDynamically.html on our search for the same.
    The sample application however, is in 10g , hence required migration.
    Also, it was a standalone application with the TestClient.java having a main() method.
    Our requirement is for Web Application; we use Adf+jsf .
    Guidance of any sort is very much appreciated.
    Thanks in advance.
    -Anil Golla

    Hi,
    there also exist a forum for JDeveloper 11: JDeveloper and OC4J 11g Technology Preview
    What you are trying todo is not trivial because you need to not only dynamically create the VO, you would also dynamically need to create the binding meta data for it (assuming you use ADF). Not sure if the API to modify the binding is public, so posting it on the JDeveloper 11 forum bears a glimpse of hope for an answer
    In JDeveloper 10.1.3 you can't do this
    Frank

  • Training and Event Management  - Object E

    In Training and Event Management, there used to be Object Type <b>E</b> <b>Business Event</b> earlier and I see Object Type <b>E Course</b> in <b>ECC 5</b>. Are they the same? Is my assumption correct that it used to be called <b>Business Event</b> earlier and is now called <b>Course</b>.
    Points will be promptly rewarded

    Hi
      on introduction of Learning solution the terms which we used from TEM now changed to course, curriculum,course groups etc.both terms are used simultaneously based on usage of TEM or LSO.like........
    busness event - course
    BE type         - Curriculum type
    curriculum,E-Learning etc are introduced.
    *Ramesh

Maybe you are looking for

  • Help with table calculations

    Hi, all, I am working on a form that was previously made in Excel. I wanted to remake this in an expandable pdf fillable so that I can add the accessibiltiy information to the form. The first link is to the static pdf converted from Excel here: https

  • When I open itunes it starts up in the book mode, why?  Also it will not sync my iPad

    I am having problems with iTune.  I start iTunes and it starts up in the book mode.  I do not see the start up screen and I am unable to sync my iPad.  I've tried uninstalling iTunes and restarting my system but have the same results.  I like the iPa

  • Adobe Reader 9.2 won't delete

    I have the same problem as an earlier forum where I can't load or unload AR 9.2 for it is missing AdbeRdr920_en_us.msi file. In a reply they mentioned to use Microsoft Installer Cleanup Tool. Where do you find this tool?

  • Airport Express with HP PSC 1410 printer

    I have an airport/airtunes express and have an HP PSC 1410 all in one printer. I can't get it to work as my "network printer" I was surfing the Apple website looking at FAQs and it directed me to the HP site. There are a list of known printers that w

  • What happened to my Roboform tool bar? I'm pissed!

    When I installed v4, my Roboform tool bar shut down. I don't have all the passwords written down so this is a major problem for me. I got a screen that said there were several items that weren't compatible with v4 and they would be corrected as soon