LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3d picture control

From Jonathan Meyer at NI:
 
The NI Labs examples are about to go live.  I hope they should be available some time this week.  Regarding your problem, without knowing exactly what you are trying to accomplish I believe what you want to do is to create a mesh that has the shape of the volume you are attempting to render, and then you have to apply the texture on to it using the mesh's texture coordinates.  The main snag here, is that if you have a single mesh that has "multiple" textures on it, then you actually must use a single image that contains all of the textures you wish to apply to the mesh, which further implies you must know the coordinates of each texture within the image.  The other solution is to have  your volume composed of several meshes, which would allow you to more easily apply a texture to it, as the coordinates are more straightforward.  

To achieve transparency one thing you need to make sure you have is blending turned on, which is a property on the 'Scene Object' (Blending.Mode).  Unfortunately, one current misgiving to the way transparency works is that if you intend to be able to rotate around your transparent object and still keep the transparency of the object, you will have to jump through a couple of hoops.  Basically you have to create the object  you want to be transparent twice, and then cull the front face of one, and cull the back face of the other, and then place each object in the transparent blending bin.  Culling is done through the 'DrawStyle' property of the SceneObject, and the blending bin is located under 'Blending' on the SceneObject.  To actually apply trasparency to the object, you must give the color of the object you are making transparent an alpha value less than 1.
Message 11 of 39
(3,721 Views)
Hi Don,
 
You already know how to use the 3d graph. It is possible to define the color associated with each point. So before you jump through all of those hops outlined for the 3d picture, you may want to try mapping your colors to you shapes in the 3d graph.
 
One way or another, I'd be interested in seeing your results.
 
So feel free to post an image that we can admire. Smiley Wink
 
Example code would be nice too!
 
Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 12 of 39
(3,715 Views)
It will be awhile - don't hold your breath.....Don
0 Kudos
Message 13 of 39
(3,713 Views)

That's fine I plan on sticking arounf for another 3-4000 posts.

This is what casting a flat jpg to an iregular surface looks like.

The waviness of the surface is due to the spline fit I was using.

The blur on the mountain sides is due to a top view being aplied to the sides.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 39
(3,704 Views)

That is beautiful....Is that on the 3D surface graph or 3D picture control?  Hey, is that where Bin Laden (or Kordell Stewart) is hidden?

 

Don

0 Kudos
Message 15 of 39
(3,700 Views)

Thanks Don.

Its a 3d graph were I read a jpg and use the pixel of the jpg to dictate the color of the point.

The code is very messy "sand-box" code.

I posted all of the code plus the jpg in the thread that Ravens Fan linked in earlier.

ALL yo have to do is supply you own jpg and modify the "frame-work" of the surface.

The code is attached in a zip called "as70.zip"

If you use that code, I still want to see your results!

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 16 of 39
(3,697 Views)

Hi Don,

How did you end up addressing your challenge?

Raven Fan,

"Are you ready for some football?"

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 17 of 39
(3,666 Views)

Hi Ben:

 

Should be a great game tonite.  As a Clevelander and MAJOR Browns fan, I have never, however, been a Steelers hater.  The Steelers 70s teams were great and Terry Bradshaw was one of my all-time favorite players.  That may be blasphemy around here but it is true.  However, I can't even begin to tell you how much I can't stand the Ravens after the Browns moved and became the Ravens.  Therefore, tonite I root for the Steelers.  And of course next week I go crazy for the Browns.

I am stuck on numerous other issues here and the visualization issue I have discussed here is a side issue of lower priority at the moment. I do promise to let you folks know how it turns out when I finally get to it.

Chris Meyer did end up posting some example code on NILabs if you want to download.

 

Sincerely,

 

Don

Message 18 of 39
(3,662 Views)

Don wrote "However, I can't even begin to tell you how much I can't stand the Ravens after the Browns moved and became the Ravens.  "

That I understand.

Now for a short Cleveleand vs Pittsburgh story.

Back in the day of "DEC" I used to cover for the local DEC Mainframe Engineers over the week-end when they were attending their anual awards banquet.

One of these week-ends Pittsburgh was in Cleveland for a game. Of course someone logs a call a half hour before the game started.

So as I am desperately attempting to navigate to the site I noticed quite a few people giving me the one finger salute. It actually took me a couple of hours to realize that it had nothing to do with my driving.

I'll watch for your later update on your final solution.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 19 of 39
(3,658 Views)

Hello Ben - I followed some of your old posts

 

(http://forums.ni.com/ni/board/message?board.id=170&thread.id=210821&view=by_date_ascending&page=1)

 

and used the 3d surface graph for volume rendering of Xray CT data.  As you stated it is very slow with the FP open.  I have to believe that the 3d picture control, if we can figure out how to use it, will be faster.  I will be looking into this in the next month or so I hope.

 

Attached is an example with 10 frames of cropped data.  I did not try the NaN for 0..~10 data replacement yet to see how speed will change.

 

 

 

 

Sincerely,

 

Don

 

 

Message Edited by DonRoth on 03-23-2009 03:26 PM
Message 20 of 39
(3,278 Views)