A couple of questions about SDK 3.0.21

Discussion for users of the Indigo Renderer SDK.
User avatar
subpixel
Developer
Posts: 237
Joined: Sun Mar 28, 2010 9:09 am

A couple of questions about SDK 3.0.21

Post by subpixel » Tue Oct 25, 2011 10:46 pm

Hello to all,

I'm having some doubts and I hate to bother Nick alone. Here it is.
  • What is the purpose of rotation attribute on model, when there's AngleAxis
    specified in keyframe data (omitting it will however crash indigo) ?
  • Are multiple normals per vertex supported (I mean smoothing groups or
    hard creases) ?
  • Is it possible to subdivide a mesh view-independently with arbitrary
    number of iterations ?
  • Is it safe to skip naming objects (with setName method) ?
  • Why is emission_scales or ies_profiles defined as Vector (how might
    other values be used) ?
Excuse my ignorance and I'd be most grateful for information.
Thanks a lot,

User avatar
suvakas
3rd Place Winner
Posts: 2613
Joined: Mon Sep 04, 2006 11:08 pm
Location: Estonia
Contact:

Re: A couple of questions about SDK 3.0.21

Post by suvakas » Tue Oct 25, 2011 11:31 pm

Hey Sub,
Just out of curiosity, are you the person who starts making the new Max integration?

Suv

User avatar
subpixel
Developer
Posts: 237
Joined: Sun Mar 28, 2010 9:09 am

Re: A couple of questions about SDK 3.0.21

Post by subpixel » Wed Oct 26, 2011 12:12 am

Hi Suv,

Well, I'm a person who is working on Indigo integration with MAX from VFX point of view. You might ask Nick about details.
Anyway, could you answer any of my questions?

Thanks in advance,

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: A couple of questions about SDK 3.0.21

Post by fused » Wed Oct 26, 2011 1:30 am

subpixel wrote:Hello to all,

I'm having some doubts and I hate to bother Nick alone. Here it is.
Hi subpixel,
subpixel wrote:What is the purpose of rotation attribute on model, when there's AngleAxis
specified in keyframe data (omitting it will however crash indigo) ?
The purpose of the rotation matrix (which is a misnomer), is that it can also have scaling, which keyframes currently do not allow.

The thing about having to have at least one keyframe it that it the objects position is read from the first keyframe, even if you don't use motion blur.

If you are not using motion blur and are using the rotation matrix for rotation and scaling, the keyframes Axis angle should be the identity, the time should be 0:

Code: Select all

model->keyframes.push_back(KeyFrame(0.0, parseIndigoVec3(elem, "pos"), AxisAngle::identity()));
If you want to use the AxisAngle for rotation instead, you can also do that and use the rotation matrix for scaling only.

Also, it shouldn't crash, it should give an error instead - putting it on the todo list.
subpixel wrote:Are multiple normals per vertex supported (I mean smoothing groups or
hard creases) ?
Yes. The way to do it with the IndigoMesh is to have multiple vertex/normal pairs for the vertex with differing normals.
I can send you some code from Cindigo that exports meshes that way, if you like.
subpixel wrote:Is it possible to subdivide a mesh view-independently with arbitrary
number of iterations ?
Yes, you can just set view_dependent to "false" and then just set the number of subdivisions.
subpixel wrote:Is it safe to skip naming objects (with setName method) ?
Yes.
subpixel wrote:Why is emission_scales or ies_profiles defined as Vector (how might
other values be used) ?
emission_scale and ies_profiles are for material/object pairs. You can have different ies and scaling for each material on the object.

Hope this helps,
Yves

User avatar
subpixel
Developer
Posts: 237
Joined: Sun Mar 28, 2010 9:09 am

Re: A couple of questions about SDK 3.0.21

Post by subpixel » Wed Oct 26, 2011 2:01 am

Thanks a lot for great answers.
Yes, you can just set view_dependent to "false" and then just set the number of subdivisions.
Is it max_num_subdivisions? (Kind of misleading).

Also do you know, if there's planned support for 4x4 (or 3x4) matrices for transformation?
Is it possible to write a custom map/shader with SDK?

Thanks again,

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: A couple of questions about SDK 3.0.21

Post by fused » Wed Oct 26, 2011 2:09 am

subpixel wrote:Is it max_num_subdivisions? (Kind of misleading).
Yes.
subpixel wrote:Also do you know, if there's planned support for 4x4 (or 3x4) matrices for transformation?
Not as far as I know. We kind of support 3x4, but you have to write the translation to the keyframe. Hehe...
subpixel wrote:Is it possible to write a custom map/shader with SDK?
Do you mean in c++ or in ISL? C++ is not possible, ISL is.

Regards,
Yves

User avatar
subpixel
Developer
Posts: 237
Joined: Sun Mar 28, 2010 9:09 am

Re: A couple of questions about SDK 3.0.21

Post by subpixel » Fri Oct 28, 2011 10:20 am

Once again thanks for answering.

And yet there are some new questions:
  • Were did radius go from SplatFilterMNCubic (there is one on DownsizeFilterMNCubic) ?
  • What is a SumMaterial?
  • Is specifying SceneNodeUID necessary, when there's reference specified?
Thanks a lot,

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: A couple of questions about SDK 3.0.21

Post by fused » Sat Oct 29, 2011 3:08 am

Hi,
subpixel wrote:Were did radius go from SplatFilterMNCubic (there is one on DownsizeFilterMNCubic) ?
I don't think SplatFilterMNCubic ever had a radius. Thomas says it's not supposed to have one, although it would be possible. Indigo just doesn't support it currently.
subpixel wrote:What is a SumMaterial?
The sum material adds n materials together, with the wights set in weights. We don't have any more documentation on that currently, sorry.

It can be used to use SunSky with an environment map.
subpixel wrote:Is specifying SceneNodeUID necessary, when there's reference specified?
I don't think it's necessary.
Indigo does late binding of nodes with the UIDs, but only when the reference is NULL. This is so you can define use materials/meshes/media before you actually defined them/added them to the scenegraph.

edit: also, all the setters that take a reference should do this, if needed:

Code: Select all

void SceneNodeModel::setGeometry(const SceneNodeMeshRef& geometry)
{
	this->mesh = geometry;
	this->geometry_uid_to_bind = geometry->getUniqueID();
}

User avatar
subpixel
Developer
Posts: 237
Joined: Sun Mar 28, 2010 9:09 am

Re: A couple of questions about SDK 3.0.21

Post by subpixel » Sat Oct 29, 2011 3:24 am

Thanks a lot,
I don't think SplatFilterMNCubic ever had a radius
Sorry for my ignorance, I asked about it since there is discrepancy with Technical Guide PDF.
The sum material adds n materials together
Is that what multiple blend material unfolds to? What is the order of weighting materials? Is there some restrictions on weights? Does first weight weights with nullMaterial or is it disregarded?

Again thank you for all answers.

User avatar
subpixel
Developer
Posts: 237
Joined: Sun Mar 28, 2010 9:09 am

Re: A couple of questions about SDK 3.0.21

Post by subpixel » Thu Nov 03, 2011 10:35 am

Hey,

Once again thank you for your time and will to share your knowledge. I still hope to get some info on SumMaterial.

Anyway, could anyone confirm if scale on SceneNodeMesh is working properly?

Also a small suggestion to change an empty constructor of AxisAngle, so it would default to identity. Some time ago, I had most difficult time to debug pretty random errors due to this invalid assumption. I believe it would make good sense.

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: A couple of questions about SDK 3.0.21

Post by fused » Thu Nov 03, 2011 11:04 am

subpixel wrote:Hey,

Once again thank you for your time and will to share your knowledge. I still hope to get some info on SumMaterial.

Anyway, could anyone confirm if scale on SceneNodeMesh is working properly?

Also a small suggestion to change an empty constructor of AxisAngle, so it would default to identity. Some time ago, I had most difficult time to debug pretty random errors due to this invalid assumption. I believe it would make good sense.
Hi,

that scale is only used when parsing a scene file that contains xml mesh data (embedded_mesh and embedded_mesh2, or what they are called), iirc.
It won't do anything to your IndigoMesh vertices. Should maybe not be in the scene graph at all. Sorry about that :)

Yeah, the default constructor for AxisAngle should probably give you the identity. Will change that.

User avatar
fused
Developer
Posts: 3648
Joined: Fri Sep 22, 2006 7:19 am
Location: Berlin, Germany
3D Software: Cinema 4D

Re: A couple of questions about SDK 3.0.21

Post by fused » Fri Nov 04, 2011 12:27 am

Hey,

regarding the AxisAngle default constructor:
I won't change it's behavior, as Nick said that it might be used in a performance critical context.

There is a static function that gives you the identitiy, tho:

Code: Select all

AxisAngle::identity()
Please use that instead. But I will update the documentation of the default constructor, saying that it does not initialise and that identity() should be used if an identity is needed.

User avatar
subpixel
Developer
Posts: 237
Joined: Sun Mar 28, 2010 9:09 am

Re: A couple of questions about SDK 3.0.21

Post by subpixel » Fri Dec 16, 2011 1:41 am

Hey,

I've got some new questions. Hope you could help me.
  • What is the meaning of time parameter in keyframe structure? I have learned that, last keyframe time must be >= 1.0, which would suggest it's not time dimension, rather exposure time percentage. Am I correct? What is the use of values greater than 1.0?
  • Is property used_materials in Mesh, needs to be filled in? What values should be used, if mesh is instanced with multiple materials ?
  • What is Indigo behaviour with Mesh material index out of bounds of assigned material vector?
  • Is there documentation, about Indigo error codes? I'm particularly interested in error 21 from initialiseWithScene()
  • Can HDR buffer be reused after a render or should it be reconstructed?
  • Is it possible to remove children from root node without reconstruction?
Thanks a lot,

User avatar
lycium
Posts: 1216
Joined: Wed Sep 12, 2007 7:46 am
Location: Leipzig, Germany
Contact:

Re: A couple of questions about SDK 3.0.21

Post by lycium » Fri Dec 16, 2011 3:53 am

Hi subpixel,
  • The time values are in multiples of the exposure duration. So if the exposure duration is 2s, a time value of 3 corresponds to 6 seconds. There's some documentation on this in the Technical Reference manual.
  • The Indigo scene loader does late binding of the materials to their referenced models, so their actual names don't matter but they need to be present for backwards compatibility. There need to be as many names as used material IDs (which incidentally are not node IDs).
  • Probably a warning, hopefully not a crash :)
  • There should be documentation of the return codes in the header file for the class. In this case there wasn't any for initialiseWithScene(), so I've added it for the next release; the error code you were seeing was due to an Indigo context being initialised twice - currently an Indigo instance can only render a single scene.
  • It might be possible, but it should probably be created anew each time.
  • There is a removeChildNode() method for nodes, however doing this often can be slower than regenerating the scene (since it is linear time in number of nodes).

User avatar
lycium
Posts: 1216
Joined: Wed Sep 12, 2007 7:46 am
Location: Leipzig, Germany
Contact:

Re: A couple of questions about SDK 3.0.21

Post by lycium » Fri Dec 16, 2011 3:56 am

To clarify the first point, the beginning time of a frame is 0, then ending time is 1; so it's normalised, but you can (and probably should) have a keyframe before t=0 and after t=1 (to ensure the continuity).

Post Reply
28 posts

Who is online

Users browsing this forum: No registered users and 1 guest