Page 1 of 3

Blender 2.32 (BF) on Unix (Mac OS X 10.3.3)

Posted: Sat Mar 27, 2004 9:22 pm
by JoOngle
Hi guys,

I've just gotten myself a "snobby" Powerbook G4 17" with a
Radeon 9600 mobility card built in. As those of you with mac probably
already know...we need a opengl-compliant platform to make blender
run smoothly. Mac OSX uses quartzextreeme (and I'm a newbie to mac!)

My question is...

WHY on EARTH are Blender's viewports so SLOW on mac?
On my AMD XP 2500+ and an Nvidia Geforce 4280 AND Nvidia FX 5900
it's Blazing madness with at least 900.000 poly's realtime editing

But on the mac platform (both my mac friends stationary G4 800 mhz, Radeon 9000)
and My PowerBook 1.3 Ghz Radeon 9600 portable...it's boggering down to 25.000 polys before it starts to stutter.
66.000 poly's and it's close to impossible to work with..

Why is this?

Please help! I'm kind'a SAD because I bought this overpriced Mac
because I wanted to have "the bliss of total silence in a portable"
and knowing that Blender would run on a mac...I could use this
for WorkShop sessions helping new people to learn Blender for free.

Any help is appreciated.

Thanks
/JoOngle

Posted: Sat Mar 27, 2004 10:08 pm
by Money_YaY!
Simple. It is not optimised for OSX and Cocoa. Is runs well but it does slow down alot faster. You should play with some 3d Math programs made in pure OSX cocoa. They scream with speed. But they are not modeling apps. Like Breve http://www.spiderland.org/breve/ And some neat plugins for itunes.

But this is the truth. Untill there is an influx of OSX coders to help out and build blender better it will simpley stay this way. :(

Anyone want to prove me wrong please do. I want OSX Blender to be faster to.

Posted: Sat Mar 27, 2004 10:52 pm
by JoOngle
Hi there Money_YaY!

Actually...Blender RENDERING itself...is quite fast on PowerPC (could it be optimized!??!)

But I was refering to OpenGL (viewport) speeds. It's TERRIFYINGLY slow compared to 3d-videogames running on eg. my powerbook.

But when it comes to actual rendering..it's only 10-20% slower than my XP 2500 :) not bad for a 1.3 Ghz powerpc if you ask me.

But I suspect there's no use of the OpenGL in Radeon 9600....so
it probably emulates opengl :/ a waste...for sure...

Hope someone will be the knight in shiny armor and fix this. ;(.......

/JoOngle

Posted: Sat Mar 27, 2004 10:54 pm
by jsplifer
Hello,

That is most disappointing to hear?!? Blender works well on my mac, better than on some windows machines I've used so I'm not sure what to tell you cept to hold tight. Chances are high it is the graphics chip. Do what your doing by communicating to the developers.

I have just got a handle on Scons and will have a tutorial up shortly, in the tut I will try and optimize the code for our systems passing cpu related flags to the compiler. Hopefully we get a little more speed from blender. Also I have started a CocoaBlend.xcode, but this project will take a year at least :)

jsplifer

Posted: Sun Mar 28, 2004 12:47 am
by Money_YaY!
jsplifer wrote:Hello,

That is most disappointing to hear?!? Blender works well on my mac, better than on some windows machines I've used so I'm not sure what to tell you cept to hold tight. Chances are high it is the graphics chip. Do what your doing by communicating to the developers.

I have just got a handle on Scons and will have a tutorial up shortly, in the tut I will try and optimize the code for our systems passing cpu related flags to the compiler. Hopefully we get a little more speed from blender. Also I have started a CocoaBlend.xcode, but this project will take a year at least :)

jsplifer

Have you found that Scon bulids are slowerr than basic Make file builds ?

Posted: Sun Mar 28, 2004 9:34 pm
by Michaelv
Optimization on the scons build method is nonexsistant for darwin. I added

extra_flags = ['-pipe', '-fPIC', '-funsigned-char', '-ffast-math', '-mcpu=7450', '-mtune=7450']

, '-ffast-math', '-mcpu=7450', '-mtune=7450' are the additions.

and

release_flags = ['-O3']

to the if sys.platform =='darwin' section and it speeded things up nicely.

To find the correct machine type to add to -mcpu= and -mtune= use machine at the command line:
Last login: Sun Mar 28 09:38:52 on ttyp4
Welcome to Darwin!
[PowerBookG4 10:17:43am michaelv ] ~% machine
ppc7450 you'll get something like this.
Or you can just use the generic -mcpu=powerpc assuming you have a powerpc ;)

For compiling the gameengine I added this to the SConscript file in solid:

elif sys.platform=='linux2' or sys.platform=='linux-i386':
defines += ['NDEBUG']
cflags += ['-O2']
elif sys.platform == 'darwin':
cflags += ['-O3', '-ffast-math', '-mcpu=7450', '-mtune=7450']
This adds the same optimizations to solid as the rest of the code.

Posted: Mon Mar 29, 2004 2:43 am
by Money_YaY!
Michaelv wrote:Optimization on the scons build method is nonexsistant for darwin. I added

extra_flags = ['-pipe', '-fPIC', '-funsigned-char', '-ffast-math', '-mcpu=7450', '-mtune=7450']

, '-ffast-math', '-mcpu=7450', '-mtune=7450' are the additions.

and

release_flags = ['-O3']

to the if sys.platform =='darwin' section and it speeded things up nicely.

To find the correct machine type to add to -mcpu= and -mtune= use machine at the command line:
Last login: Sun Mar 28 09:38:52 on ttyp4
Welcome to Darwin!
[PowerBookG4 10:17:43am michaelv ] ~% machine
ppc7450 you'll get something like this.
Or you can just use the generic -mcpu=powerpc assuming you have a powerpc ;)

For compiling the gameengine I added this to the SConscript file in solid:

elif sys.platform=='linux2' or sys.platform=='linux-i386':
defines += ['NDEBUG']
cflags += ['-O2']
elif sys.platform == 'darwin':
cflags += ['-O3', '-ffast-math', '-mcpu=7450', '-mtune=7450']
This adds the same optimizations to solid as the rest of the code.

I will test this soon.
Is there hope that it will getaddexd to the CVS ?

Posted: Mon Mar 29, 2004 8:52 am
by Michaelv
Money_YaY! wrote:
I will test this soon.
Is there hope that it will getaddexd to the CVS ?
Adding -ffast-math to the SConstruct file for 'darwin' in CVS would be ok but adding -mcpu or -mtune with cpu specific tags doesn't. It shouldn't be to hard to write some python code to add the correct cpu tag automatically though. May be I'll play around with that.

Michael Velikanje

Posted: Mon Mar 29, 2004 9:45 am
by Michel
Michaelv wrote:Optimization on the scons build method is nonexsistant for darwin. I added

extra_flags = ['-pipe', '-fPIC', '-funsigned-char', '-ffast-math', '-mcpu=7450', '-mtune=7450']

, '-ffast-math', '-mcpu=7450', '-mtune=7450' are the additions.

and

release_flags = ['-O3']

to the if sys.platform =='darwin' section and it speeded things up nicely.
Hi,

I set up the SCons system such that it would not be necessary to change anything in the SConstruct at all. All necessary settings should be configurable in the (generated) config.opts file.

Of course, any default optimization that works on all compatible platforms (any MacOS in this case), should be set default in the SConstruct. I'll try to make some time free this evening to communicate with others on irc and commit some changes accordingly.

With regards,
Michel

Posted: Mon Mar 29, 2004 6:26 pm
by kid_tripod
My understanding was that because OS X uses OpenGL for it's windowing operations, you're already somewhat taxing the GPU, and there's the whole graphics memory thing, so if you drop your screen res it would get faster (is this right??). And basically when in Blender hide all other windows.

What I really miss in the OS X version (everything else is top) is the full screen capability. If this could be added so it works in the same mode as games do, then it might improve performance in that mode as well.

Also, Blender's UI is still suboptimal for usage on widescreens, but the panels are helping that.

(Sorry, I'm a recent OS X switcher too).

Posted: Mon Mar 29, 2004 7:14 pm
by Money_YaY!
kid_tripod wrote:My understanding was that because OS X uses OpenGL for it's windowing operations, you're already somewhat taxing the GPU, and there's the whole graphics memory thing, so if you drop your screen res it would get faster (is this right??). And basically when in Blender hide all other windows.

What I really miss in the OS X version (everything else is top) is the full screen capability. If this could be added so it works in the same mode as games do, then it might improve performance in that mode as well.

Also, Blender's UI is still suboptimal for usage on widescreens, but the panels are helping that.

(Sorry, I'm a recent OS X switcher too).
if somebody could add the built in osx kiosk mode that would do what you are asking

Posted: Tue Mar 30, 2004 2:43 am
by cekuhnen
JoOngle

as far as i know the opengl drivers from apple arent as good as on the pc side. that is a long known bottleneck.

it is up to apple to get it clean and faster!

claas

Posted: Thu Apr 01, 2004 7:56 pm
by JoOngle
cekuhnen wrote:JoOngle

as far as i know the opengl drivers from apple arent as good as on the pc side. that is a long known bottleneck.

it is up to apple to get it clean and faster!

claas
While this could be true, it can't possibly justify a 80 % speed reduction.
Example: Quake 3 & unreal tournament 2004 runs just fine on my Radeon 9600 based powerbook and is almost matching the
speed of an equal pc desktop setting....

Weird to me..

I hope someone else with a Mac and a PC could confirm this or that
there are some other compilations out there that I might not know
about. I'm using the BF version 2.32 - Darwin 6.6 compilation (not compiled by me)

*Edit*

I also suspect that some of the other Mac users are not as
heavy on the polygons as I am. I have high demands because I
come from a studio that uses 3dstudio max / Maya and XSI.
Personally I went over to Blender because it was becoming a better
modelling tool (in my opionion -superior- compared to many tools)
so for me..it's a matter of 3-4 hours before I pass the 25 K triangle zone
and on the PC it works just fine...just not the Apple version... :o/

Working fine for someone else might be >25 K ...but not industry
professionals (no Phun or offence intended to anyone!)

/JoOngle

Anyway - a sincere thank you to all the people for paying attention
to this. I really appreciate your concern. I'll gladly cooperate
testing & whatever I can do if someone dares to thread the waters
of mac os x compiling / OpenGL compliance coding.

Posted: Thu Apr 01, 2004 8:14 pm
by cekuhnen
mh

basicly the code is the same.
but i know that apples opengl sucks.
trust me we dev for apple.

can you send me an example file?

claas

Posted: Thu Apr 01, 2004 9:22 pm
by JoOngle
cekuhnen wrote:mh

basicly the code is the same.
but i know that apples opengl sucks.
trust me we dev for apple.

can you send me an example file?

claas
Do you really need an example file? All you have to do is
to clone a bunch of high-poly spheres and watch the information-bar
at the top (top menu) and it will display the total number of faces used.

When you reach 25-40 K...it will become bothersome to work with
(not smooth anymore)...When you reach 60-80K It will become
near impossible to work with.


Cekuhnen - I don't doubt for a second that you're right about
Apple's openGL work, but isn't that partially to blame the fact
that they use OpenGL to display & "expose" windows?

A full-screen operation in Blender would probably solve this issue, no?