Monthly Archives: January 2012

Renegade X – Beyond Black Dawn

 

Renegade X is a free small 1-2 hours single player game showing off some of the features of the UDK. Future Releases will have an Multiplayer Mode as well. The game recreates the original CnC Renegade, with many similar features like Weapons an Vehicles. It has way better graphics than the original and many impressive in-game cinematic. It even recreates the bad humor from the original. However the game doesn’t feel retro, it feels like a new and improved version.

It is a very enjoyable small little game. Overall it is a very impressive game, and it is defiantly worth a look. I am looking forward to the final finished project.

The game is free and can be downloaded at  http://www.renegade-x.com

 

Java GUI: Using AbstractTableModel


When using the AbstractTableModel the easiest way to store the table data is to use a Vector of Vectors.You have to implement additonal functions to insert new data.

Here is a simple example:


import java.awt.Dimension;
import java.awt.GridLayout;
import java.util.Vector;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.AbstractTableModel;
public class AbstractTableDemo extends JPanel{

 public AbstractTableDemo() {
 super(new GridLayout(1,0));

 final JTable table = new JTable(new MyTableModel());
 table.setPreferredScrollableViewportSize(new Dimension(500, 70));
 table.setFillsViewportHeight(true);

 Object[] values = {"String", 10, 20.0, 30.2, new Boolean(false)};
 MyTableModel a = (MyTableModel) table.getModel();
 a.insertData(values);

 //Create the scroll pane and add the table to it.
 JScrollPane scrollPane = new JScrollPane(table);

 //Add the scroll pane to this panel.
 add(scrollPane);
 }

 class MyTableModel extends AbstractTableModel {
 private String[] columnNames = {"Title A", "Title B", "Title C", "Title D", "Title E"};

 private Vector data = new Vector();

 public final Object[] longValues = {"", new Integer(20), new Float(20), new Float(20), Boolean.TRUE};

 @Override
 public int getColumnCount() {
 return columnNames.length;
 }

@Override
 public int getRowCount() {
 return data.size();
 }

@Override
 public Object getValueAt(int row, int col) {
 return ((Vector) data.get(row)).get(col);
 }

 public String getColumnName(int col){
 return columnNames[col];
 }
 public Class getColumnClass(int c){
 return getValueAt(0,c).getClass();
 }

 public void setValueAt(Object value, int row, int col){
 ((Vector) data.get(row)).setElementAt(value, col);
 fireTableCellUpdated(row,col);
 }

 public boolean isCellEditable(int row, int col){
 if (4 == col){
 return true;
 }
 else {
 return false;
 }
 }

 public void insertData(Object[] values){
 data.add(new Vector());
 for(int i =0; i<values.length; i++){
 ((Vector) data.get(data.size()-1)).add(values[i]);
 }
 fireTableDataChanged();
 }

 public void removeRow(int row){
 data.removeElementAt(row);
 fireTableDataChanged();
 }
 }

 private static void createAndShowGUI(){
 JFrame frame = new JFrame("Abstract Table Demo");
 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

 AbstractTableDemo newContentPane = new AbstractTableDemo();
 frame.setContentPane(newContentPane);

 //Display the window.
 frame.pack();
 frame.setVisible(true);
 }

 public static void main(String[] args){
 javax.swing.SwingUtilities.invokeLater(new Runnable() {
 public void run() {
 createAndShowGUI();
 }
 });
 }
}

 

Environment, Using sIBL-sets for Maya Part 2

This time we will be using a sIBL of a tropical beach in Barbados to render a teapot.  However you can use whatever image and model you like.

Required stuff:

 Import sIBL to Maya:

  1. Import the teapot to Maya (File > Import )
  2. Open sIBL, Add the “Tropical Beach” to the Libary (In Library Mode right click in the middle panel and select “Add sIBL set …” )
  3. Select the “Export” panel
  4. In the left panel select “Mental Ray Standard” (Creates an environment)
  5. In the middle panel select the Image
  6. In the right panel click Output Loader script
  7. Back in Maya go to the sIBL shelf and click on the E (execute)
  8. In the Outliner you see a group “sIBL” has been created. It includes a transparent floor to recieve shadows.
  9. In the Hypershade you can Graph the persp-Camera here you see the entire IBL-network that has been created. If you create a new Camera you have to connect the sIBL_mip_rayswitch to the mental ray > Environment Shader Attribute

Render

  1. In the Viewport activate Shaded and Textured mode (Press the key 6)
  2. Position your Render Camera
  3. Apply a “mia_material_x” shader to the teapot (A white tone)
  4. Test render (make sure Final Gather is activated)
  5. If the image is too bright, check the Gamma Settings on the “sIBL_mia_exposure_simple” and set it to 1.0
  6. Adjust Final Gather settings and Anti-Alias Settings for Final Render (increase Accuracy, Point Density)
  7. Render