Author Topic: CoronaDisplacementMod to Mesh  (Read 22212 times)

2016-07-18, 16:31:41

deshu

  • Active Users
  • **
  • Posts: 35
    • View Profile
Hello.

I my work, I often use build in 3dsMax Displace modifier to achieve some surface-level details.

The problem is, for displacement to look perfect, I need extreme mesh density.

It would be lovely, to be possible to use Corona Displacement adaptivity algorithm, along with minimum/maximum* edge length setting, to "bake" actual meshes.

Mesh achieved this way could be used as blueprint for modeling in CAD softwares, or, for example, 3d printing.

*Currently we can set maximum edge length when using world units in prerender disp calculations.

2016-07-18, 16:57:24
Reply #1

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
+ 1 for making it possible to collapse the Corona Displacement modifier into a mesh - just like 3dsMax displacement modifier.

2016-07-18, 17:22:10
Reply #2

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12711
  • Marcin
    • View Profile
I think that with the "screen size" option you would end up with nice pretty displacement where camera can see it, and with fugly mess where camera cannot see it, or if it would be a big object - where it is further from the camera. With the "world size" option you would probably get more or less the same thing as when using 3dsmax displacement. I might be wrong though.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2016-07-18, 17:42:33
Reply #3

deshu

  • Active Users
  • **
  • Posts: 35
    • View Profile
+ 1 for making it possible to collapse the Corona Displacement modifier into a mesh - just like 3dsMax displacement modifier.

I wouldn't say "colapse", since CoronaDisplacement isn't visible in viewport. CoronaDisplacementMod could just have "Create Mesh Object" button.

I think that with the "screen size" option you would end up with nice pretty displacement where camera can see it, and with fugly mess where camera cannot see it, or if it would be a big object - where it is further from the camera. With the "world size" option you would probably get more or less the same thing as when using 3dsmax displacement. I might be wrong though.

Since screensize displacement operates on pixels, for this option to work, you would have to specify resolution and camera in CoronaDispMod itself. I don't find user-friendly.

However, world size corona displacement operates on scene units, and doesn't care about POV. Additionaly, it's adaptive, which makes it really good solution.

2016-07-18, 17:55:09
Reply #4

Ricky Johnson

  • Active Users
  • **
  • Posts: 108
    • View Profile
I would really like to see something introduced like this as well. Just to have the potential to create whatever the adaptive Corona displacement would calculate as a mesh - or at least an option within the current CoronaDisplacementMod to cache a calculated mesh in RAM.

I spend a lot of time, when doing test renders, waiting for the same displacement to be calculated again and again*.
The 3ds Max Displacement modifier is an alternative option in these situations but it lacks the adaptivity that is a big bonus for the Corona version.
I would accept that a 'baked in' calculation using Screen Size would not work very well if you're changing viewpoints but quite often you're at a stage when you have a fixed viewpoint so think this would still be very useful. I actually be pretty interested in seeing what the adaptive displacement had done with the mesh if you could look at this in the viewport after a render.
Resolution and Camera could be drawn directly from the main render settings at the time couldn't they?

* I think I raised something like this before in an earlier thread and it was argued that being able to use Interactive Render made this request somewhat redundant.
I can accept that to some degree but I'm still of the opinion that this would be extremely useful if you prefer to use the normal render to perform tests.

2016-07-18, 18:12:07
Reply #5

Paul Jones

  • Active Users
  • **
  • Posts: 168
    • View Profile
Quad Mesh would be better still

2016-07-18, 18:24:52
Reply #6

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
@deshu: yes I agree "collapse" isn't the right word, and "create mesh object" is better.

Regarding screen vs world size units, then of course it should be "world". And NO, I don't think it'll be the same as when using 3dsMax's displacement mod - Corona Disp. mod is adaptive and gives much nicer result than Max mod. But when using "screen" globally, there should be a "global override" option in the Corona mod, so it could work on "world" - and the other way around.

2016-07-18, 19:06:00
Reply #7

deshu

  • Active Users
  • **
  • Posts: 35
    • View Profile
I would really like to see something introduced like this as well. Just to have the potential to create whatever the adaptive Corona displacement would calculate as a mesh - or at least an option within the current CoronaDisplacementMod to cache a calculated mesh in RAM.

Caching disp would be awesome. Even without automatic changes detection (when user changes map between renders, or changes displacement values).

Resolution and Camera could be drawn directly from the main render settings at the time couldn't they?

Ofcourse, those information (currently active viewport/camera and render resolution) are available application-wise, even via maxscript.

2016-07-18, 23:28:12
Reply #8

cecofuli

  • Active Users
  • **
  • Posts: 1577
    • View Profile
    • www.francescolegrenzi.com
In this model, adaptive Corona displacement doesn't make sense.
Displacement adaptivity is on by default and it's useful when you have big, flat surface with some detailed surface.
For example, a brick wall.
When you have a complete curve surface, all the mesh will be subdivided in the same level.

Screen: subdivision of the displacement depends on the image resolution and the distance from the camera.
It's a little bit complicated to calculate the exact "size". But it's useful to save ram, because Corona doesn't subdivide the portion of mesh that you don't see.
Also, more far is the mesh, less subdivision will be.

World: It's independent from distance and resolution . Easier to setup (cm, mm etc...), but it subdivide the entire mesh.
For example, if you have a long road and you are in the middle of this road, Corona will subdivide also the mesh behind you.
Useful for interactive render, but it eats a lot of ram and you have to wait a lot at the beginning of the rendering.



2016-07-19, 10:39:10
Reply #9

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
1) apply displacement to an object
2) Go to system -> export scene
3) object gets saved in corona proxy format on HDD
4) create an empty corona proxy object
5) load the object back in the corona proxy, it will have the displacement baked in
6) ???
7) PROFIT!
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)


2016-07-19, 11:40:18
Reply #11

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
@ Ondra: Just tried this in a scene where system units was set to meter. The loaded geometry (in the proxy) came in a 1000 times to small (millimeter?). Is this intended behavior or a bug? Or am I doing something wrong?

2016-07-19, 11:50:58
Reply #12

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
it might be bug, can you report it?
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2016-07-19, 12:48:01
Reply #13

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Reported on Mantis: ID 0002016

2016-07-19, 13:03:29
Reply #14

Ricky Johnson

  • Active Users
  • **
  • Posts: 108
    • View Profile
Thanks for that tip. It's very useful!

I am getting the same effect as PROH upon import of the proxy. My object was 10 times too small (Scene & Display Units were in cm). Not a huge problem to remedy temporarily as it's an exact amount.