sidebar features
sidebar content

Go Back   Blender Artists Forums > General Forums > News & Discussion

Reply
 
Thread Tools
_Ph_'s Avatar
_Ph_ _Ph_ is offline
Member
 
Join Date: Jan 2004
Location: France
Posts: 48
Quote:
Originally Posted by spixy View Post
Hello all!

I use Blender 2.45 (on Ubuntu 8.04 AMD64), and when I run quantitiesbill.py on the standard cube I get the following console message:


Quantity Bill Script
--------------------
Processing Cube ...
closed


Is the script obsolete with this version of Blender? Or am I running it incorrectly?
Just look in Text window.
_ph_
#41   Old 26-Jul-08, 13:29   
Reply With Quote


spixy spixy is offline
Member
 
Join Date: Jul 2008
Posts: 7
thank you.

To look in the text window is, however, not sufficient, I have to select the result of the script with the browser to make it appear in the text window.

Volume calculations for default mesh objects, such as cubes or spheres, seem to work very well. But I would like to know the volume of a closed trumpet shaped mesh, and for some reason the script calculates its area; not its volume.

How come? Is there a parameter I should change depending on type of mesh?

Last edited by spixy; 27-Jul-08 at 13:45. Reason: grammar and addition
#42   Old 27-Jul-08, 13:20   
Reply With Quote
spixy spixy is offline
Member
 
Join Date: Jul 2008
Posts: 7
aha! ..got it .. just had to change "COMPUTEMANIFOLD" from 0 to 1, save the script and run it again.
#43   Old 27-Jul-08, 14:02   
Reply With Quote
3DGURU's Avatar
3DGURU 3DGURU is offline
Member
 
Join Date: Jun 2005
Location: Middle East / Jordan
Posts: 3,940
i can think of it another way , make beams that project like this on the surface , and calculate the distance of each beam , then the volume can be calculated , you can make scrolling beam ring instead of multi and it takes the read each desired time !!! ...

as in the image , PS , you know it's Realtime in the game engine


http://picasaweb.google.com/3denator...04454971165282
, tell me if you want the blend ...

bye .
............................................
NoobsNetwork [site launch within a week]
#44   Old 27-Jul-08, 14:41   
Reply With Quote
DSG2k DSG2k is offline
Member
 
Join Date: Feb 2010
Posts: 4
Quote:
Originally Posted by Nyrath View Post
GreyBeard, thank you so much! I had been looking for something like this for years.

You see, there is a script like this for Lightwave:
http://mywebpages.comcast.net/erniew...f/areavol.html

There are science fiction fans in general, and Star Trek fans in particular, who obsess over such pointless issues as what is the internal volume of the starship Enterprise. Since the ships are seldom simple Euclidean shapes, this is not easy.

A fan was using the Lightwave script to determine the volume of various trek ships.
http://www.st-v-sw.net/STSWvolumetrics.html

I had wanted something similar for Blender, and now I have it.
Thanks again!
Dude, you should've left me feedback at ST-v-SW.Net to let me know about Blender and volume calculation. I had no idea there was rendering freeware beyond the old DOS-era POV-Ray until I found Google SketchUp. (I only recently learned that Trek models were available on SketchUp, which is why the Volumetrics page has been updated (there's an easy SketchUp volume plugin).)

I only found Blender because I was desperately trying to get .lwo files into SketchUp.

I find Blender quite daunting compared to how I was able to pick up SketchUp without reading a manual, but nonetheless I'm intrigued. My first attempt at running the last script on this thread, though, produced no obvious result.

In short, what does "select the result of the script with the browser" mean in more basic steps? I'm sure that's a super-noob question, but considering all I'm trying to do is rescale ships if needed and calculate their volumes, the rather unique UI of Blender is something I can only wish I had time to fully learn.

Thanks, and sorry for the thread necromancy!
#45   Old 23-Feb-10, 04:20   
Reply With Quote
mandoragon mandoragon is offline
Member
 
Join Date: Feb 2006
Posts: 1,042
meh this is an interesting find anyway and a script that should maybe be resurrected for 2.5
#46   Old 23-Feb-10, 08:57   
Reply With Quote
Nyrath's Avatar
Nyrath Nyrath is offline
Member
 
Join Date: May 2005
Location: the praeternatural tower
Posts: 939
Quote:
Originally Posted by DSG2k View Post
Dude, you should've left me feedback at ST-v-SW.Net to let me know about Blender and volume calculation. I had no idea there was rendering freeware beyond the old DOS-era POV-Ray until I found Google SketchUp. (I only recently learned that Trek models were available on SketchUp, which is why the Volumetrics page has been updated (there's an easy SketchUp volume plugin).)

I only found Blender because I was desperately trying to get .lwo files into SketchUp.

I find Blender quite daunting compared to how I was able to pick up SketchUp without reading a manual, but nonetheless I'm intrigued. My first attempt at running the last script on this thread, though, produced no obvious result.

In short, what does "select the result of the script with the browser" mean in more basic steps? I'm sure that's a super-noob question, but considering all I'm trying to do is rescale ships if needed and calculate their volumes, the rather unique UI of Blender is something I can only wish I had time to fully learn.
It can be tricky.

Right click on this link and download the file to your computer
http://hiower.orgfree.com/quantitiesbill.py

Copy quantitiesbill.py into your Blender script folder. In Windows XP it will be something like C:\Documents and Settings\your.name\Application Data\Blender Foundation\Blender\.blender\scripts , in Vista or Windows 7 it will be something like C:\Users\your.name\Application Data\Blender Foundation\Blender\.blender\scripts

Run Blender. Right-click on the cube in the center to select it. At the bottom of the window with the cube, click on the OBJECT menu and select Scripts then over to select Quantities Bill.

Nothing seems to happen, but it has. If you go to the Task Bar and select the Blender Python Window, it will say: Quantity Bill Script, Processing Cube ..., Closed.

From the Task Bar, go back to Blender. Pick a 3D window, from the bottom of the window click on the grid icon button at the extreme left, and select Text Editor. A blank screen will appear. In the middle, where it says TX:Text, click the up/down arrows and select Quantity Bill.csv. You should see a report about the cube, ending with Cube 8.00m^3 (volume). Pretty nice, eh? This file can be saved for later use (that bit about opening in a browser is because he saved it as a *.csv file, not a *.txt file)

Now, the script has some restrictions.

Before using the script, apply Size and Rotation to all objects by using CTRL-A

A mesh that is "open" will have just its area calculated, not its volume. A mesh with no faces, only edges, with have the sum of the edges computed and be listed under LENGTH.

It will refuse to calculate the volume of any "non-manifold" mesh (both of these settings can be changed if you are brave enough to edit QuantitiesBill.py). A non-manifold mesh is one where there exists at least one edge that has more than two faces attached (there is a way in Blender to select non-manifold edges so you can eliminate them)

It only calculates the objects that you have selected. Each mesh can only have one material, multi-material meshes will not be calculated. A given object that is composed of separate parts will not have its volume calculated correctly.
............................................
Nyrath's Portfolio | Guide to Atomic Rockets | 3D Star Maps | @nyrath
#47   Old 02-Mar-10, 17:57   
Reply With Quote
DSG2k DSG2k is offline
Member
 
Join Date: Feb 2010
Posts: 4
Thank you very much. There are some (presumably version-related) issues, though:

1. There is no TX:Text . . . I'm running 2.49b and it seems to just be a goofy little icon with an up and down arrow. Hovering, it calls itself "Browses existing choices or adds NEW". The .csv is in there.

2. With my setup (installed latest versions just last week), the script failed out based on non-ASCII character(s) on line 204.

It directed me to the Python website, where I basically learned that I had to tell it what character set to use. So, I added this to the first two lines in the .py file:

#!/usr/bin/python
# -*- coding: iso-8859-1 -*-

It didn't explode, and thus I presume it worked. 8m^3, it says.

Awesome. Thank you.

3. However, I'm a long way from being able to do anything useful with it. Blender's lack of a standards-compliant interface, mixed with limited time on my part, is a killer. I've played around a little, but I have yet to find "undo" for instance, and god forbid I want to scale anything. And the thought of having to modify a model to make volume calculation work better is a nightmare scenario.

Eventually I'll go look at some tutorials, but for right now Blender remains a means to an end (i.e. an overly powerful converter from .lwo to .3ds for SketchUp import).
#48   Old 03-Mar-10, 17:19   
Reply With Quote
Nyrath's Avatar
Nyrath Nyrath is offline
Member
 
Join Date: May 2005
Location: the praeternatural tower
Posts: 939
1. Sorry about that. But you did manage to find the .csv file
2. Ah, yes, the non-ASCII problem. But you did manage to find the correct fix.
3. Yes, Blender can be difficult to learn. Typically, new users spend five to ten days feeling like they are pounding their heads against the wall. Then suddenly everything is easy. (took me six days).

I did find another "gotcha". If the object has an Edge Modifier set, it will confuse the script into thinking that the mesh is open when it is actually closed. Remove the modifier before running the script.
............................................
Nyrath's Portfolio | Guide to Atomic Rockets | 3D Star Maps | @nyrath
#49   Old 03-Mar-10, 17:32   
Reply With Quote
DSG2k DSG2k is offline
Member
 
Join Date: Feb 2010
Posts: 4
My source of fun at the moment is that Blender can no longer seem to find the .py even though it's sitting there staring at it in the directory. Gotta love it.

As far as the UI, I'm just a passing hobbyist who just wants to look at models and calculate volumes and maybe move them side-by-side to look at them like the to-scale toys they never made. As such, I'm just a passer-by, and so I may have to wait for something like the "De-weird-ifier" that someone made for the GiMP to be less goofy in Windows. Put simply, there's just no point subjecting myself to their issue.
#50   Old 03-Mar-10, 18:08   
Reply With Quote
Nyrath's Avatar
Nyrath Nyrath is offline
Member
 
Join Date: May 2005
Location: the praeternatural tower
Posts: 939
I also discovered that the script tends to give a volume of -0 m^3 if you have bad normals. For each object in edit mode, select all the faces and recalculate normals outside.
............................................
Nyrath's Portfolio | Guide to Atomic Rockets | 3D Star Maps | @nyrath
#51   Old 04-Mar-10, 02:45   
Reply With Quote
Nyrath's Avatar
Nyrath Nyrath is offline
Member
 
Join Date: May 2005
Location: the praeternatural tower
Posts: 939
Quote:
Originally Posted by DSG2k View Post
My source of fun at the moment is that Blender can no longer seem to find the .py even though it's sitting there staring at it in the directory. Gotta love it.
OK, I had the same problem. I think I fixed it. At the top of the QuantitiesBill.py file it should say:

Code:
#!BPY # -*- coding: iso-8859-1 -*-
NOT
Code:
# -*- coding: iso-8859-1 -*- #!BPY
............................................
Nyrath's Portfolio | Guide to Atomic Rockets | 3D Star Maps | @nyrath
#52   Old 04-Mar-10, 03:16   
Reply With Quote
DSG2k DSG2k is offline
Member
 
Join Date: Feb 2010
Posts: 4
Incidentally, my Blender scripts are at:

(drive):\Program Files\Blender Foundation\Blender\.blender\scripts

. . . as opposed to in any user-specific folder.

Just in case someone else can't find the scripts folder under Documents and Settings or under their User folder in Vista/7.
#53   Old 12-Mar-10, 22:37   
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT. The time now is 23:02.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Logo and website design copyright © 2006 by froodee design bureau. All rights reserved.
Other Blender Sites
new icon Blender Homepage »
The official Blender homepage
new icon BlenderNation »
Fresh Blender News, Every Day
new icon Blenderart Magazine »
Blender articles, tutorials and images.
Blender Headlines
Featured Artwork
Short animation: Barrel by Phlopper
Woolly mammoth by sebastian_k
Photorealistic classic furniture by eMirage
Social BlenderArtists