Enhancing OOPS, Tuhopuu Updated with python/oops accsess!

The interface, modeling, 3d editing tools, import/export, feature requests, etc

Moderators: jesterKing, stiv

ideasman
Posts: 0
Joined: Tue Feb 25, 2003 2:37 pm

Post by ideasman » Wed Jun 09, 2004 12:19 pm

wavk wrote:
broken wrote:
ideasman wrote:Now I have added curved spline segments its going to be tricky to work out if the users mouse is over it.
(Well I dont know how to at least)
Wavk, where are you? :) Wavk must have figured it out somehow when he made crafter - hopefully he should may be able to shed some light on the subject...

Hi guys! Nice to see people working on this. It's turning out a lot like crafter ;) Just the way I like it.
broken wrote:Wavk, where are you? :)
I'm in Spain :)

To see if a user's mouse is over a connection.... It's not as difficult as you might think it will be. I had to think over it too.

I guess you do know how to detect the mouse over a single line? The curve is basicly a number of lines. So what you have to do is do the same thing for every segment of the curve.

The way I did the line removal in crafter is basicly calculating if the line the user draws intersects with on of the lines in the curve, which is very basic math.

This is a VERY interesting discussion and I've been also thinking about the OOPS window. When I'm back home, I'll join the discussion :)

Have fun,

Wybren
Your right! Just get the segments end do a line intersection (I have used funcs like this for other things) However its a little tricky for this resion.

The spline rendering code user a GL function that creates the segments using an iterating loop-

glMap1f(GL_MAP1_VERTEX_3, 0.0f, (float)segNum, 3, 4,&ctrlPoints[0][0]);

All the spline rendering is done in GL, so one of 2 things have to be done.

Catch the glMap1f call and find out what coords its calling.
Use a function that mimics glMap1f so the coords can be calculated.

The latter is a bit cruddy since the same calculation is being done twice and Id have to include a spline rendering functuion.

How did you go about it wavk?

matt_e
Posts: 410
Joined: Mon Oct 14, 2002 4:32 am
Location: Sydney, Australia
Contact:

Post by matt_e » Wed Jun 09, 2004 12:28 pm

Monkeyboi wrote:I think Blenders OOPS is a tree. There are quite limited possobilities as to which things can be connected together.
As far as the normal datablocks go, yes it sort of resembles a tree (except for when you have shared datablocks), but as soon as you start getting into other relationships like parents, constraints, and so on, the hierarchy gets lost. And if we're going to extend the functionality of the OOPS, it makes sense to include these other relationships - there's not a great advantage to linking a material to an object via the OOPS or via the buttons window, but being able to create complex networks is where a nice visualisation really shines. The way that Softimage works isn't really relevant since we're not talking about visualising Softimage's data structure, we're talking about Blender. IMO, it opens up a lot more possibilities when you start thinking about relationships, things feeding back on themselves (like dupliverts) and things connected to each other in interesting ways (like a texture taking its co-ordinates from an object) rather than a strict top-down hierarchy. This is one of the things I love about Blender, the way you can connect various things together to make something new.

Money_YaY!
Posts: 442
Joined: Wed Oct 23, 2002 2:47 pm

Post by Money_YaY! » Wed Jun 09, 2004 11:42 pm

since you have Tuhopuu access now, will you still report here that you have added a new adjustment to it ?

ideasman
Posts: 0
Joined: Tue Feb 25, 2003 2:37 pm

Post by ideasman » Wed Jun 09, 2004 11:52 pm

Sure, Ill probably only be able to do major updates on the weekends though.

dmao
Posts: 5
Joined: Wed Apr 07, 2004 3:12 am
Location: New Orleans, LA

Post by dmao » Thu Jun 10, 2004 2:15 am

Hi ideasman, great work on the OOPS window! To answer your call for suggestions on page 1 (yes, I'm very late :)), 2 features that are badly needed are find and sort.

Even in modest scenes, there's easily dozens of blocks to sift through- find and sort would go a long way towards organizing the chaos. If it's at all possible, I'd suggest a realtime search, where it starts searching progressively based on what's being typed.

As for a sort feature, a good criteria would be complexity. Meshes with the most vertices, materials with the most textures, etc. would be at the top, with less complex objects coming below. I think a sort on the vertical axis would work well considering the new horizontal layout. Other criteria could be selected with a dropdown menu and include physical size, global position, layer, time created or edited (if that's possible), and of course, alphabetical sort.

Anyways, I'm glad you're working on it- the OOPS window is finally becoming useful! :D

PS, this just came to mind- pressing L to select linked objects like in editmode.

ideasman
Posts: 0
Joined: Tue Feb 25, 2003 2:37 pm

Post by ideasman » Thu Jun 10, 2004 3:56 am

Hi, I have thaught obout find and sirt too.

The find function could work the same as in a text editor.

Just tinkeruing about and tried making oops boxes 80% opacity. I like it- makes Lines visible behind the boxes while keeping ther boxes clear.

Zarf
Posts: 46
Joined: Mon Oct 14, 2002 3:54 am

Post by Zarf » Thu Jun 10, 2004 4:40 am

Monkeyboi wrote:
broken wrote:Secondly, the OOPS is not really a tree - it's more of a network. In a tree structure, there's a clearly definied hierarchy. A is a child of B is a child of C is a child of D, etc. But Blender's datablocks can be linked in all sorts of interesting ways.
I think Blenders OOPS is a tree. There are quite limited possobilities as to which things can be connected together. Even if the possibilities were broader I would still call it a tree. A tree is a group of relationships as you say, where something is the child of something else which in turn is child of something else again. This is exactly how the OOPS works, consider datablocks such as Ipo and Material blocks 'children' of the object blocks and you will see it is a tree. Other applications hirearchy views work like this (Softimage for example) where materials etc. are children linked to (or children of) an object node, just as in Blender.

I would say that blender's oops window more accuratley describes a 'directed graph' (that is 99 percent of the time acyclical as well.) A graph is not really the same thing as a tree, although graphs can have parts that form valid trees...

Even though I don't believe blender explicitly keeps track of things this way internally, some 3d softs do. Regardless you could apply the rules of graph theory to the OOPS window for doing things like sorting blocks and what not.

Cheers,
Zarf

matt_e
Posts: 410
Joined: Mon Oct 14, 2002 4:32 am
Location: Sydney, Australia
Contact:

Post by matt_e » Thu Jun 10, 2004 5:02 am

Hey, that's a much more precise definition - good one. A quick google search brings up all sort of interesting research for automatic visualisation of directed graphs. Looks like some lunchtime reading is in order...

ideasman
Posts: 0
Joined: Tue Feb 25, 2003 2:37 pm

Post by ideasman » Thu Jun 10, 2004 6:46 am

This is interesting, I can see that getting the layout will be tricky but worth investigation.
And discussing for further development.

It might look like we are all talk an no action but I think its worth discussing these things.

Blenders oops can truly rock whith the improved ability to display data, relationships and manage data.

Compare splines with alpha oops boxes? what do ya think?
Image

ilac
Posts: 131
Joined: Mon Oct 14, 2002 8:24 am

Post by ilac » Thu Jun 10, 2004 11:10 am

dmao wrote:this just came to mind- pressing L to select linked objects like in editmode.
Has been there for as long as I remmber. L to go up the links, shift L to go down the links.

Monkeyboi
Posts: 251
Joined: Tue Nov 26, 2002 1:24 pm
Location: Copenhagen, Denmark
Contact:

Post by Monkeyboi » Thu Jun 10, 2004 12:06 pm

broken wrote:but as soon as you start getting into other relationships like parents, constraints, and so on, the hierarchy gets lost. And if we're going to extend the functionality of the OOPS, it makes sense to include these other relationships - there's not a great advantage to linking a material to an object via the OOPS or via the buttons window, but being able to create complex networks is where a nice visualisation really shines.
Yeah that's true. I've changed my mind a bit. I guess it's not a traditional tree, in that you can share data and have constraints that are independant of the hirearchy.


Regarding horisontal vs. vertical splines, couldn't it support both? It could work cleverly like this: When you place two linked datablocks roughly side by side, the spline could be enterpreted horisontally, while if two linked datablocks are placed on roughly top of each other the spline will be enterpreted vertically. The border between vertical and horisontal splines should be at 45 degrees from the center of a datablock. Does this make sense? If not, I can do a mockup.

That way we don't restrain users to have a vertical or horisontal layout in their OOPS.

Money_YaY!
Posts: 442
Joined: Wed Oct 23, 2002 2:47 pm

Post by Money_YaY! » Thu Jun 10, 2004 4:01 pm

Is thee any way to anti alis the lines ? Or make them a few more pixels fatter to ?

jiri
Posts: 0
Joined: Thu May 20, 2004 12:12 pm
Location: Czech Republic

OpenGL display lists

Post by jiri » Thu Jun 10, 2004 4:11 pm

Hi,
I think, your splines curves are really cool, but I think about some optimalisation. Using opengl evaluators is good, but it is neccessary to create spline curve every time, when oops schematic window is redrawn ... you have to recreate splines which wasn't changed too :-(. Using opengl display list could eliminate data transfer and GPU time. :-)

Regards

theeth
Posts: 500
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Post by theeth » Thu Jun 10, 2004 4:15 pm

I making them fatter will not make them less aliased.

As far as anti aliasing them goes, I don't know. It's just calling openGL functions, so unless we rely on GFX card side anti aliasing (which usally smudge up the rest of the interface), it would have to be done by the OOPS drawing code itself. Probably too slow to be worth it. I don't know really, just guessing.

Martin
Life is what happens to you when you're busy making other plans.
- John Lennon

matt_e
Posts: 410
Joined: Mon Oct 14, 2002 4:32 am
Location: Sydney, Australia
Contact:

Post by matt_e » Thu Jun 10, 2004 5:42 pm

theeth wrote:I making them fatter will not make them less aliased.

As far as anti aliasing them goes, I don't know. It's just calling openGL functions, so unless we rely on GFX card side anti aliasing (which usally smudge up the rest of the interface)
You can selectively antialias lines in hardware without using FSAA, using

Code: Select all

glEnable( GL_POLYGON_SMOOTH );
glEnable( GL_BLEND );
or GL_LINE_SMOOTH for just lines. This is used for drawing the little arrows on the buttons and the X on the floating panels. Not all graphics cards support it though - the NVidia card in my PC does, but the ATI in this Powerbook doesn't :(.

Post Reply