Screenshot without background
Screenshot without background
Hey Everyone!
I have a big question regardings screenshots and I can't seem to be able to find any related post in here (if there is one, then by all means please point it to me).
The situation that I have is the next:
I have a rendered scene on screen (just a bunch of models loaded onto a parent model. i.e. A dummy with clothes).
I haven't loaded any background or skybox or anything.
I need to save that scene to an image file but without the background.
The "createScreenShot()" function on IVideoDriver takes the (lack of)background and paint it black/grayish and it also renders the buttons and all the GUI of my app (as expected in a screenshot)
So, my question: is there a way to render to image JUST the scene nodes and not the whole window?
Thanks for your help!!!
I have a big question regardings screenshots and I can't seem to be able to find any related post in here (if there is one, then by all means please point it to me).
The situation that I have is the next:
I have a rendered scene on screen (just a bunch of models loaded onto a parent model. i.e. A dummy with clothes).
I haven't loaded any background or skybox or anything.
I need to save that scene to an image file but without the background.
The "createScreenShot()" function on IVideoDriver takes the (lack of)background and paint it black/grayish and it also renders the buttons and all the GUI of my app (as expected in a screenshot)
So, my question: is there a way to render to image JUST the scene nodes and not the whole window?
Thanks for your help!!!
Screenshot without background or GUI
Here's the screenshot produced by the createScreenShot method on the IVideoDriver.
Notice how the screenshot captures the buttons and all gui elements, plus the background?
Is there a way to ONLY GET the model?
Notice how the screenshot captures the buttons and all gui elements, plus the background?
Is there a way to ONLY GET the model?
When you need to make a screenshot, you better do your own 1 render loop without gui, like next:
this will make you screenshot without gui.
P.S.: I don't know how to remove background.
Code: Select all
device->run();
driver->beginScene();
smgr->drawAll();
driver->endScene();
driver->createScreenShot (...
P.S.: I don't know how to remove background.
Actually yes.raveneyex wrote: Thanks for your help, but I didn't quite understand what you told me.
You're telling me that I have to create one run of the render loop where I don't display the GUI and then take the screenshot?
In the place where you call createScreenShot(), just insert my code above, you screenshot will be generated without GUI on it.
@Hybrid
Actually I was looking for that method (renderTargetToTexture) since I've seen some people mencioning it on the forum, but couldn't find a code snippet where it shows usage, and I've tried and failed epicly by my own.
However, I do need the image outside Irrlicht in two ways:
1. An image file (already done)
2. On the clipboard.
Do you know a way to access the image data so I can pass it to the clipboard?
Thanks mate!
Actually I was looking for that method (renderTargetToTexture) since I've seen some people mencioning it on the forum, but couldn't find a code snippet where it shows usage, and I've tried and failed epicly by my own.
However, I do need the image outside Irrlicht in two ways:
1. An image file (already done)
2. On the clipboard.
Do you know a way to access the image data so I can pass it to the clipboard?
Thanks mate!
Just for the sake of completion for this thread.
I haven't managed to find a way to create the Screenshot without the background, so I turned it white wich is more "image-like" and suits my needs better.
As for copying said screenshot to the clipboard, here's a link to the sources I used for that.
WARNING: Window$ Only.
(It's funking hell to work with Windows Clipboard)
I haven't managed to find a way to create the Screenshot without the background, so I turned it white wich is more "image-like" and suits my needs better.
As for copying said screenshot to the clipboard, here's a link to the sources I used for that.
WARNING: Window$ Only.
Code: Select all
http://www.codeproject.com/KB/clipboard/dib2clipboard.aspx