<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[now i found the   CPU usage is very high when using QT3D Comparing with the QT embedded VTK]]></title><description><![CDATA[<p dir="auto">1 when i create a Qt3DWindow and draw some axise and grid the cpu increased %27memery increased 24MByte ,but do same thing with vtk ,it just  increased %1or %2 .. and the memery increased only 2MByte..could anyone now why? or That's what it was</p>
]]></description><link>https://forum.qt.io/topic/85014/now-i-found-the-cpu-usage-is-very-high-when-using-qt3d-comparing-with-the-qt-embedded-vtk</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 10:25:08 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/85014.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 14 Nov 2017 06:36:13 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to now i found the   CPU usage is very high when using QT3D Comparing with the QT embedded VTK on Thu, 16 Nov 2017 06:22:04 GMT]]></title><description><![CDATA[<p dir="auto">class Mesh{<br />
std::vector&lt;uint&gt; mIndices;// all stl file vertices index 0,1,2........<br />
std::vector&lt;Vector3&gt; mVertices;// all stl file vertices {{x0,y0,z0},{x1,y1,z1},......}<br />
}amesh;<br />
my really mean is how to construct data (which have already been not including the repeat points) to m_positionAttr and m_indexBuffer</p>
]]></description><link>https://forum.qt.io/post/426312</link><guid isPermaLink="true">https://forum.qt.io/post/426312</guid><dc:creator><![CDATA[jimfar]]></dc:creator><pubDate>Thu, 16 Nov 2017 06:22:04 GMT</pubDate></item><item><title><![CDATA[Reply to now i found the   CPU usage is very high when using QT3D Comparing with the QT embedded VTK on Thu, 16 Nov 2017 06:11:26 GMT]]></title><description><![CDATA[<ol>
<li>
<p dir="auto">5.9.2 example(metarials-cpp) just this src provided by installing qt-opensource-windows-x86-5.9.2.exe..   this is my computer path C:\Qt\Qt5.9.2\Examples\Qt-5.9.2\qt3d\materials-cpp.   and my os is window 8.1 Microsoft Windows [Version 6.3.9600] ..<br />
2.using vtk to load a stl file it will cost more twice memery than file size. and our file maybe very large . but  using qt3d even not getting rid of the repeat points, it cost less memery than vtk. excepert drawing some axise and grid .(consist of lines adn cubics)<br />
3 btw could u tell how to get  rid of the repeat points..this my  snippet:<br />
Qt3DRender::QGeometry <em>geometry = new Qt3DRender::QGeometry;<br />
auto  m_positionAttr = new Qt3DRender::QAttribute(geometry);<br />
//auto  m_colorAttr =      new Qt3DRender::QAttribute(geometry);<br />
auto  m_indexAttr = new Qt3DRender::QAttribute(geometry);<br />
auto  m_NORAttr = new Qt3DRender::QAttribute(geometry);<br />
auto m_positionBuffer = new Qt3DRender::QBuffer(Qt3DRender::QBuffer::VertexBuffer, geometry);<br />
//auto m_colorBuffer = new Qt3DRender::QBuffer(Qt3DRender::QBuffer::VertexBuffer, geometry);<br />
auto m_indexBuffer = new Qt3DRender::QBuffer(Qt3DRender::QBuffer::IndexBuffer, geometry);<br />
auto m_NORBuffer = new Qt3DRender::QBuffer(Qt3DRender::QBuffer::VertexBuffer, geometry);<br />
uint vsize = amesh.mVertices.size();<br />
uint isize = amesh.mIndices.size();<br />
vsize = isize;<br />
//Configure the attributes access<br />
QByteArray colorData;<br />
uint size1 = sizeof(QVector3D);<br />
<a href="//positionData.resize" target="_blank" rel="noopener noreferrer nofollow ugc">//positionData.resize</a>(vsize * 3 * sizeof(float));<br />
QByteArray mNormals, mindexs;<br />
char</em>pdata = (char*)&amp;amesh.mVertices[0][0];<br />
mindexs.resize(vsize * sizeof(uint));<br />
uint<em>pindexs = (uint</em>)mindexs.data();<br />
for (uint i = 0; i &lt;vsize; i++)<br />
pindexs[i] = i;		<br />
const uint nVerts = vsize;<br />
const uint size = nVerts * 3 * sizeof(float);<br />
QByteArray positionBytes, noramlbytes;<br />
<a href="//positionBytes.resize" target="_blank" rel="noopener noreferrer nofollow ugc">//positionBytes.resize</a>(size);<br />
vsize = nVerts;<br />
uint facenum = vsize / 3;<br />
uint j = 0, i = 0;<br />
mNormals.resize(vsize * 2 * sizeof(Vector3));<br />
uint<em>pindex1 = &amp;amesh.mIndices[0];<br />
Vector3</em>vertex = &amp;amesh.mVertices[0];<br />
Vector3<em>pnormal = (Vector3</em>)mNormals.data();<br />
Vector3 n;<br />
FindMinMax((QVector3D*)vertex, amesh.mVertices.size());<br />
movetocenterbyOC((QVector3D*)vertex, amesh.mVertices.size(), mcenter);<br />
uint cnt = 0, index1 = 0, count = 0;<br />
Vector3 pt[3] = {};<br />
for (j = 0; j &lt;vsize * 2; )<br />
{<br />
if (j % 6 == 0) {<br />
pt[0] =  vertex[pindex1[cnt&rsqb;&rsqb;;<br />
pt[1] =  vertex[pindex1[cnt+1&rsqb;&rsqb;;<br />
pt[2] =  vertex[pindex1[cnt+2&rsqb;&rsqb;;<br />
CalcNormal(pt, n);<br />
}</p>
<pre><code>	pnormal[j++] = vertex[pindex1[cnt++&rsqb;&rsqb;;
	pnormal[j++] = n;
}
//	m_indexBuffer-&gt;setData(mindexs);
m_NORBuffer-&gt;setData(mNormals);
//m_positionBuffer-&gt;setData(QByteArray::fromRawData((char*)&amp;vertex[0], size)); 
const quint32 elementSize = 3 + 3;
const quint32 stride = elementSize * sizeof(float);
//m_colorBuffer-&gt;setData(colorData);
m_positionAttr-&gt;setName(Qt3DRender::QAttribute::defaultPositionAttributeName());
m_positionAttr-&gt;setVertexBaseType(Qt3DRender::QAttribute::Float);
m_positionAttr-&gt;setDataSize(3);
m_positionAttr-&gt;setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
m_positionAttr-&gt;setBuffer(m_NORBuffer);
m_positionAttr-&gt;setCount(vsize);
m_positionAttr-&gt;setByteStride(stride);
//m_positionAttr-&gt;setProperty();

m_NORAttr-&gt;setName(Qt3DRender::QAttribute::defaultNormalAttributeName());
m_NORAttr-&gt;setVertexBaseType(Qt3DRender::QAttribute::Float);
m_NORAttr-&gt;setDataSize(3);
m_NORAttr-&gt;setAttributeType(Qt3DRender::QAttribute::VertexAttribute);
m_NORAttr-&gt;setBuffer(m_NORBuffer);
m_NORAttr-&gt;setCount(vsize);
m_NORAttr-&gt;setByteOffset(3 * sizeof(float));
m_NORAttr-&gt;setByteStride(stride);


geometry-&gt;addAttribute(m_positionAttr);
geometry-&gt;addAttribute(m_NORAttr);
//  geometry-&gt;addAttribute(m_indexAttr);
geometry-&gt;setParent(m3dentity);
return geometry;
</code></pre>
</li>
</ol>
]]></description><link>https://forum.qt.io/post/426309</link><guid isPermaLink="true">https://forum.qt.io/post/426309</guid><dc:creator><![CDATA[jimfar]]></dc:creator><pubDate>Thu, 16 Nov 2017 06:11:26 GMT</pubDate></item><item><title><![CDATA[Reply to now i found the   CPU usage is very high when using QT3D Comparing with the QT embedded VTK on Wed, 15 Nov 2017 21:48:09 GMT]]></title><description><![CDATA[<p dir="auto">Can you provide sample applications that shows the behaviour of both ?</p>
<p dir="auto">By the way, why not stay with VTK if it does the job you want ?</p>
]]></description><link>https://forum.qt.io/post/426274</link><guid isPermaLink="true">https://forum.qt.io/post/426274</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 15 Nov 2017 21:48:09 GMT</pubDate></item><item><title><![CDATA[Reply to now i found the   CPU usage is very high when using QT3D Comparing with the QT embedded VTK on Wed, 15 Nov 2017 01:29:29 GMT]]></title><description><![CDATA[<p dir="auto">1.yes qt 5.9.0 and also test with 5.9.2 example  and now i found the qt3d has no convenient api for update window like vtk api Render..how to update the QT3DWindows when 3DObject is change (add,delete..ect) 2.the result of  testing  with 5.9.2 example(metarials-cpp)  ,the cpu is increased %24 ..memery used up  166MByte</p>
]]></description><link>https://forum.qt.io/post/426087</link><guid isPermaLink="true">https://forum.qt.io/post/426087</guid><dc:creator><![CDATA[jimfar]]></dc:creator><pubDate>Wed, 15 Nov 2017 01:29:29 GMT</pubDate></item><item><title><![CDATA[Reply to now i found the   CPU usage is very high when using QT3D Comparing with the QT embedded VTK on Tue, 14 Nov 2017 22:44:30 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">You should provide the version of the libraries you are using.</p>
<p dir="auto">In any case, if older than 5.9.2, you should upgrade to it at least. Memory and CPU improvements have been done in Qt3D.</p>
]]></description><link>https://forum.qt.io/post/426079</link><guid isPermaLink="true">https://forum.qt.io/post/426079</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Tue, 14 Nov 2017 22:44:30 GMT</pubDate></item></channel></rss>