Render to texture - Heightmap: grey texture

Render to texture - Heightmap: grey texture

Intuos5
Advisor Advisor
15,867 Views
12 Replies
Message 1 of 13

Render to texture - Heightmap: grey texture

Intuos5
Advisor
Advisor

For a project, I am trying to convert a terrain compound object (based on CAD iso/contour lines) by rendering it to a texture. The process and settings are the same as displayed here: https://youtu.be/ozwPCU8v9Ro?t=349
In short: projecting a high poly mesh on a plane by Heightmap render element, with the cage encompassing the high poly mesh, render using Scanline as 32bit Tiff. 
I want to use it as a displacement map (to avoid the heavy triangulation). However, the output rendered texture only displays the background colour, so the geometry is somehow not being rendered/ projected upon a low poly plane.
I use 3ds Max 2019.1. Does anyone know what I am doing wrong here? Thanks in advance!

0 Likes
Accepted solutions (2)
15,868 Views
12 Replies
Replies (12)
Message 2 of 13

ads_decatae
Autodesk
Autodesk

Hello Intuos5,

 

You need to set the low and high values of the height in the Projection Options.

  1. In the Render to Texture tool, look for the Projection Mapping area
  2. Click on the button called "Options"
  3. Set the Min Height and the Max Height at the bottom of the dialog

The Max Height value will be the white in the map, and the Min Height value will be black. If you don't setup these values for the scene, everything turns out grey because of the range in which the high polymesh resides in. So, in brief, the distance between the low res mesh and the highres mesh to it's lowest "valley" should be the min value and the distance between the low res mesh and the highres mesh to its "peak" should be the high value.

 

Let us know if that helps.



Elena de Catalina
Sr. QA Analyst
Entertainment Creation Products, ECP
0 Likes
Message 3 of 13

Intuos5
Advisor
Advisor

That makes sense, although I did specify a minimum value of 16,5 meters (highest point) and a minimum of zero. I am not sure about the buffer values, because I recall one of them being different than my inputs.Thanks, I will look into it again to verify whether this was the issue or not.

 

0 Likes
Message 4 of 13

hagen.deloss
Autodesk
Autodesk

Hi @Intuos5

 

Thanks for bringing your question to the forums! I'm curious if @ads_decatae's answer to your question helped enough to resolve the issue, or if you would like further clarification? 

 

It would be super helpful if you could add a post with how you decide to proceed, and your results. That way other Community members can benefit from your process 😄

 

Please select the Accept as Solution button if a post solves your issue or answers your question.

 

 



Hagen Deloss
Community Manager | Media & Entertainment
Installation & Licensing forums | Contact product support | Autodesk AREA


 

0 Likes
Message 5 of 13

Intuos5
Advisor
Advisor

Hi all,

Sorry for the late reply, I just got around trying the projection mapping again. This time I used a different mesh (at first I used a terrain compound object, now a displaced plane which has been edited in Mudbox). I have checked the height, which is 16,5 meters and to be sure I checked the heights by sampling them and they fall within the min/max height range. The render is completely grey again, although I notice a different coloured diagonal, corresponding to the cage (I believe). Could you help me figure out what the issue is?

0 Likes
Message 6 of 13

ads_decatae
Autodesk
Autodesk
Accepted solution

Hello @Intuos5,

From your screenshots, I can’t see if you have selected the correct mesh as projection target. Having selected the wrong mesh might bring up the wrong results.

Very briefly, this would be the workflow.

  1. Select the low-res mesh and add a Projection modifier
  2. In the Projection modifier rollout, pick the high-res mesh from the list, and also make sure the cage shows over the mesh.
  3. With the low-res mesh still selected, open the Render to Texture tool, enable the Projection Mapping and adjust the min height and the max height
  4. Add the height map to the queue and bake!

I've attached a short video. I hope it helps!



Elena de Catalina
Sr. QA Analyst
Entertainment Creation Products, ECP
Message 7 of 13

hagen.deloss
Autodesk
Autodesk
Accepted solution

Hi @Intuos5 

 

I followed along to @ads_decatae steps in the video, and was able to render out a height map. Looking at your screenshot, it looks like the minimum height buffer is a little over 6, is there a reason its not set to 0? as long as your target mesh is within the projection, it should be fine....does it export anything different if you render out a .tga instead of a .tiff? I have had issues in the past with the tiff format not picking up baking nuances.

 

I hope we find a solution on this one!

 

Please select the Accept as Solution button if a post solves your issue or answers your question.

 

 



Hagen Deloss
Community Manager | Media & Entertainment
Installation & Licensing forums | Contact product support | Autodesk AREA


 

Message 8 of 13

Intuos5
Advisor
Advisor

After giving it a final try, it finally worked, brilliant! Thanks for the help. 
In the end, I think that the option to use automatic unwrap on the object is the one I missed along the way. 

Message 9 of 13

Anonymous
Not applicable

Thanks for the answer it was very helpful as I was facing the same problem.

One question though remains: the rendering goes well now, but, as I also see in @ads_decatae 's video, the texture renders with an unwanted border, any idea how to make it not render that?
Thank you!

0 Likes
Message 10 of 13

ads_decatae
Autodesk
Autodesk

Hello @Anonymous

 

In the Mapping Coordinates area, select Use Existing Channel (channel 1) instead of Use Automatic Unwrap.

That did the trick for me, let me know if it works for you too!

Mapping CoordinatesMapping Coordinates



Elena de Catalina
Sr. QA Analyst
Entertainment Creation Products, ECP
0 Likes
Message 11 of 13

ROM_RRR
Enthusiast
Enthusiast

I followed this Arrimus tutorial (shown in the first post) but get very ugly output with Scanline renderer which I never touched before. So, what should be tweaked to solve it?

Thanks in advance

P.S. All tutorials use Scanline for height maps, is there possibility to render (to texture) a heightmap with Vray?

Capture.JPG

0 Likes
Message 12 of 13

Anonymous
Not applicable
I would try smooting it in Photoshop. You can also turn a grayscale height
map into a normal map in Photoshop and 3DS Max is a slot called normal bump
which accepts a normal map.
0 Likes
Message 13 of 13

ROM_RRR
Enthusiast
Enthusiast

I can hardly believe there's no civilized way to get a decent output straight from Max without messing in PS. There must some setting taking care of those edge AA artifacts.

I need B&W map for displacement, not normal one.

0 Likes