Diet rendering
-
- Posts: 49
- Joined: Thu Aug 12, 2004 12:42 pm
- Location: Sweden
- Contact:
Diet rendering
Hey everyone!
I'm making a plugin/extension to a multimedia creation application using Irrlicht. My plugin renders a single mesh without any fancy stuff like shaders/shadows, this procedure will then be repeated an arbitrary number of times every frame, depending on how many copies of the plugin object is used. The question is, is it possible to modify parts Irrlicht to optimize rendering for this?
Also, I use a rendertarget texture to draw the scene to a surface the application can use, is it possible to somehow draw directly to a DC much like drawing to a different window using endScene(windowid)?
I'm making a plugin/extension to a multimedia creation application using Irrlicht. My plugin renders a single mesh without any fancy stuff like shaders/shadows, this procedure will then be repeated an arbitrary number of times every frame, depending on how many copies of the plugin object is used. The question is, is it possible to modify parts Irrlicht to optimize rendering for this?
Also, I use a rendertarget texture to draw the scene to a surface the application can use, is it possible to somehow draw directly to a DC much like drawing to a different window using endScene(windowid)?
This monkey is useless, it only has ONE ass!!!
-
- Posts: 377
- Joined: Fri Oct 28, 2005 10:28 am
- Contact:
To give detailed tips here, we need more detail on what kind of data you want to display and how much of it. How big are the individual objects and how many of these are drawn? This helps to determine the bottleneck.
Just tell us what you are trying to achieve in the end.
Possible solutions reach from buffer merging (easy) to hardware instancing (difficult)
We need to know more.
Just tell us what you are trying to achieve in the end.
Possible solutions reach from buffer merging (easy) to hardware instancing (difficult)
We need to know more.
No offense
-
- Posts: 49
- Joined: Thu Aug 12, 2004 12:42 pm
- Location: Sweden
- Contact:
Thanks for the interest, Baal.
Ok this is what I'm doing:
As reference I use the sydney mesh supplied with Irrlicht and it runs smoothly up until 10-15 meshes are drawn.
Ok this is what I'm doing:
- Begin scene
Set rendertarget
A single mesh is drawn
End scene
Lock rendertarget
Load rendertarget to destination surface
As reference I use the sydney mesh supplied with Irrlicht and it runs smoothly up until 10-15 meshes are drawn.
This monkey is useless, it only has ONE ass!!!
-
- Posts: 377
- Joined: Fri Oct 28, 2005 10:28 am
- Contact:
With what you want to achieve in the end, I actually meant the effect you want to create with this. Not so much what you are doing right now, because this might not be the best in all cases.
Do you want to create impostors here to get down scene complexity?
There is not much room for improvement, if you render each mesh seperately. Question is: Do you really need to?
It might be worth to investigate the possibility of rendering multiple objects at the same time. For instance a 1024x1024 render target with four models, one model in each quadrant. Or even a 2048x2048 with 16 models.
Then leave those rendered models in this texture and setup texture coordinates in your scene accordingly. Don't cut/copy this texture to pieces and assign it individually. One big texture is much better than many smaller textures that sum up to the same size.
If you don't have to update all meshes all the time, then this proposed way needs tweaking. I don't know if Irrlicht supports viewports to subparts of a render target. If it does, then you can setup a viewport only for the part you want to update.
So the big picture is: Do batching. Rendering 1000 triangles with one scoop, it is *much* better than rendering 10 triangles in 100 portions. Same goes for textures in the scene.
Do you want to create impostors here to get down scene complexity?
There is not much room for improvement, if you render each mesh seperately. Question is: Do you really need to?
It might be worth to investigate the possibility of rendering multiple objects at the same time. For instance a 1024x1024 render target with four models, one model in each quadrant. Or even a 2048x2048 with 16 models.
Then leave those rendered models in this texture and setup texture coordinates in your scene accordingly. Don't cut/copy this texture to pieces and assign it individually. One big texture is much better than many smaller textures that sum up to the same size.
If you don't have to update all meshes all the time, then this proposed way needs tweaking. I don't know if Irrlicht supports viewports to subparts of a render target. If it does, then you can setup a viewport only for the part you want to update.
So the big picture is: Do batching. Rendering 1000 triangles with one scoop, it is *much* better than rendering 10 triangles in 100 portions. Same goes for textures in the scene.
No offense
-
- Posts: 49
- Joined: Thu Aug 12, 2004 12:42 pm
- Location: Sweden
- Contact:
That's a good question. The problem is; as the project is a plugin there may be lots of different mesh-objects with different sizes and configurations. I'll try to elaborate on your suggestion on using viewports for drawing several meshes inside each begin/end scene.There is not much room for improvement, if you render each mesh seperately. Question is: Do you really need to?
A followup question; is it terribly slow creating and destroying a rendertarget texture every frame when it needs to be resized?
This monkey is useless, it only has ONE ass!!!
-
- Posts: 377
- Joined: Fri Oct 28, 2005 10:28 am
- Contact:
-
- Posts: 49
- Joined: Thu Aug 12, 2004 12:42 pm
- Location: Sweden
- Contact:
Not exactly a secret. I'll try to be as precise as possible.can't you just tell us what exactly you want to do? or is that a secret?
There's a product called Multimedia Fusion created by ClickTeam. Simply put it is a program for creating other applications (games/mediaplayers etc). the second version, Multimedia Fusion 2, is going to be released soon. Most of the stuff MMF can do is not included in the basic package, but is added via extensions (a simple dll with the needed exported functions). This is where I come in. I'm creating this extension using Irrlicht to draw a 3D mesh to the otherwise 2D-only application. My extension will show up as an object the user of MMF can select and include in his project.
This is what it might look like:
http://www.ferretize.net/files/mmf2.PNG
As you might figure out from the screenshot and the way extensions are handled, it's difficult for me to code the rendering efficiently.
This monkey is useless, it only has ONE ass!!!
http://www.clickconvention.com/cc2004.html I've seen you make a video of a irrlicht object for mmf. This was a conversion of your engine.
then my question is: how does that advance?
then my question is: how does that advance?
(sorry for my english im a frenchies )
-
- Posts: 49
- Joined: Thu Aug 12, 2004 12:42 pm
- Location: Sweden
- Contact: