Improved Material previs.

Project:YafaRay
Component:Blender Exporter
Category:feature request
Priority:normal
Assigned:David Bluecame
Status:postponed
Description

Hi

As a result of a recent conversation with David, I would like to propose several changes in the material previsualisation window. The main idea is that the material previsualisation window offers many more posibilities and can by itself partially supply for the lack of interactive rendering capabilities. There are several areas that could be improved in my opinion. The main goals of a good material previsualisation window should be:

1. Ability to set a key light in the previsualisation window. A key light is a dominant light source we can use to produce a clear terminator area on which we can study in a better way effects produced by light sources on relief maps (bump mapping, normal mapping or real displacement). This is part of the whole idea about implementing tools for producing better and more consistent diffuse components in our scenes. This is already done in Blender internal previsualisation result for instance. It would be great also that we can change the key light type. Example below, notice how relief mapping (in this case displacement) is more evident on the terminator area:

2. Ability to change key light incident angle, so we can place the terminator area on the preview object.

3. Ability to focus in the observer's terminator area. Lighting effects accumulate in tangent angles to the scene subject, but this is true either from the key light (previous paragraph) perspective or the observer's standpoint (image below). Many times I set such a scene for material testing so I produce a tangent camera to the subject to study in a better way relief mapping strength and Oren-Nayar gradients. Ideally, the best test scenario is the one in which both key light and the camera view use a tangent angle to the previsualisation subject. Terminator areas and tangent views is where astronomers study planets' surface properties.

This could be achieved in the previsualisation window with a zoom in/out tool so users can focus on such an area and also rotating interactively the previsualisation object. An important feature would be that we can control resolution settings for the previsualisation for detail, but I am not sure whether Blender would allow for these features. In that case maybe we can look for alternatives.


Same Oren-Nayar object, rendered with different camera angles, notice how standar cube preview is useless to see Oren-Nayar gradients. 

4. Ability to change light power in the material previsualisation window, so we can accomodate its results in line with our scene lighting balance, for instance Grey 18 or Grey 12.

5. Ability to change previsualisation object size according to Blender scene units, so we can define in a better way scale of our relief mapping work, particularly when working with procedural textures. Also with this feature we could better simulate and study effects in every possible scale, from micro to middle and macro levels. This feature is very important for instance if we layer a specular reflections on a surface and and we want them working consistently in different scales. We can set several scale intervals for common scene units or a just a multipliying factor for the standard size.

Viewing scale concepts and terminology are getting more attention in the wake of phisically based shading, for instance at close distance sea water can be modelled as a perfect mirror with displacement for the specular component but at a large distance, it behaves more like a microfacet specular model aka glossy. You don't need such large distances though to observe surface properties change in other common objects, like plaster and matte painted surfaces becoming increasingly specular at bigger viewing scales.

6. Rendering an object from the scene as a previsualisation object, so we can really test more possible cases not accounted for right now, for instance cylindrical objects with anisotropic reflections. This would translate better our results in the material window to the final result in the scene.

7. Material previsualisation render input in the Blender UV/Image windows, so we can study in a better way diffuse detail and specular effects on the material surface.

Comments

#1

Assigned to:Anonymous» David Bluecame

#2

Priority:normal» critical

#3

Hello,

I'm doing some tests in my development version. I've uploaded a video so you can see how this is working.

https://www.youtube.com/watch?v=AFWcHgufkBw

I hope this is similar to what you want. Please let me know what you think.

#4

Status:active» ready to commit

This feature will be available in the next version of YafaRay-E  (except for point 7, I don't understand well what is it about)

Some videos explaining how the new feature will be:

* First tests (outdated): https://www.youtube.com/watch?v=AFWcHgufkBw

* Latest video with all features: https://www.youtube.com/watch?v=jBgzqZFQ3Y8

#5

Implemented in YafaRay-E v2.1.0

More information: http://www.yafaray.org/community/forum/viewtopic.php?f=12&t=5137

#6

Status:ready to commit» fixed

#7

Status:fixed» active

Hello,

I've made some of the changes you requested. As far as I know, Blender interface does not allow to use the mouse in the material preview window for any actions. Also, to make the rotation work around the object "centre" is not an easy task at all and will take some time.

For now this is what I've done:
https://github.com/DavidBluecame/Blender-Exporter/commit/3515ee77f972aee...

Changes to the new Material Preview Controls:
* Removed PosX,PosZ controls
* Removed Texture scale/offset controls
* Added AA Passes control for progressively refining the material rendering
* Splitted the Light power control in two: Key Light power control and Fill Lights power control


If you want to test it, please do the following:
* Download this file: https://github.com/DavidBluecame/Blender-Exporter/archive/experimental.zip
* Decompress it and copy the files over your current YafaRay v2.1.0 existing files/folders (overwrite them).
* Try again, you should see the changes now.

Please let me know if this helps.

#8

Status:active» needs review

It was quite difficult but I think I achieved the Dynamic Camera Rotation & Zoom using the mouse!!! ;-)

This will be available in the upcoming YafaRay-E v2.1.1. For now you can see the functionality in this new video:

https://www.youtube.com/watch?v=DxNDam66OqE

I hope you like this.

#9

Thanks David for these improvements. I have two questions:

What is it the preview object size when obscale=1. I suppose it is inscribed  into one Blender unit, but I think It would be great if we can make this information available to users so they know what standard size they are multiplying for when using obscale.

What kind of rendering is YafafaRay doing in the preview window now. I suppose it is rendering the full resolution in a single render pass using the direct lighting integrator. Can you share that information please?

My work · Grey18 workflow · Sampling strategy · [url=http://www.yafaray.org/node/816]SPPM

#10

Hello, Samo:

YafaRay is rendering the full resolution of the size of the preview window (so the smaller it is, the faster it will be).

It's rendering using Direct Light and the ray depth and AA passes are controlled with the new controls for them. If you select several AA passes, it does just 1 sample in each pass to avoid too much delay and allow a "progressive" feeling. The AA threshold is fixed to a small value (not remember now, but something like 0.001 or similar)

The preview object size when obscale=1 varies and it's not always the same. It's difficult to get it "normalized" as Blender is the one supplying the different preview objects and I've not found a way to find our their size to normalize them. For now, we will have to use the objscale manually sometimes, especially for custom objects.

I'm preparing the Release v2.1.1 with additional changes to the Material Preview controls. I think the latest changes will make sense and will be useful and more clear for the users. I'm also preparing a new video with the latest "final" version of the controls.

Due to the nature of Blender and YafaRay, the preview controls will always have lag. The lag will be bigger if the preview window is bigger and also will be bigger depending on the complexity, background, ray depth, AA passes, etc. However, even not perfect, I believe this new feature will give all YafaRay users a powerful tool to be able to adjust their materials, in absence of a full "real time preview" functionality.

I hope you find this useful despite its shortcomings.

#11

Status:needs review» ready to commit

Hello,

This is the final version of the Preview controls:

https://www.youtube.com/watch?v=jEHuVyjF1OI

#12

Status:ready to commit» fixed

Fully implemented in YafaRay-E v2.1.1. See: http://www.yafaray.org/community/forum/viewtopic.php?f=12&t=5137

I'm open to further improvements, but for now I think it's an enough powerful tool and I think it should be intuitive for users. So, for further improvement requests I will put a low priority so I can continue working in other areas now.

I hope this is what you needed. Best regards.

 

#13

Thanks David for the info and the work on these features.

"The preview object size when obscale=1 varies and it's not always the same. It's difficult to get it "normalized" as Blender is the one supplying the different preview objects and I've not found a way to find our their size to normalize them. For now, we will have to use the objscale manually sometimes, especially for custom objects."

I see but David it would be great that we can find out or reach some solution since knowing the object standard size is the first premise for the obscale setting to make any sense IMO. The idea is that we can link the scale of the material previs. with the object scale we are mapping in the scene. Imagine I have a wall in the scene which uses blender units as meters, which is the usual workflow I think for most people doing archivis in Blender. If standar object size is obscale= one Blender unit (1 m.) in the previsualisation window for instance, I would first use obscale=0.05 (m.) to get the bump mapping right in the microscale level, then I would use obscale = 10 (m.) to create a soft specular layer in the macro level for grazing angles. Obviously this workflow only makes sense if the previs object size is referenced in some way to the scene Blender units. Thank you anyway for your great work.

My work · Grey18 workflow · Sampling strategy · [url=http://www.yafaray.org/node/816]SPPM

#14

Priority:critical» normal
Status:fixed» active

Reopened to study what samo said as well as the room cube not centered (http://www.yafaray.org/community/forum/viewtopic.php?p=31423#p31423)

#15

Hello,

I'm trying to achieve a normalization of the size of the objects to 1 blender unit. However, this is not as simple as it seems.

Blender provides the bounding box for each object and the maximum dimension (longest edge of the box). I've done tests normalizing all objects so the max dimension becomes 1ud.

However, as the objects are irregular, using the max dimension makes them look quite different in their apparent sizes. Also perspective effect of the camera in the preview adds more apparent size difference.

For example (all these are using same zoom, same distance and all objects have a maximum dimension 1 blender unit (believe it or not):

AttachmentSize
normalized 1ud tests - sphere.jpg 27.11 KB
normalized 1ud tests - cube.jpg 24.44 KB
normalized 1ud tests - suzanne.jpg 25.36 KB

#16

Status:active» needs review

Please, I need to know if you still believe it's worth normalizing the size of the preview object or not. If I have to normalize them, be aware that there might be significant differences in the apparent size of the objects, as explained above.

#17

Sorry, but I also give my opinion.

I think the size of the object is one thing and another is the aparent size of the object.

I would by default to see the object to be almost the size of the frame window, the shorter length, of course; unless manually we set some zoom or pan to see some details like on 3d view (an idea). This should be controlled by the camera (minimum and maximum dolly of course to don't enter inside the geometry or only zoom).

In fact, if we set the object to fit the preview window, we only have to zoom and pan, it's not worth to zoom out.

Also, I think the room can not be a room, only a background checkerboard environment image, so we have various predefined backgrounds (hdr), for example studio, desert, interior, checkerboard, and color checkerboard. (maybe the room actually is, I don't know).

Finally, I won't change physically the size of the object and scene, I only would change the size of the uv of the object, so if you are working on big or small objects you can adjust to match your settings in texture size. (this should be a numeric input). First of all, the objects should have a proper uv set.

 

Thanks

#18

I've been thinking about the size of the scene and in case of transparent surfaces is necessary to scale the object to preview correctly the absorption values. Also people wanting to do space or planetary things would appreciate it. The matter is to scale then the entire scene, with the camara, so only an scale factor control should be needed (numeric). If so, the apparent size of the object does not change while scaling it.

 

 

 

 

 

 

#19

Status:needs review» postponed

I think the material preview is ok as it currently is and I don't believe it's worth spending more time and effort on improving it.

In any case, in the long term I hope we will be able to do some kind of "realtime preview" in the future to fully solve this entry. So, I'm marking this as "postponed" until we achieve such solution.