WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Thread Tools Rate Thread Display Modes
Old 12-21-2016, 12:27 PM
willpower2727 willpower2727 is offline
Join Date: Feb 2015
Posts: 39
Unhappy 3ds high quality render2texture for high quality osg export

I am trying to export an osg from this object that has a high-detail map. The material I made looks great when rendered in 3ds however when I render to texture (so that it will get exported to osg) it looks pretty lame. How can I "bake" this material properly so it looks good when exported to osg? I've attached the desired look, the actual outcome of exporting, and my rendering settings and osg export settings. Any help or ideas are appreciated!
Attached Thumbnails
Click image for larger version

Name:	OSGexportdesiredlook.jpg
Views:	2724
Size:	71.2 KB
ID:	879   Click image for larger version

Name:	OSGexportoutcome.jpg
Views:	2583
Size:	83.6 KB
ID:	880  
Attached Files
File Type: zip (194 Bytes, 3217 views)
File Type: zip (19.5 KB, 3173 views)
Reply With Quote
Old 12-23-2016, 02:49 AM
rajnishv rajnishv is offline
Join Date: Jan 2016
Location: Kalina,Sanatcruz(East),Mumbai,Maharashtra,India
Posts: 94
Pls see to the below link to get breakthrough

Thank You!!!
Reply With Quote
Old 01-04-2017, 12:59 PM
willpower2727 willpower2727 is offline
Join Date: Feb 2015
Posts: 39
This looks great, I do not have v-ray renderer, the demo version does not work (meaning I can't use it for this purpose). Any other options?
Reply With Quote
Old 01-04-2017, 02:45 PM
Veleno Veleno is offline
WorldViz Team Member
Join Date: Sep 2005
Posts: 148
Lightbulb Baking procedural diffuse textures to non-tiling static maps, scanline renderer

Render to Texture is the right path, and doesn't need VRay to work. VRay is great for baking out high quality lightmaps. Your issue looks to me more like a baked texture resolution problem than anything else.

To convert a procedural diffuse texture to a static non-tiling texture that matches what you see in a render, follow these steps:
  • For a quick render, save your original settings as a preset, set the renderer to scanline then disable any bounced lighting and other sampled effects (e.g. area shadows) that take a large amount of processing time.
  • Select the object you want to bake.
  • For this example, make sure the map you want to bake is set as the diffuse map
  • Open Render to Texture (press the number 0 on the keyboard)
  • Under General Settings -> Output -> Path, set the output path where you want your baked texture files to show up. Baked files should generally be stored with the project they were created for so the whole project can be easily transferred to another system.
    ..... Note: When baking with a render farm, this will usually be set to a network path that all nodes have read and write access to.
  • Under Objects to Bake -> Selected Object Settings, set Padding to 16. This prevents black lines from appearing on objects when far away from them by extending the bake past the UV border.
    ..... Note: This is needed because of an commonplace optimization called mip-mapping which is used to prevent the need for processing textures at their full resolution when a lower resolution will suffice.
  • The model needs target UVs to bake to. This example assumes you will be using the automatic unwrap, but it's also valid to unwrap manually with an Unwrap UVW modifier. RTT's automatic unwrap defaults to UV channel 3, so channel 3 works well as a convention for this style of baking. If using a manual unwrap, set Mapping Coordinates to Use Existing instead of Use Automatic Unwrap and set the channel to the one you want to bake to.
  • Under Objects to Bake -> Mapping Coordinates, Set Object to Use Automatic Unwrap, and leave the map channel as 3.
  • Under Output, click on "Add..." and select Diffuse Map, then press Add Elements. If using VRay to bake, please note that VRay has its own specially named elements used in its bakes and it may also not be the ideal tool for rendering out procedural diffuse textures into static maps due to some quirks it has with Standard class materials.
  • Under Output, uncheck Automatic Map Size and set the resolution to something large like 2048 or 4096. Manually setting the map size will make it easier to see the effect that the texture resolution has on the clarity of the textures.
    ..... Note: Automatic Map Size is based on an object's surface area, and can be controlled at the bottom of Render to Texture in the Automatic Mapping section. This setting has a range limitation that can cause issues with very large and very small objects unless users manually edit the Render to Texture's script file to increase the acceptable range. When used, the width and height display a preview of the final resolution of the texture.
  • Since we're getting the raw diffuse color data, both "Lighting" and "Shadows" should be disabled under Output -> Selected Element Unique Settings.
  • Under Baked Material -> Baked Material Settings, select "Save Source (Create Shell)" and "Duplicate Source to Baked"
    ..... Note: The Baked material rollout determines where the baked maps end up assigned after render. They can either go right back into the source material (destructive) or into a copy of your material as a sub-node of a shell material (non-destructive). The output node in the shell material can also be a new node of any type that doesn't start off with any maps already assigned. You can also skip creating a new material and render directly to files using the "Render to Files Only" setting.
  • We're using decently high resolution, so under Automatic Mapping -> Automatic Unwrap Mapping, set the spacing to something small like 0.005. This is the distance in the 0 to 1 UV space between UV islands (clusters of unwrapped/flattened polygons).
  • Go ahead and hit render. If you disabled bounced lighting and other sampled effects, this should take under a minute.
  • The preview should show a lit version of the flattened object being rendered, but the map that results should be unlit.
    ..... Note: if your object is long and narrow, you may find that the rendered map has a large amount of unused space. This is a case where a manual unwrap will provide a better result and allow you to fit the same amount of detail into a smaller map.

I've attached an example Max file and exported OSGB that go along with this baking example. Let me know if you get stuck or have any other questions.

For other map types you can typically follow the same steps but select that map's element instead (e.g. specular level map).
Attached Files
File Type: zip RTT Procedural (960.3 KB, 3597 views)
File Type: zip RTT Procdeural (731.2 KB, 3707 views)

Last edited by Veleno; 01-04-2017 at 02:48 PM.
Reply With Quote
Old 01-05-2017, 08:15 AM
willpower2727 willpower2727 is offline
Join Date: Feb 2015
Posts: 39
Thank you this was very helpful. I was able to replicate your results which is a vast improvement. I still wish I could get more of a production quality. Even when I cranked things up to the max (8192x8192) I was still getting a pixelated result. I'm going to try some other options to improve the quality, like changing the size of the box. If there are any other improvements I could make please tell me. I'm willing to spend a lot of time rendering since the appearance is important.
Reply With Quote
Old 01-05-2017, 12:31 PM
willpower2727 willpower2727 is offline
Join Date: Feb 2015
Posts: 39
Update: I was able to get some very high quality results by reducing the size of my object, originally it was 500 units long, making it hard for the renderer to bake onto. Even by cutting the size in half it looks superb. Thanks!
Reply With Quote

3ds max, 3dsmax, baking, osgb export, rendering, texture

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -7. The time now is 10:01 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC