Futurecraft Forums

A forum dedicated to communication and innovation!
 
HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in
Welcome, one and all, to the Futurecraft Forums!

Share | 
 

 Application for Modelling

Go down 
Go to page : Previous  1, 2
AuthorMessage
Keon
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
avatar

Posts : 3075
Join date : 2012-01-17
Location : Hahahaha.

PostSubject: Re: Application for Modelling   Fri Jun 01, 2012 7:32 pm

Quite good. Can you make the walkway circular?

_________________
fr0stbyte124 wrote:
You know, I was thinking we should have a 3D crafting grid for complex recipes, but Kielaran is right: why have three dimensions when you can have six? Truly I don't know how we ever got by with a measly two.


Mackeroth? wrote:
Now, if Fr0stbyte wrote that, someone would make a sig, guaranteed. So what are you going to do now?
Back to top Go down
View user profile
scout37
Recruit
Recruit
avatar

Posts : 292
Join date : 2012-05-14
Location : Earth, in the most powerful and globally dominating country on the planet

PostSubject: Re: Application for Modelling   Fri Jun 01, 2012 8:20 pm

im confused. How do circles and spheres work with minecraft? it makes me almost disgusted. Besides, mac said made of glowstone, so it sounded more like something built in-game.
Back to top Go down
View user profile
fr0stbyte124
Super Developrator
Super Developrator
avatar

Posts : 1835
Join date : 2011-10-13

PostSubject: Re: Application for Modelling   Sat Jun 02, 2012 3:09 am

AngryCatholicMetalhead wrote:
I have no life, and school's out, What was it called?
I wish I knew. I've looked for it before, too, but I keep coming up short. It was more than a year ago.

Probably would be easier to start again from scratch.
Back to top Go down
View user profile
The Schmetterling
DEV
DEV
avatar

Posts : 3123
Join date : 2011-08-31
Location : I'm a butterfly.

PostSubject: Re: Application for Modelling   Sat Jun 02, 2012 6:23 am

scout37 wrote:
im confused. How do circles and spheres work with minecraft? it makes me almost disgusted. Besides, mac said made of glowstone, so it sounded more like something built in-game.

Disgusted?

It's not built in-game. It just so happens that it is carved form glowstone.

_________________



Noli timere tenebras quam lucem, id est tortor.


Spoiler:
 



Mackeroth est abiit. Hinc abiit, et misit me in profundum subconscious!
Back to top Go down
View user profile
Keon
Lord/Lady Rear Admiral 1st
Lord/Lady Rear Admiral 1st
avatar

Posts : 3075
Join date : 2012-01-17
Location : Hahahaha.

PostSubject: Re: Application for Modelling   Sat Jun 02, 2012 10:13 am

Is it a sphere or a blocksphere?

_________________
fr0stbyte124 wrote:
You know, I was thinking we should have a 3D crafting grid for complex recipes, but Kielaran is right: why have three dimensions when you can have six? Truly I don't know how we ever got by with a measly two.


Mackeroth? wrote:
Now, if Fr0stbyte wrote that, someone would make a sig, guaranteed. So what are you going to do now?
Back to top Go down
View user profile
scout37
Recruit
Recruit
avatar

Posts : 292
Join date : 2012-05-14
Location : Earth, in the most powerful and globally dominating country on the planet

PostSubject: Re: Application for Modelling   Sat Jun 02, 2012 11:11 am

Martin Luther King, Jr. wrote:
scout37 wrote:
im confused. How do circles and spheres work with minecraft? it makes me almost disgusted. Besides, mac said made of glowstone, so it sounded more like something built in-game.

Disgusted?

It's not built in-game. It just so happens that it is carved form glowstone.

ok, i just.. dont like the feeling of spheres in minecraft. circular shadows are one thing, but shperes elephant

*gets chills*

Vut yes, great modelling. what do you use?
Back to top Go down
View user profile
The Schmetterling
DEV
DEV
avatar

Posts : 3123
Join date : 2011-08-31
Location : I'm a butterfly.

PostSubject: Re: Application for Modelling   Sun Jun 03, 2012 12:54 am

Keon wrote:
Is it a sphere or a blocksphere?

Sphere sphere.

_________________



Noli timere tenebras quam lucem, id est tortor.


Spoiler:
 



Mackeroth est abiit. Hinc abiit, et misit me in profundum subconscious!
Back to top Go down
View user profile
Laibach
General
General
avatar

Posts : 2024
Join date : 2012-01-23
Age : 67
Location : Frozen Fields

PostSubject: Re: Application for Modelling   Sun Jun 03, 2012 8:28 pm

fr0stbyte124 wrote:
AngryCatholicMetalhead wrote:
I have no life, and school's out, What was it called?
I wish I knew. I've looked for it before, too, but I keep coming up short. It was more than a year ago.

Probably would be easier to start again from scratch.

aww, oh well.

of course now i'm going to try and find it... and fail...

EDIT: I found something, not sure if it could be used at all, and it seems... dirty


Code:

/*
 * Modified on August 8, 2005
 */
package tools;

import java.io.BufferedReader;
import java.io.IOException;
import java.util.ArrayList;

import org.lwjgl.opengl.GL11;

/**
 * @author Jeremy Adams (elias4444)
 *
 * Use these lines if reading from a file
 * FileReader fr = new FileReader(ref);
 * BufferedReader br = new BufferedReader(fr);

 * Use these lines if reading from within a jar
 * InputStreamReader fr = new InputStreamReader(new BufferedInputStream(getClass().getClassLoader().getResourceAsStream(ref)));
 * BufferedReader br = new BufferedReader(fr);
 */

public class Object3D {
   
   
   private ArrayList vertexsets = new ArrayList(); // Vertex Coordinates
   private ArrayList vertexsetsnorms = new ArrayList(); // Vertex Coordinates Normals
   private ArrayList vertexsetstexs = new ArrayList(); // Vertex Coordinates Textures
   private ArrayList faces = new ArrayList(); // Array of Faces (vertex sets)
   private ArrayList facestexs = new ArrayList(); // Array of of Faces textures
   private ArrayList facesnorms = new ArrayList(); // Array of Faces normals
   
   private int objectlist;
   private int numpolys = 0;
   
   //// Statisitcs for drawing ////
   public float toppoint = 0;      // y+
   public float bottompoint = 0;   // y-
   public float leftpoint = 0;      // x-
   public float rightpoint = 0;   // x+
   public float farpoint = 0;      // z-
   public float nearpoint = 0;      // z+
   
   public Object3D(BufferedReader ref, boolean centerit) {
      loadobject(ref);
      if (centerit) {
         centerit();
      }
      opengldrawtolist();
      numpolys = faces.size();
      cleanup();
   }
   
   private void cleanup() {
      vertexsets.clear();
      vertexsetsnorms.clear();
      vertexsetstexs.clear();
      faces.clear();
      facestexs.clear();
      facesnorms.clear();
   }
   
   private void loadobject(BufferedReader br) {
      int linecounter = 0;
      try {
         
         String newline;
         boolean firstpass = true;
         
         while (((newline = br.readLine()) != null)) {
            linecounter++;
            newline = newline.trim();
            if (newline.length() > 0) {
               if (newline.charAt(0) == 'v' && newline.charAt(1) == ' ') {
                  float[] coords = new float[4];
                  String[] coordstext = new String[4];
                  coordstext = newline.split("\\s+");
                  for (int i = 1;i < coordstext.length;i++) {
                     coords[i-1] = Float.valueOf(coordstext[i]).floatValue();
                  }
                  //// check for farpoints ////
                  if (firstpass) {
                     rightpoint = coords[0];
                     leftpoint = coords[0];
                     toppoint = coords[1];
                     bottompoint = coords[1];
                     nearpoint = coords[2];
                     farpoint = coords[2];
                     firstpass = false;
                  }
                  if (coords[0] > rightpoint) {
                     rightpoint = coords[0];
                  }
                  if (coords[0] < leftpoint) {
                     leftpoint = coords[0];
                  }
                  if (coords[1] > toppoint) {
                     toppoint = coords[1];
                  }
                  if (coords[1] < bottompoint) {
                     bottompoint = coords[1];
                  }
                  if (coords[2] > nearpoint) {
                     nearpoint = coords[2];
                  }
                  if (coords[2] < farpoint) {
                     farpoint = coords[2];
                  }
                  /////////////////////////////
                  vertexsets.add(coords);
               }
               if (newline.charAt(0) == 'v' && newline.charAt(1) == 't') {
                  float[] coords = new float[4];
                  String[] coordstext = new String[4];
                  coordstext = newline.split("\\s+");
                  for (int i = 1;i < coordstext.length;i++) {
                     coords[i-1] = Float.valueOf(coordstext[i]).floatValue();
                  }
                  vertexsetstexs.add(coords);
               }
               if (newline.charAt(0) == 'v' && newline.charAt(1) == 'n') {
                  float[] coords = new float[4];
                  String[] coordstext = new String[4];
                  coordstext = newline.split("\\s+");
                  for (int i = 1;i < coordstext.length;i++) {
                     coords[i-1] = Float.valueOf(coordstext[i]).floatValue();
                  }
                  vertexsetsnorms.add(coords);
               }
               if (newline.charAt(0) == 'f' && newline.charAt(1) == ' ') {
                  String[] coordstext = newline.split("\\s+");
                  int[] v = new int[coordstext.length - 1];
                  int[] vt = new int[coordstext.length - 1];
                  int[] vn = new int[coordstext.length - 1];
                  
                  for (int i = 1;i < coordstext.length;i++) {
                     String fixstring = coordstext[i].replaceAll("//","/0/");
                     String[] tempstring = fixstring.split("/");
                     v[i-1] = Integer.valueOf(tempstring[0]).intValue();
                     if (tempstring.length > 1) {
                        vt[i-1] = Integer.valueOf(tempstring[1]).intValue();
                     } else {
                        vt[i-1] = 0;
                     }
                     if (tempstring.length > 2) {
                        vn[i-1] = Integer.valueOf(tempstring[2]).intValue();
                     } else {
                        vn[i-1] = 0;
                     }
                  }
                  faces.add(v);
                  facestexs.add(vt);
                  facesnorms.add(vn);
               }
            }
         }
         
      } catch (IOException e) {
         System.out.println("Failed to read file: " + br.toString());
         //System.exit(0);         
      } catch (NumberFormatException e) {
         System.out.println("Malformed OBJ (on line " + linecounter + "): " + br.toString() + "\r \r" + e.getMessage());
         //System.exit(0);
      }
      
   }
   
   private void centerit() {
      float xshift = (rightpoint-leftpoint) /2f;
      float yshift = (toppoint - bottompoint) /2f;
      float zshift = (nearpoint - farpoint) /2f;
      
      for (int i=0; i < vertexsets.size(); i++) {
         float[] coords = new float[4];
         
         coords[0] = ((float[])(vertexsets.get(i)))[0] - leftpoint - xshift;
         coords[1] = ((float[])(vertexsets.get(i)))[1] - bottompoint - yshift;
         coords[2] = ((float[])(vertexsets.get(i)))[2] - farpoint - zshift;
         
         vertexsets.set(i,coords); // = coords;
      }
      
   }
   
   public float getXWidth() {
      float returnval = 0;
      returnval = rightpoint - leftpoint;
      return returnval;
   }
   
   public float getYHeight() {
      float returnval = 0;
      returnval = toppoint - bottompoint;
      return returnval;
   }
   
   public float getZDepth() {
      float returnval = 0;
      returnval = nearpoint - farpoint;
      return returnval;
   }
   
   public int numpolygons() {
      return numpolys;
   }
   
   public void opengldrawtolist() {
      
      this.objectlist = GL11.glGenLists(1);
      
      GL11.glNewList(objectlist,GL11.GL_COMPILE);
      for (int i=0;i<faces.size();i++) {
         int[] tempfaces = (int[])(faces.get(i));
         int[] tempfacesnorms = (int[])(facesnorms.get(i));
         int[] tempfacestexs = (int[])(facestexs.get(i));
         
         //// Quad Begin Header ////
         int polytype;
         if (tempfaces.length == 3) {
            polytype = GL11.GL_TRIANGLES;
         } else if (tempfaces.length == 4) {
            polytype = GL11.GL_QUADS;
         } else {
            polytype = GL11.GL_POLYGON;
         }
         GL11.glBegin(polytype);
         ////////////////////////////
         
         for (int w=0;w<tempfaces.length;w++) {
            if (tempfacesnorms[w] != 0) {
               float normtempx = ((float[])vertexsetsnorms.get(tempfacesnorms[w] - 1))[0];
               float normtempy = ((float[])vertexsetsnorms.get(tempfacesnorms[w] - 1))[1];
               float normtempz = ((float[])vertexsetsnorms.get(tempfacesnorms[w] - 1))[2];
               GL11.glNormal3f(normtempx, normtempy, normtempz);
            }
            
            if (tempfacestexs[w] != 0) {
               float textempx = ((float[])vertexsetstexs.get(tempfacestexs[w] - 1))[0];
               float textempy = ((float[])vertexsetstexs.get(tempfacestexs[w] - 1))[1];
               float textempz = ((float[])vertexsetstexs.get(tempfacestexs[w] - 1))[2];
               GL11.glTexCoord3f(textempx,1f-textempy,textempz);
            }
            
            float tempx = ((float[])vertexsets.get(tempfaces[w] - 1))[0];
            float tempy = ((float[])vertexsets.get(tempfaces[w] - 1))[1];
            float tempz = ((float[])vertexsets.get(tempfaces[w] - 1))[2];
            GL11.glVertex3f(tempx,tempy,tempz);
         }
         
         
         //// Quad End Footer /////
         GL11.glEnd();
         ///////////////////////////
         
         
      }
      GL11.glEndList();
   }
   
   public void opengldraw() {
      GL11.glCallList(objectlist);
   }
   
}


I found it here:

http://lwjgl.org/forum/index.php/topic,917.0.html


Holy crap its from 2005

well I have no idea if this is worth anything anymore
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Application for Modelling   

Back to top Go down
 
Application for Modelling
Back to top 
Page 2 of 2Go to page : Previous  1, 2
 Similar topics
-
» Calling application's js file inside selenium
» Selenium WebDriver + GWT Application
» How to test single page application (java) with selenium
» How can we automate Ajax based application using selenium.
» Msiexec.exe is not a valid win32 application

Permissions in this forum:You cannot reply to topics in this forum
Futurecraft Forums :: Development :: Modding Team Applications-
Jump to: