<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hey guys,<br>
<br>
Further tweaked the code, patch is available here (for review as
well). Still more a draft than final, trunk-ready code, but I would
avoid spending more time on it before having it reviewed and global
design validated.<br>
<br>
<a class="moz-txt-link-freetext" href="https://codereview.appspot.com/20790043/">https://codereview.appspot.com/20790043/</a><br>
<br>
From that point, we can have two different goals:<br>
I) Simply add import of normals (from FBX and co) as a "frozen" loop
normal layer, which just stays as-is even if you edit the mesh
(probably on a vertex- or loop-based flag, so that someone can
choose to go back to auto-computed ones for some parts of the mesh),
and add some modifiers to get procedural loop normals editing (e.g.
to use other geometry's normals, the "trees" example).<br>
II) Aim to a full support of custom normals.<br>
<br>
I) is relatively easy to do, could be mostly finished and working in
a few weeks. However, it is not fully featured and powerful (you
can't say "I want this normal to point this way"), and support for
geometry deformations and editing would be *very* poor (in other
words, normals computation should happen as late as possible in the
modifier stack).<br>
<br>
II) would allow to do virtually everything with normals. However, it
is much more involved (most likely months of work):<br>
* Have to add loop normals handling in BMesh.<br>
* Will need some UI new stuff (maybe a new Loop select mode, similar
to current vertex/edge/face ones in Edit mode, perhaps even new
editing widgets in viewport, etc.).<br>
* Implies to store custom normals as some kind of diff (in
tspace-like coordinates) format, relative to auto-computed ones.
This would allow to keep meaningful (to some extend!) custom normals
even in heavy geometry changes.<br>
<br>
So I'd really like to get feedback from expert gamedevs, ideally
with example of workflow involving custom normals (the only real one
I found so far is the "tree" one, which is very easy to implement as
a modifier). I need to know whether solution II) (which covers 100%
of the editing needs in this area) is worth the work involved, or if
solution I) (covering maybe 90% of needs) could be enough?<br>
<br>
PS: Don't think I'll make builds, this has proved to be rather
painful and time consuming in the past (Blender uses many libs, hard
to static-link all that together), and building Blender is now very
easy on every OS!<br>
<br>
<div class="moz-cite-prefix">On 24/10/2013 08:59, Simon Broggi
wrote:<br>
</div>
<blockquote
cite="mid:CAKXpPRzxG-bhtB4rJusb3pQ9qzndGdPJS6mzE6DeUUGidXWcQg@mail.gmail.com"
type="cite">
<div dir="ltr">cool.
<div>any chance to get a test build?</div>
<div>cheers, simon</div>
<div class="gmail_extra">
<br>
<br>
<div class="gmail_quote">On Wed, Oct 23, 2013 at 1:42 AM,
Jacob Merrill <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:blueprintrandom1@gmail.com" target="_blank">blueprintrandom1@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">So this is like a automatic smooth unsmooth
setting?
<div><br>
</div>
<div>( you can use edit - Smooth - and -Flat- on
individual faces) or is that different? (having the
option to set a edge as flat or smooth would be
cool....</div>
<div><br>
</div>
<div>does this work with object.hitNormal? etc?</div>
</div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Tue, Oct 22, 2013 at
11:57 AM, Bastien Montagne <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:montagne29@wanadoo.fr"
target="_blank">montagne29@wanadoo.fr</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0
0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">Hi guys,<br>
<br>
I (hopefully) mostly finished first step in loop
normals work. Now, all<br>
objects have the option to enable loop normals
(with an optional angle<br>
threshold above which edges are always sharp).
Once enabled, final<br>
derived meshes (structs representing objects to
draw or render) gets a<br>
normal CD layer for their loops (and a
tessellated version for its<br>
tfaces as well). Those loop normals allow to
represent flat faces and<br>
sharp edges. As a temp UI, I added loop normals
and angle options in the<br>
"Item" panel, "Properties" of the 3DView.<br>
<br>
Code can be checked out from my svn branch,<br>
<a moz-do-not-send="true"
href="https://svn.blender.org/svnroot/bf-blender/branches/vgroup_modifiers"
target="_blank">https://svn.blender.org/svnroot/bf-blender/branches/vgroup_modifiers</a><br>
<br>
These data are used in OpenGL preview (only when
"VBO" option is<br>
enabled, for now, I prefer to modify viewport
code as few as possible<br>
currently!), and for tangent space compute as
well (note that for this<br>
one, I assumed it is only used over final dm,
this may not be always<br>
true, have to check this yet). These are also
the same as exported in<br>
OBJ and FBX.<br>
<br>
Only remaining TODO for this first step is to
export TSpace in FBX (btw,<br>
if someone could provide me one or two simple
ASCII FBX files with<br>
TSpace data, would be nice ;) ) - and of course,
to test!<br>
<br>
I hope the core algo to compute loop (split)
normals is now OK (I fixed<br>
two bugs here recently :/ ), but esp.
tspace/loopnormals combinations<br>
are to be checked carefully (baking)…<br>
<br>
Cheers,<br>
Bastien<br>
_______________________________________________<br>
Bf-gamedev mailing list<br>
<a moz-do-not-send="true"
href="mailto:Bf-gamedev@blender.org"
target="_blank">Bf-gamedev@blender.org</a><br>
<a moz-do-not-send="true"
href="http://lists.blender.org/mailman/listinfo/bf-gamedev"
target="_blank">http://lists.blender.org/mailman/listinfo/bf-gamedev</a><br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<br>
_______________________________________________<br>
Bf-gamedev mailing list<br>
<a moz-do-not-send="true"
href="mailto:Bf-gamedev@blender.org">Bf-gamedev@blender.org</a><br>
<a moz-do-not-send="true"
href="http://lists.blender.org/mailman/listinfo/bf-gamedev"
target="_blank">http://lists.blender.org/mailman/listinfo/bf-gamedev</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Bf-gamedev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Bf-gamedev@blender.org">Bf-gamedev@blender.org</a>
<a class="moz-txt-link-freetext" href="http://lists.blender.org/mailman/listinfo/bf-gamedev">http://lists.blender.org/mailman/listinfo/bf-gamedev</a>
</pre>
</blockquote>
<br>
</body>
</html>