thanks for reply paroj,
Here what I have in blender (and actually what I need in ogre: only borders are strong green lines configured as texture, and box itself has to be transparent with any color I need during runtime )
but that is what I am actually getting (hopefully you will recognize this darkness )
and this is my material
Code: Select all
// ProperMaterial generated by blender2ogre 2018-04-14 14:39:25.441265
material ProperMaterial {
receive_shadows on
technique {
pass ProperMaterial {
ambient 0.8000000715255737 0.03943429887294769 0.000733385153580457 0.7939394116401672
diffuse 0.8000000715255737 0.03943429887294769 0.000733385153580457 0.7939394116401672
specular 1.0 0.0 0.003955117892473936 0.7939394116401672 12.5
emissive 1.6000001430511475 0.07886859774589539 0.001466770307160914 0.7939394116401672
alpha_to_coverage off
colour_write on
cull_hardware clockwise
depth_check on
depth_func less_equal
depth_write on
illumination_stage
light_clip_planes off
light_scissor off
lighting on
normalise_normals off
polygon_mode solid
scene_blend alpha_blend
scene_blend_op add
shading gouraud
transparent_sorting on
texture_unit {
texture proper.png
tex_address_mode wrap
scale 1.0 1.0
colour_op modulate
}
}
}
}
and my code (maybe something wrong here, its just tutorial one )
Code: Select all
// do not forget to call the base first
OgreBites::ApplicationContext::setup();
// register for input events
addInputListener(this);
// get a pointer to the already created root
Ogre::Root* root = getRoot();
Ogre::SceneManager* scnMgr = root->createSceneManager();
// register our scene with the RTSS
Ogre::RTShader::ShaderGenerator* shadergen = Ogre::RTShader::ShaderGenerator::getSingletonPtr();
shadergen->addSceneManager(scnMgr);
// without light we would just get a black screen
Ogre::Light* light = scnMgr->createLight("MainLight");
Ogre::SceneNode* lightNode = scnMgr->getRootSceneNode()->createChildSceneNode();
lightNode->setPosition(0, 50, 15);
lightNode->attachObject(light);
// also need to tell where we are
Ogre::SceneNode* camNode = scnMgr->getRootSceneNode()->createChildSceneNode();
camNode->setPosition(0, 0, 0);
camNode->lookAt(Ogre::Vector3(0, 0, -20), Ogre::Node::TS_PARENT);
// create the camera
Ogre::Camera* cam = scnMgr->createCamera("myCam");
cam->setNearClipDistance(5); // specific to this sample
cam->setAutoAspectRatio(true);
camNode->attachObject(cam);
// and tell it to render into the main window
getRenderWindow()->addViewport(cam);
// finally something to render
Ogre::Entity* ent = scnMgr->createEntity("ProperCube.mesh");
Ogre::SceneNode* node = scnMgr->getRootSceneNode()->createChildSceneNode();
//node->scale(1, 1, 3);
node->setPosition(0, 0, -20);
Ogre::Real r = 125;
node->roll(Ogre::Radian(r));
node->yaw(Ogre::Radian(r));
//node->pitch(Ogre::Radian(45));
node->attachObject(ent);
//
what do you think I have to do ?