tag:blogger.com,1999:blog-1023441640234597436.post1765281081707323748..comments2023-09-22T13:25:07.113-04:00Comments on Graphics Runner: Volume Rendering 201: OptimizationsKyle Haywardhttp://www.blogger.com/profile/00654406875137720609noreply@blogger.comBlogger15125tag:blogger.com,1999:blog-1023441640234597436.post-65185280424043135602010-10-14T16:30:55.358-04:002010-10-14T16:30:55.358-04:00Sure, that would be fine.Sure, that would be fine.Kyle Haywardhttps://www.blogger.com/profile/00654406875137720609noreply@blogger.comtag:blogger.com,1999:blog-1023441640234597436.post-20352754192411656862010-10-14T08:55:34.960-04:002010-10-14T08:55:34.960-04:00Greetings,
I have a message for the webmaster/a...Greetings,<br /> <br /> I have a message for the webmaster/admin here at graphicsrunner.blogspot.com.<br /><br />Can I use part of the information from this blog post above if I provide a link back to your site?<br /><br />Thanks,<br />JohnAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1023441640234597436.post-21537068084324457802009-03-14T16:50:00.000-04:002009-03-14T16:50:00.000-04:00Thanks for that. I linked to a couple of pages wit...Thanks for that. I linked to a couple of pages with datasets on them (on the first post I believe). You should be able to find a power of 2 dataset from one of the pages.<BR/><BR/>I'll make a note of it in the post.Kyle Haywardhttps://www.blogger.com/profile/00654406875137720609noreply@blogger.comtag:blogger.com,1999:blog-1023441640234597436.post-32061282247954691042009-03-13T14:39:00.000-04:002009-03-13T14:39:00.000-04:00I'm using an ATI Radeon X1300PRO. Getting "Device...I'm using an ATI Radeon X1300PRO. Getting "Device does not support texture width and height values that are not powers of 2." when creating new Texture3D. Obviously the issue is the 128x128x62, 62 is not a power of 2. I can probably hack something to make it work, but might be nice to include a check for this issue.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1023441640234597436.post-58427465092137976652009-03-08T00:18:00.000-05:002009-03-08T00:18:00.000-05:00You need to have a Shader Model 3.0 graphics card ...You need to have a Shader Model 3.0 graphics card in order to run the sample. Also make sure that the dataset files are in the right folder (bin/x86/debug/models).<BR/><BR/>When the application breaks, what line in what file is it breaking at? And are there any null objects that are being referenced?Kyle Haywardhttps://www.blogger.com/profile/00654406875137720609noreply@blogger.comtag:blogger.com,1999:blog-1023441640234597436.post-68053279754916793432009-03-07T18:01:00.000-05:002009-03-07T18:01:00.000-05:00I would like to start the App, but I only get an U...I would like to start the App, but I only get an Unhandled Exception..<BR/><BR/>ProcessID 0x474, ThreadID 0xf20<BR/><BR/>I have no idea if I missed to install something..Spacerathttps://www.blogger.com/profile/01007372171107150216noreply@blogger.comtag:blogger.com,1999:blog-1023441640234597436.post-53018811174138256332009-02-25T01:28:00.000-05:002009-02-25T01:28:00.000-05:00From my understanding, half-angle slicing shadowin...From my understanding, half-angle slicing shadowing isn't possible with volume ray-casting since we can't switch between shadow or color buffers b/t each slice. And deep shadow maps are still to slow for real-time use.<BR/><BR/>So I take the easy way out and just use simple variance shadow mapping which achieves pretty good results. I also use a similar method to approximate translucency.Kyle Haywardhttps://www.blogger.com/profile/00654406875137720609noreply@blogger.comtag:blogger.com,1999:blog-1023441640234597436.post-91021164741685419742009-02-24T23:17:00.000-05:002009-02-24T23:17:00.000-05:00Hi Kyle, Bingo.... that did the trick. Here is th...Hi Kyle,<BR/> Bingo.... that did the trick. <A HREF="http://www.geocities.com/mobeen211/Teddy.PNG" REL="nofollow">Here</A> is the final rendering.<BR/><BR/>Thanks for appreciating the vdos, its just part of the work that i am currently doing. I have already converted the optimization demo to opengl and cg. The shader is exactly the same. The only thing changed is the handling of FBO and some opengl bits and pieces. <BR/><BR/>For the next series, would u be using half angle slicing or using deep shadow maps? anyways i cant wait to see it though :)<BR/> <BR/>Thanks once again for the wonderful details.<BR/><BR/>Regards,<BR/>MobeenMMMovaniahttps://www.blogger.com/profile/02716826252349695343noreply@blogger.comtag:blogger.com,1999:blog-1023441640234597436.post-46621372018108538642009-02-24T16:21:00.000-05:002009-02-24T16:21:00.000-05:00Hi Mobeen,I think this may be a problem with using...Hi Mobeen,<BR/><BR/>I think this may be a problem with using the rasterization approach to update the position buffers. I ran into the same problem when I used the ESL sub volumes to update the buffers.<BR/><BR/>There shouldn't be a problem if you still use the original bounding cube to update the position buffers. And then, in the shader, instead of using the front texture to get the starting position, you can simply use the 3d texture coordinates.<BR/><BR/>This "fix" isn't technically correct as you could end up sampling empty areas since the back texture will be the back of the entire volume and not the subvolumes.<BR/><BR/>Hope that helps.<BR/>Edit: Cool videos on your blog by the way :)<BR/><BR/>Next installment:<BR/>I already have the shadow and translucent samples done, but in the next installment I might switch from using the rasterization approach to actually intersecting the subvolumes with a ray to find the sampling start and end positions in the vertex shader.Kyle Haywardhttps://www.blogger.com/profile/00654406875137720609noreply@blogger.comtag:blogger.com,1999:blog-1023441640234597436.post-35448928878377339872009-02-24T08:56:00.000-05:002009-02-24T08:56:00.000-05:00Hi Kyle, First up thanks for this wonderful tutor...Hi Kyle,<BR/> First up thanks for this wonderful tutorial series. I am enjoying every bit of it. I have a problem though. <BR/>I m using opengl and Cg for shaders. I have converted the solution the only thing that is wrong for my case is that I get borders of the boxes in my rendering see this image<BR/>http://www.geocities.com/mobeen211/Teddy.PNG<BR/>Do u know what may be causing this? Note that my surface format is RGBA16 exactly as your and the shader is the same as yours.<BR/><BR/>Thanks<BR/>MobeenMMMovaniahttps://www.blogger.com/profile/02716826252349695343noreply@blogger.comtag:blogger.com,1999:blog-1023441640234597436.post-60613120332144056302009-02-10T11:43:00.000-05:002009-02-10T11:43:00.000-05:00My bad. I read about your overdraw concerns, but ...My bad. I read about your overdraw concerns, but did not associate that with slower framerates. I just didn't think it through...for some reason, my mind jumped straight to MIP type things.<BR/><BR/>I'll have to think about the sorting of the blocks ;)<BR/><BR/>ThanksDarrenhttps://www.blogger.com/profile/05871724586492802680noreply@blogger.comtag:blogger.com,1999:blog-1023441640234597436.post-33447220566028081902009-02-09T21:39:00.000-05:002009-02-09T21:39:00.000-05:00Pretty much. I note at the end of the tutorial tha...Pretty much. I note at the end of the tutorial that this is because of overdraw problems. When looking at the back of the bear, the front volume are getting drawn first, then continue to the back volumes. As the volumes go towards the back of the bear they overwrite the results from the previous volume.<BR/><BR/>The volumes need to be sorted front to back based on distance to the camera. And this should resolve the problem.Kyle Haywardhttps://www.blogger.com/profile/00654406875137720609noreply@blogger.comtag:blogger.com,1999:blog-1023441640234597436.post-75244093970510163472009-02-09T20:42:00.000-05:002009-02-09T20:42:00.000-05:00That took care of it...I had the April 2007 versio...That took care of it...I had the April 2007 version.<BR/><BR/>So, I ran the application in debug, and had some interesting results. With the bear facing forward I am getting framerates of around 200. Rotating the bear, however, to look at the back, the framerate drops to about 27. Is this what you would expect?Darrenhttps://www.blogger.com/profile/05871724586492802680noreply@blogger.comtag:blogger.com,1999:blog-1023441640234597436.post-79279970669768753332009-02-09T19:38:00.000-05:002009-02-09T19:38:00.000-05:00I had this problem with older versions of the Dire...I had this problem with older versions of the DirectX SDK. It seems the fxc compiler is returning an error code even when there are just warnings.<BR/><BR/>To fix this you can update to the latest DirectX SDK (November 2008, this is what I'm using).<BR/><BR/>Or you can go into the WindowsEffectCompiler.cs file and replace this line:<BR/><BR/>if (p.ExitCode != 0 || text.Contains("error"))<BR/><BR/>with this:<BR/><BR/>if (text.Contains("error"))Kyle Haywardhttps://www.blogger.com/profile/00654406875137720609noreply@blogger.comtag:blogger.com,1999:blog-1023441640234597436.post-66597691213709017492009-02-09T18:32:00.000-05:002009-02-09T18:32:00.000-05:00Hey Kyle,I finally got around to downloading the X...Hey Kyle,<BR/><BR/>I finally got around to downloading the XNA framework so that I could build your projects but then I ran into a snag. While I am a C# developer at work, all of my graphics work at home is in C++/OpenGL and Cg. So, I have a feeling my problem is a lack of knowledge with this environment, in particular, the shaders.<BR/><BR/>So, when I try to build the project, I get:<BR/><BR/>Error 2 C:\Documents and Settings\KMan\Desktop\VolumeRayCasting_201\VolumeRayCasting\Content\Shaders\RayCasting.fx(207,12): warning X4121: gradient-based operations must be moved out of flow control to prevent divergence. Performance may improve by using a non-gradient operation<BR/>C:\Documents and Settings\KMan\Desktop\VolumeRayCasting_201\VolumeRayCasting\Content\Shaders\RayCasting.fx(169,15): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them<BR/>C:\Documents and Settings\KMan\Desktop\VolumeRayCasting_201\VolumeRayCasting\Content\Shaders\RayCasting.fx(139,12): warning X4121: gradient-based operations must be moved out of flow control to prevent divergence. Performance may improve by using a non-gradient operation<BR/><BR/>Actually, tons of the same warning. Now, I realize that these warnings are coming from the RayCasting_fxc.err file, especially since it contains your path.<BR/><BR/>When I empty out the file and re-compile, I get:<BR/>Warning 1 Exit code: 1 C:\Users\dbrust\Desktop\VolumeRayCasting_201\VolumeRayCasting\Content\Shaders\RayCasting.fx VolumeRayCasting<BR/><BR/><BR/>Now, I know this must all work correctly because you are using it, but I am not quite sure how to tackle this problem. Am I missing something in my environment?<BR/><BR/>Thanks in advance,<BR/>DarrenDarrenhttps://www.blogger.com/profile/05871724586492802680noreply@blogger.com