Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

NiteLordz

Member Since 09 Dec 2001
Offline Last Active May 17 2013 11:59 AM
-----

Topics I've Started

Area lights (Forward and Deferred)

20 March 2013 - 08:46 AM

Currently i have the 3 base light types supported and working in a programmable pipeline.  I would like to tackle Area lights, but i am a little stumped at the moment. 

 

my thinking is 

 

Deferred Approach (Light Volume)

-simliar to a point light, i would just use a model that is shaped according to the defined area light

 -ex. rectangular light, would be a quadrilateral that is extruded to accomadate the fov (this is similar to a spotlight, but instead of coming from a    point, it comes from a plane

 

Forward Approach

-no clue

 

if anyone can point me in a direction, or give advice, that would be appreciated.


Qt and setData()

04 March 2013 - 12:49 PM

Currently, i am have a QTreeWidget setup, and it is displaying information properly. Now i am trying to interact with it. When a user clicks on a node of the treeWidget, i need to pass a custom data object thru so i can act accordingly.

in Editor.h i have the following

#include <QtWidgets/QMainWindow>
#include <QtCore/QVariant>
#include <QMetaType>

const int ITEM_NONE = 0;
const int ITEM_NODE = 1;
const int ITEM_COMPONENT = 2;
const int NO_ITEM = 0xFFFFFFFF;

class SceneItem {
public: SceneItem() { type_ = 0; id_ = 0; } SceneItem(unsigned type, unsigned id) { type_ = type; id_ = id; } SceneItem(SceneItem* sceneItem) { type_ = sceneItem->type_; id_ = sceneItem->id_; } ~SceneItem() { }

public: unsigned int type_; unsigned int id_;
};

Q_DECLARE_METATYPE(SceneItem*);

};

then inside of Editor.cpp i have the following

void OnLoad() {

SceneItem sceneItem;
sceneItem.id_ = 1;// scene_->GetID();
sceneItem.type_ = 1;// ITEM_NODE;

QVariant sceneItemVariant = qVariantFromValue(&sceneItem);

item->setData(0, Qt::UserRole, sceneItemVariant);

ui.sceneTreeWidget->addTopLevelItem(item);

}

i then have a signal setup for itemClicked to pass thru the QTreeWidgetItem, and this works.

then i try and extract the data as follows

void Editor::OnSceneTreeItemSelected(QTreeWidgetItem* item, int i) {

QVariant sceneItemVariant = item->data(0, Qt::UserRole);

SceneItem* sceneItem = sceneItemVariant.value<SceneItem*>();

UpdateSceneAttributes(sceneItem);
}

when i extract the data, sceneItem has the values of
id_ = 75661952
type_ = 0

Any suggestions of help would be much appreciated!


Water modeling

26 February 2013 - 03:28 PM

Currently i have a terrain that i render out using patches, and i have a plane that represents the water level.  this works fine... however, as majority of the water plane is under the terrain, it is wasted rendering.

 

ideas i have are that i create a patched water system similar to what i did with terrain and using software occlusion to determine if a patch is visible.  if i did this, i could theoretically use a heightmap to build the build level, allowing for rivers of multiple heights, instead of a plane.

 

any suggestions?


Mipmaps without D3DX11FilterTexture

26 February 2013 - 03:24 PM

I am using DX10/11 and i am trying to create mipmaps, without using d3dx as i am cross platform and would like to keep it clean of the D3DX library.

 

As a test, i used D3DX11FilterTexture to create the mipmaps, and verify everything works as expected.  And it does.  Now i want to replace this method with, what suggestions or alternatives are there.

 

Currently i load in my textures into an image file, so i have the raw image data. 

 

Thanks much


Simulating Grass

22 February 2013 - 11:56 AM

Currently i have a terrain that i render using a heightmap, elevation map and detail maps.  I now want to add in grass and trees (vegetation).  I found this article on rendering grass, http://software.intel.com/en-us/articles/rendering-grass-with-instancing-in-directx-10, but i am wondering how i can "place" grass thru my terrain.  I am assuming something like a distribution map would be needed.

 

Does anyone know of any good examples?

 

Also, if i wanted to render the grass, so that the user walks thru, the grass would shift accordingly.  IN the given example, the grass moves based on wind.  I would still want this, but as the user moves thru the grass the field, the grass on the right would bend to the right, and left accordingly.

 

Any thoughts?

 

Thanks much


PARTNERS