Adaptive Subdivision development

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
Kai Kostack
Posts: 0
Joined: Tue Feb 07, 2006 5:24 pm

Adaptive Subdivision development

Post by Kai Kostack »

i've decided to create a thread where i'm going to post my questions any time i'm stuck with the development. since this is my first attempt to implement something directly into the blender source, it's hard for me to understand all the internal connections and structures, basically how everything works together.

at the moment i've ported all the code from the script (http://blenderartists.org/forum/showthread.php?t=119216) into c code and integrated it into a modifier structure. but it's of course not working how a modifier should work, since it's a direct port of the script which worked directly on the mesh.

so the first question: is there some documentation, an overview or schemes how a modifier work? what needs it and what should it return?

at the moment i'm using the esubdivideflag() function to create the subdivisions. apparently it is using the editmode. is it allowed to use editmode in a modifier at all? how can i return the editmode data as regular modifier data so that the next modifier can use it?

and last but not least, would it be useful to ask for an own branch so that people can have a look at what i'm talking about, the code?

thanks in advance,
kai
Last edited by Kai Kostack on Fri Apr 04, 2008 6:00 am, edited 1 time in total.

handydan
Posts: 0
Joined: Mon Nov 19, 2007 4:40 pm

Post by handydan »

modifiers -> http://wiki.blender.org/index.php/Blend ... ementation

no idea about subdivisions, maybe see how the subsurf modifier does it.

LetterRip
Posts: 0
Joined: Thu Mar 25, 2004 7:03 am

Post by LetterRip »

Kai,

you might want to email bf-commiters as regards a branch.

LetterRip

Kai Kostack
Posts: 0
Joined: Tue Feb 07, 2006 5:24 pm

Post by Kai Kostack »

oh, thank you guys.

especially for the documentation link, it describes derivedmesh and the modifier api. that's what i was searching for. :)

Kai Kostack
Posts: 0
Joined: Tue Feb 07, 2006 5:24 pm

Post by Kai Kostack »

i have some problems to determine from the modifier code what full(!) frame currently is being processed. G.scene->r.cfra is useless because i can't distinguish if it's really the next frame or only the next frame vectors which are being calculated.

it goes like this:

frame 1 - cfra 1
frame 1 - cfra 2 (next frame vectors)
frame 2 - cfra 2
frame 2 - cfra 1 (previous vectors)
frame 2 - cfra 3 (next frame vectors)
frame 3 - cfra 3
frame 3 - cfra 2 (previous vectors)
frame 3 - cfra 4 (next frame vectors)

and i need frame and not cfra.

in convertblender.c are some vars i could use but i don't know how to access them best, for instance int step from RE_Database_FromScene_Vectors().

any ideas how i could solve this problem?

Post Reply