3d problem - drawing order

Okay, I'm working on 3D stuff and everything is going fine, etc. But I've got one problem: I don't know how to determine the drawing order of all the faces, so know faces behave like they shouldn't, because they get drawn at the wrong order, and get drawn while they actually shouldn't be. I'm NOT using Java3D.
Currently, I'm using the painter's algorithm (get the distance of the face to the center, and determine the order that way), but it's not working properly, as expected. I read BSP-trees are the best way to determine the order of the drawings, but I can't find any decent BSP-tutorial (for 3D) nor any code I can use.
My question: Does anyone knows a decent, detailed 3D-BSP-Tutorial, or any code I can use/examine or could anyone explain it here or tell me an other (easier) method. It should be a fast method, because I'm using this for a game I'm creating.
Please help,
Matt.

Matt, could you be a little more specific? Like what is exactly your polygon drawing problem? Some of the polygons are inside out, or all of them? Or they render in very wrong locations etc?

Similar Messages

  • Problem with order in iPhoto

    problem with order in iPhoto. I can't buy a card, because there comes an Message "Ihre Karte enthält offenbar Standardtext, der noch nicht bearbeitet wurde. Gedruckte Karten enthalten diesen Text nicht. Möchten Sie fortfahren?" What should I do?

    That message means that you have text boxes that have not been used.  The holding text that appears in the box will not be printed. But if you want to get rid of the warning just put a space in the text box.
    OR, check to see if the card layout has the same page but without a text box.  Most do.
    OT

  • Problems submitting order via iphoto

    Hi,
    I have a problem placing orders with iphoto. Ordering procedure ok till sending files. Then nothing happens. Internet, email, itunes, account everything ok. security - firewall ok. husband is having same comp. and no problems with his or my account when ordering prints, calendars or books. on my computer its seems impossible. ilife 08 already removed and reinstalled, problem stays the same. helpdesk till now unable to help me.
    I hope some one can help me, and if possible ASAP
    Thanks

    Try trash the com.apple.iPhoto.plist file from the HD/Users/ Your Name / library / preferences folder. (Remember you'll need to reset your User options afterwards. These include minor settings like the window colour and so on. Note: If you've moved your library you'll need to point iPhoto at it again.)
    Regards
    TD

  • Hi, I have problems in ordering book from iPhoto. It says "problems in getting contact with Apple Online Store" I have changed password on my Apple ID - could that be the problem ??

    Hi, I have problems in ordering book from iPhoto. It says "problems in getting contact with Apple Online Store" I have changed password on my Apple ID - could that be the problem ??

    Some additional efforts you can try:
    Go to the System/Sharing preference pane and make sure Remote Apple Events is checked.
    If it is, uncheck it and then recheck and try ordering again.
    OT

  • Problem in order by in forms

    hi guys
    i m having a problem in ordering by in a detail block .
    actually i have a dummy block on whose basis records are populated in a detail block the
    when_button_press has
    go_block('x');
    execute_query;
    there is a where clause in the block level and no order by clause.
    althogh the query which is generated by forms when run on sql gives me the desired result but not in the forms.
    also for elaboration the ordering is to be done on the basis of another table which stores the display order for the records so when I tried using both tables in the forms block QUERRY DATA SOURCE NAME and joined the 2 table in the where and order by caluse of the block level and the column source at the field level was given table_name.column_name but the query build by the form inclued the rrowid for the table whICH i CAN NOT alias so there was a problem in the query genetration and hence the result
    please tell me what is the problem here...
    thankx
    dg

    ok guys dont scratch ur heads the problem has been solved
    thankx anyway
    dg

  • Problems with 'Order Prints' from Aperture 2.1.3 Mystery borders

    *Some background:*
    I've been using Aperture for about 3 months now, importing most of my iPhoto library into the program. I have only recently started shooting in RAW format, most of my photos image files are in JPG format. In the past, I've had no problems with obtaining prints from within iPhoto or to a limited extent Aperture. So, far as I know my program is up-to-date. I have 2 plugins installed: Aperture2twitter and *flickr export Lite* both of which work acceptably.
    *The problem:* I ordered 317 4×6 prints from my aperture library.
    Every photo has a 1/4″ border on both sides of the image, i.e. the printed image is only 4×5 1/2″. I have never ordered this quantity before, but I don’t believe that was the problem, it appears that the processing machine was misaligned and no one reviewed the prints prior to shipping.
    I tried again, on 4 different images ... all JPG files with 3 out of 4 were OK, but one exhibited the "border" issue.
    I haven't a clue what is going on here. Apple implied +(via email)+ that I would have to individually crop every photo to ensure proper aspect ratio. This makes no sense to me at all, as I have never had this kinda problem before.
    Could the plugin(s) be interfering with the s/w? Is there a trick to having photos printed from within Aperture that was not present in iPhoto?
    Any thoughts on what the problem is would be greatly appreciated.
    Thanks
    -john

    I believe that I've solved this problem, with the help of the folks at Apple who handle Aperture tech support using the Aperture support ID that came with the product.
    So the short answer is: Aperture print services REALLY DO REQUIRE the image to be cropped (constrained as they say) prior to the data being sent to Apple Print services.
    Here is the link that describes cropping http://support.apple.com/kb/HT1993?viewlocale=en_US
    The process as described is cumbersome, but the support tech pointed out that in Aperture, crops are 'non-destrutive' and can be undone simply by removing the check mark on the Adjustments tab of the image you crop. *This means that you do not have to make a duplicate image for cropping.*
    So, here is the process that I arrived at to ensure that my "order prints" job turned out:
    1. create an album of all the photos you want to submit for printing.
    2. for each image call up the Crop HUD by pressing 'c' on the keyboard.
    3.select the aspect ratio that you want for your photo. Make sure that it does NOT SAY Master Aspect Ratio, or Main Display Aspect Ratio.
    4. Crop the photo
    on the adjustments tab you can see the X and Y data and Height / Width information which can be undone.
    5. Submit your print request to Apple for all the cropped photos.
    When the prints arrive, you can compare the prints with the submitted photos. They should all be good. You can then delete the album (since it really is not a physical thing) or keep it for reference.
    It all seemed a bit arcane to me, as I never had to worry about this in iPhoto. It must be that iPhoto sends different data than Aperture. I have just received 200 + prints back from Apple Print Services with about 98% success rate. I just have to adjust my thinking and my process when dealing with Aperture.

  • Problem with order by clause

    Hai all,
    I have problem with order by clause,
    My query is
    "select number from table1 order by number asc "
    and the output is displaying as
    1
    10
    12
    13
    15
    17
    19
    2
    20
    21
    22
    But if we give order by it should display as below only right ?
    1
    2
    10
    12
    13
    15
    17
    19
    20
    21
    22 ........
    Please help me why it is not displaying like it. and how to make the statement to display like the second case. Thanks in advance.
    Regards,
    Uraja

    The column datatype that you are selecting is not of NUMBER datatype(might be char or varchar2) hence you are getting such result set.
    And for this purpose, it is recommended to set datatype of a column appropriately.
    For now you can add TO_NUMBER function to column in ORDER BY clause, only if it has data of number type.
    Edited by: Ora on 19 Nov, 2012 3:10 AM

  • Ad Control not showing above Unity3d window even if draw order is adjusted

    I am using Unity3d and Visual Studio to release a simple game. I already have a paid version released and working great. I am trying to make an ad supported version with little luck.
    I added in the Ad Control item into design view and attempted to adjust the Unity window so that it sits below where the ad banner will sit.  I have even tried to adjust the Ad Control draw order to various numbers higher than 0 (not sure if that should
    help or not).
    When the game starts, there is a "flash" of a red outline where the ad should be, but then it disappears, presumably behind the Unity window.  This area is also not pressable, it blocks the presses on my game where the ad should be.
    Is this something to do with the Unity object window parameters, or is there something else I may have to do to get my ads to work?
    Thanks!
    Nick

    Hello,
    Welcome to MSDN forum.
    I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
    the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    Because your issue is related to Unity3d which is third-party, I suggest consulting your issue on Unity3d community:
    https://unity3d.com/community for better response in order to resolve your issue as soon as possible.
    Thanks,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Drawing order of curve behind loaded movie

    Hi,
    I'm having an issue with the draw order of curve that's drawn
    using Actionscript. In terms of the order of execution of the
    function call, I have a SWF loaded first using the loadMovie
    function. Then I call the curveTo function with certain parameters
    to try to draw a curve on top of the loaded movie. However, the
    strange behavior is that the line is hidden behind the movie clip.
    I've used swapDepths, but it wasn't working for me. Also tried
    using the createEmptyMovieClip function with a depth number
    assigned, but didn't do the trick. Any suggestion?

    1.  there's no reason for an onEnterFrame loop.
    2. there's no reason to use any setInterval() functions in the code you showed.
    3. you should be using the same function to load your swfs.  if some logic is needed to position, for example, the different swfs in different locations, the logic should be in that function.
    ie, you should be using something like:
    _level0 swf:
    function nextMov(){
    loadF(MovieList[movieQNum]);
    movieQNum=(movieQNum+1)%MovieList.length;
    function loadF(swf:String){
    dep = getNextHighestDepth();
    currLo.removeMovieClip();
    currLo = createEmptyMovieClip("currLo"+dep, dep);
    loadMovie(moviename, currLo);
    //move the loaded movie behind movie frame
    BlackMovieFrame.swapDepths(currLo);
    function endSession(mc:MovieClip){
    mc.removeMovieClip();
    nextMove();
    // in the loaded swfs:
    var tl:MovieClip=this;
    btnArrow.onPress = function() {
    _root.endSession(tl);

  • Problem with order data

    Hi, I have a problem with order data. A string column has these values:
    A....
    B....
    PSTA-FRA
    PSTA+FRA
    Q....
    R....
    If i order data directly from db ( select column1 from table order by column1 ) , i obtain this result:
    PSTA-FRA
    PSTA+FRA
    If i create a simple report on that table and order on that column the result is:
    PSTA+FRA
    PSTA-FRA
    I can obtain correct output if I set parameter 'Perform group on server' but if i write a selection formula :
    {table.column} >= 'PSTA+FRA'
    record containing PSTA-FRA value not appear.
    I've tried both with Crytal 8.5 and Crystal 11 R2 sp6, database is Sybase SQL Anywhere odbc connection.
    Thanks in advance

    Ordering is done according to the ASCII values of the characters.
    In R2 create a new report and log onto your DB and select Command for your data source. Paste in the SQL you use to get the data in the order the server users. Then you don't have to use CR to do the sorting. DB Servers are much more efficient at collecting the data than CR is.
    Thank you
    Don

  • Problems drawing image

    Im sorry for even askign this but i'm having problems drawing an image, no idea why its not working!!! I know that my Image object actually is the image because i can get it to display on a button, but i need to get it to display in the JPanel through the paintComponent() method, for some reason it wont do it. Thanks for the help.
    Here's my code
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    public class StatWindow extends JDialog{
        private StatPanel panel;
        public StatWindow(JFrame parent) {
            this(parent, null);
        public StatWindow(JFrame parent, String data){
            super(parent, "Stat", false);
            getContentPane().setLayout(null);
            panel = new StatPanel();
            getContentPane().add(panel);
            panel.setBounds(0, 0, 220, 220);
            setSize(300, 300);
            setVisible(true);
        class StatPanel extends JPanel{
            private Image diagram1;
            private Image diagram2;
            private Image diagram3;
            private Image diagram4;
            private Image diagram5;
            private Image diagram6;
            private Image diagram7;
            private Image diagram8;
            private Image diagram9;
            private Image diagram10;
            private Image diagram11;
            private Image diagram12;
            private Image diagram13;
            private Image diagram14;
            private Image diagram15;
            private Image diagram16;
            private Image diagram17;
            private Image diagram18;
            private Image diagram19;
            private Image diagram20;
            private Image diagram21;
            private Image diagram22;
            private Image diagram23;
            private Image diagram24;
            private Image diagram25;
            private Image diagram26;
            private Image diagram27;
            public StatPanel(){
                super();
                Image diagram1 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_01.jpg"));
                Image diagram2 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_02.jpg"));
                Image diagram3 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_03.gif"));
                Image diagram4 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_04.jpg"));
                Image diagram5 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_05.jpg"));
                Image diagram6 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_06.jpg"));
                Image diagram7 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_07.gif"));
                Image diagram8 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_08.jpg"));
                Image diagram9 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_09.jpg"));
                Image diagram10 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_10.jpg"));
                Image diagram11 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_11.gif"));
                Image diagram12 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_12.jpg"));
                Image diagram13 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_13.jpg"));
                Image diagram14 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_14.gif"));
                Image diagram15 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_15.gif"));
                Image diagram16 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_16.jpg"));
                Image diagram17 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_17.jpg"));
                Image diagram18 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_18.gif"));
                Image diagram19 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_19.jpg"));
                Image diagram20 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_20.jpg"));
                Image diagram21 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_21.jpg"));
                Image diagram22 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_22.gif"));
                Image diagram23 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_23.jpg"));
                Image diagram24 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_24.gif"));
                Image diagram25 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_25.jpg"));
                Image diagram26 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_26.jpg"));
                Image diagram27 = getToolkit().getImage(getClass().getResource("xpbn/media/stat/Diagram_27.jpg"));
                addMouseMotionListener(new MouseMotionHandler());
                addMouseListener(new MouseHandler());
                JButton b = new JButton(new ImageIcon(diagram1));
                getContentPane().add(b);
                b.setBounds(0, 0, 40, 40);
            class MouseMotionHandler extends MouseMotionAdapter{
                public void mouseMoved(MouseEvent e){
            class MouseHandler extends MouseAdapter{
                public void mousePressed(MouseEvent e){
            public void paintComponent(Graphics g) {
                super.paintComponent(g);
                Graphics2D g2d = (Graphics2D)g.create();
                g2d.drawImage(diagram1, 0, 0, this);
                g2d.dispose();
    }

    you have these declarations
    private Image diagram1;
    private Image diagram2;
    and in your constructor you have these
    Image diagram1 = getToolkit().getImage...
    Image diagram2 = getToolkit().getImage...
    the inclusion of the 'type' Image makes them local to the constructor

  • Drawing order of components

    Is there a way in MXML to specify drawing order? I'm
    relatively new and the only thing I can see in MXML to specify
    drawing order is to declare the components in the order you want
    them drawn. Let's say I have two panels,
    p1 and
    p2, and one extra state
    s2. What would I put in
    s2 to make
    p1 appear on
    TOP of
    p2 in
    s2???
    <mx:states>
    <mx:State name="s2">
    </mx:State>
    </mx:states>
    <mx:Panel x="10" y="10" width="250" height="200"
    layout="absolute" id="p1" title="Panel 1">
    </mx:Panel>
    <mx:Panel x="40" y="40" width="250" height="200"
    layout="absolute" id="p2" title="Panel 2">
    </mx:Panel>
    Thanks much in advance

    You are correct in that drawing order is related to the order
    in which components are added to the display list. That's the
    default behavior using the addChild() method of a container. You
    can also use addChildAt( child, index ) to specify a position.
    If the children are already in place you can swap their
    positions or move one child into a specific position. For example,
    if you have two children, the positions are 0 and 1. If you want 1
    to become zero, then use setChildIndex( child, 0 ) and that
    component will be moved behind all others.
    Doing this in a state change is difficult since the order
    isn't a property of the child, you must execute a function. I
    suggest just doing it in ActionScript either before or after you
    switch states.

  • Problems in order to build DarkRadiant editor

    Hello gentlemen, I have problems in order to install DarkRadiant From source.
    DarkRadiant is the map editor for the Darkmod Project, a modification of Doom3.
    The problem is that when I do:
    ./autogen
    ./configure
    the terminal shows me this:
    checking for the toolset name used by Boost for g++... configure: WARNING: could not figure out which toolset name to use for g++
    checking boost/regex.hpp usability... yes
    checking boost/regex.hpp presence... yes
    checking for boost/regex.hpp... yes
    checking for the Boost regex library... yes
    checking boost/system/error_code.hpp usability... yes
    checking boost/system/error_code.hpp presence... yes
    checking for boost/system/error_code.hpp... yes
    checking for the Boost system library... yes
    checking boost/filesystem/path.hpp usability... yes
    checking boost/filesystem/path.hpp presence... yes
    checking for boost/filesystem/path.hpp... yes
    checking for the Boost filesystem library... yes
    checking for boost/system/error_code.hpp... (cached) yes
    checking for the Boost system library... (cached) yes
    checking for python-config... python-config
    checking boost/python.hpp usability... yes
    checking boost/python.hpp presence... yes
    checking for boost/python.hpp... yes
    checking for the Boost python library... no
    configure: error: cannot find the flags to link with Boost python
    And I can't compile it,
    I have tried using AUR but it is even worst, the package installs correctly, but when i run the editor:
    segmentation fault.

    If it built from AUR why do you you think you'd get a different result from building it manually?  All that makepkg does is run the commands needed to build it.
    That said, if you want to do it yourself, you should look at the PKGBUILD to see which commands are needed.  Use autoreconf instead of autogen, modify the configure script, set the environment variables, and pass the right parameters to configure.
    Edit: I just built it from the AUR.  I got segfaults after it started when it tried to load files that don't exist (/usr/local/game/doom3).  This is an upstream bug, report it there.
    Last edited by Trilby (2012-09-20 12:28:21)

  • Report a problem to order id MHLW0L1YLJ

    Report a problem to order id MHLW0L1YLJ

    Wrong place....
    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html

  • Problem drawing an arrow

    i am facing serious problems drawing an arrow which has to be moved round the screen.
    does anybody have any idea or reference websites that would solve my problem
    i have to rotate the arrow to the mouse pointer to wherever it is dragged.
    hope u will get with this nick
    hussain52

    A more descriptive backgound to the problem may help people come up with a solution for you.
    From what you've said it sound like you need to use a canvas and paint the arrow on it. Then use a mouse listener to listen for mouse clicks on the arrow and re-draw the arrow appropriatly.
    Does this sound like it might work?
    If so, try the code below...
    It only paints a line, but it might get you thinking in the right direction?
    Additions to get it to do what you want are...
    1. Draw an arrow head at the end of the line.
    2. Listen for mouse clicks within a certain radius of the end of the line.
    3. Redraw the line using the original start point and the new end.
    However, if I've completely missunderstood then it's all a complete waste of time.... but I've enjoyed it.
    Adios amigo.
    /*--- formatted by Jindent 2.1, (www.c-lab.de/~jindent) ---*/
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    * Class declaration
    * @author Ollie Lord
    * @version %I%, %G%
    public class ArrowCanvas extends Canvas implements MouseListener {
    private int startX;
    private int startY;
    private int endX;
    private int endY;
    * Constructor declaration
    * @see
    public ArrowCanvas() {
              setSize(new Dimension(200, 200));
              addMouseListener(this);
    public void paint(Graphics g) {
              g.setColor(Color.black);
              g.drawLine(startX, startY, endX, endY);
    * Invoked when the mouse has been clicked on a component.
    public void mouseClicked(MouseEvent e) {
    * Invoked when the mouse enters a component.
    public void mouseEntered(MouseEvent e) {
    * Invoked when the mouse exits a component.
    public void mouseExited(MouseEvent e) {
    * Invoked when a mouse button has been pressed on a component.
    public void mousePressed(MouseEvent e) {
              System.out.println("Pressed");
              startX=e.getX();
              startY=e.getY();
    * Invoked when a mouse button has been released on a component.
    public void mouseReleased(MouseEvent e) {
              System.out.println("Released");
              endX=e.getX();
              endY=e.getY();
              repaint();
    * Method declaration
    * @param args
    * @see
    public static void main(String[] args) {
    JFrame frame = new JFrame("Arrow");
    frame.getContentPane().add(new ArrowCanvas());
    frame.pack();
    frame.show();
    /*--- formatting done in "Ollies Java Convention" style on 07-04-2001 ---*/

Maybe you are looking for