WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 17 votes, 5.00 average. Display Modes
  #1  
Old 04-12-2012, 02:35 PM
jde jde is offline
Member
 
Join Date: Jul 2009
Location: Providence RI
Posts: 24
Vizard Shaders vs. Texture Baking

I'm having a horrible time rendering some basic shading onto freely available models I've downloaded. Even if I clean up the geometry (Reset XForm, Collaplse, Turn to Poly, etc etc), I still get holes in the models after using Render to Texture (sending Complete Map to Diffuse slot) in 3DS Max. If I simply apply a texture and then export to Vizard, it's really hard to see the kind of depth and definition on the model that you can see in the 3DS viewports.

Is there a way to use Vizard's shaders or some other method to simply give a model the kind of shading and depth that you can see in the 3DS viewport? i.e. something simple that approximates the global illumination in .3DS without requiring error-prone texture baking?
Attached Thumbnails
Click image for larger version

Name:	RenderProblem.jpg
Views:	4230
Size:	53.2 KB
ID:	490  
Reply With Quote
  #2  
Old 04-16-2012, 11:54 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
What format are you exporting the model to?
Reply With Quote
  #3  
Old 04-16-2012, 12:19 PM
jde jde is offline
Member
 
Join Date: Jul 2009
Location: Providence RI
Posts: 24
.ive, but I've tried .3ds and several others -- same result.
Reply With Quote
  #4  
Old 04-18-2012, 10:21 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
When exporting to .ive, are you enabling vertex normals and lighting in the export options dialog?
Reply With Quote
  #5  
Old 04-18-2012, 12:40 PM
jde jde is offline
Member
 
Join Date: Jul 2009
Location: Providence RI
Posts: 24
Thanks for the reply -- I've attached the settings I'm using.
Attached Thumbnails
Click image for larger version

Name:	tempive.jpg
Views:	4002
Size:	48.6 KB
ID:	491  
Reply With Quote
  #6  
Old 04-18-2012, 01:03 PM
jde jde is offline
Member
 
Join Date: Jul 2009
Location: Providence RI
Posts: 24
I'm also attaching the original model file and my Render to Texture settings from 3DS Max 2012.
Attached Thumbnails
Click image for larger version

Name:	renderToTextureSettings.jpg
Views:	3992
Size:	120.1 KB
ID:	493  
Attached Files
File Type: zip venusdemilo.zip (312.3 KB, 4337 views)
Reply With Quote
  #7  
Old 04-23-2012, 03:09 AM
chris_user chris_user is offline
Member
 
Join Date: Feb 2011
Posts: 20
it seems you need to unwrap it first. the gaps could be some overlapping uws I assume.

hope this helps
Reply With Quote
  #8  
Old 04-24-2012, 10:41 AM
jde jde is offline
Member
 
Join Date: Jul 2009
Location: Providence RI
Posts: 24
I've tried adding the various unwrap modifiers rather than using the unwrap option in the rendering dialog -- doesn't seem to help.
Reply With Quote
  #9  
Old 04-24-2012, 11:54 PM
chris_user chris_user is offline
Member
 
Join Date: Feb 2011
Posts: 20
hello,

I attached the screenshots from max uv related.
on the left side is the provided uv in the model on the right side i simply put a unwrap uv modifier on it and in the uv editor done a pack uv.
I know its far away from perfect but it works for baking. in the zip document is the ive exported with the baked texture.
Attached Thumbnails
Click image for larger version

Name:	UVview.jpg
Views:	3981
Size:	316.5 KB
ID:	495  
Attached Files
File Type: zip milo.zip (379.6 KB, 4205 views)
Reply With Quote
  #10  
Old 04-26-2012, 08:13 PM
jde jde is offline
Member
 
Join Date: Jul 2009
Location: Providence RI
Posts: 24
Just a clarification: Did you unwrap only the stuff associated with the front of the model? If you zoom out in the Edit UVWs window, you can see that there are polygons for the sides and head as well -- did you pack those too?
Reply With Quote
  #11  
Old 04-26-2012, 08:32 PM
jde jde is offline
Member
 
Join Date: Jul 2009
Location: Providence RI
Posts: 24
here is the first set of screenshots showing what i tried. i can't seem to get the same results as you did.
Attached Thumbnails
Click image for larger version

Name:	packing01.jpg
Views:	3977
Size:	228.5 KB
ID:	496   Click image for larger version

Name:	packing02_STLcheck.jpg
Views:	3871
Size:	232.9 KB
ID:	497   Click image for larger version

Name:	packing03_VertexWeld.jpg
Views:	3789
Size:	225.5 KB
ID:	498   Click image for larger version

Name:	packing04_collapseAndUnwrapUVW.jpg
Views:	4003
Size:	248.7 KB
ID:	499   Click image for larger version

Name:	packing05_UVWeditor.jpg
Views:	3946
Size:	224.1 KB
ID:	500  

Reply With Quote
  #12  
Old 04-26-2012, 08:33 PM
jde jde is offline
Member
 
Join Date: Jul 2009
Location: Providence RI
Posts: 24
here is the second set of screenshots
Attached Thumbnails
Click image for larger version

Name:	packing06_selectAll.jpg
Views:	3821
Size:	230.1 KB
ID:	501   Click image for larger version

Name:	packing07_packUVs.jpg
Views:	3969
Size:	233.6 KB
ID:	502   Click image for larger version

Name:	packing08_packResults.jpg
Views:	3955
Size:	268.7 KB
ID:	503   Click image for larger version

Name:	packing09_RenderToTexturesettings.jpg
Views:	4018
Size:	267.1 KB
ID:	504   Click image for larger version

Name:	packing10_RTTresults.jpg
Views:	4002
Size:	238.9 KB
ID:	505  

Reply With Quote
  #13  
Old 04-26-2012, 08:34 PM
jde jde is offline
Member
 
Join Date: Jul 2009
Location: Providence RI
Posts: 24
and... here is the final screenshot =)

(sorry, vizard's forum makes you type at least 10 characters)

the result in vizard is a very choppy model with tons of holes, but the parts that are rendered properly look great. perhaps pelt modeling would help? i don't understand why your packing looking different and why you were able to produce a perfectly intact model
Attached Thumbnails
Click image for larger version

Name:	packing11_IVEsettings.jpg
Views:	3805
Size:	232.3 KB
ID:	506  

Last edited by jde; 04-26-2012 at 08:36 PM.
Reply With Quote
  #14  
Old 04-30-2012, 03:05 PM
Veleno Veleno is offline
WorldViz Team Member
 
Join Date: Sep 2005
Posts: 148
Hi JDE. I've taken a look at your model. Chris, since you're using Vray, I have some tips for you as well.

At a glance, the problem look to be related to baking with Alpha and overlaping UVs. If you're also exporting using DXT1 texture compression, this would explain the odd cut-offs in the model since DXT1 uses 1 bit alpha.

I've attached a few images showing typical bake and export settings, and how the model looks when I bake it and bring it into Vizard. I'll attach the work files in the next post.

In the model I see the following issues:
model
- The original model has unwelded vertices and overlapping faces. It looks like you already fixed most of these in your version of the model.
- The scale transform should be collapsed with reset xform
Chris: It looks like you're using vray, which should still be able to get decent results without doing much cleanup (other than an overall weld)

Unwrapping
- You have too much space between UV islands in the bake version of the UVs. This means you'd need to use a larger texture to get the same texel density on the surface of the model than one that was packed more efficiently. For the baking channel (ch 3), use 60 as the threshold angle and 0.005 for the spacing. I don't recommend letting render to texture do the unwrap for you, because it always wastes space by trying to separate things by material ID. The equivalent in a manual unwrap is to use the Flatten Mapping unwrap type.
- Unwrapping based on normals for channel 1 is fine for the diffuse texture and shouldn't cause problems as along as you aren't trying to bake to this channel.

rendering
Chris:
- It looks like you're baking with vray. Stick to vray's materials and lights to get better results. Some of the standard lights and materials don't play nicely in bakes and renders.
- In Color Mapping, in VRay's render settings, switch the type to gamma correction and set the gamma to 1.8. Also check "linear workflow". This will both adjust the gamma curve of the lighting to match your monitor, and also prevent materials and textures from becoming washed out. This method requires the use of Vray's materials to work properly.
- You can improve the results a little by adding a turbosmooth modifier to your model and setting the render iterations to 2. This is just to affect the way the bake looks - you'll still be exporting the lower-poly model.

baking
- Your edge padding is set to 2. This can cause seams to appear on lower mip levels, since it'll be sampling from the background color. I recommend setting it to 16.
- You are baking to an RGBA, instead of RGB. This will also have problems on lower mip levels. For solid objects, change the map output settings to render without an alpha channel.
- It looks like you're doing it already, but make sure the output material is a Standard:Blinn material. When baking to any kind of completemap, the target map slot should be Diffuse.

exporting
- Looks fine, from what I can see. It would be useful to get a screenshot of the rest of the settings though.
- At the bottom, under "Miscellaneous" make sure "convert units to" is set to Meters. This will make sure any model that is at the intended scale in Max units will also be the right size in Vizard.
Attached Thumbnails
Click image for larger version

Name:	baked_texture.jpg
Views:	3818
Size:	142.7 KB
ID:	507   Click image for larger version

Name:	max_render.jpg
Views:	3681
Size:	102.2 KB
ID:	508   Click image for larger version

Name:	Model_in_vizard.jpg
Views:	3785
Size:	147.1 KB
ID:	509   Click image for larger version

Name:	render-to-texture-settings.jpg
Views:	3728
Size:	140.5 KB
ID:	510   Click image for larger version

Name:	Typical OSG-Export-Settings.jpg
Views:	3741
Size:	70.8 KB
ID:	511  

Reply With Quote
  #15  
Old 04-30-2012, 03:08 PM
Veleno Veleno is offline
WorldViz Team Member
 
Join Date: Sep 2005
Posts: 148
I've attached the Max file, the Vizard export (.ive) and the .tif version of the baked map.
Attached Files
File Type: zip venusdemilo-max.zip (645.8 KB, 5049 views)
File Type: zip milo_wv_withTSmooth-Vizard.zip (838.1 KB, 4961 views)
File Type: zip BODYVRayCompleteMap.zip (370.4 KB, 3982 views)
Reply With Quote
  #16  
Old 05-03-2012, 07:01 AM
chris_user chris_user is offline
Member
 
Join Date: Feb 2011
Posts: 20
Hello,

sorry for being late with my answer. I totally forgot about this topic.
The model and unwrap I provided was just a 2 minute shot without velding the seams just to show where the problem is caused.
Unfortunately my mouse finger knows how time consuming it can be to unwrap a model in a proper way. But if you take the time you will get stunning results.

Thanks Michael for taking it up and showing how it has to be done right.
Reply With Quote
  #17  
Old 11-11-2016, 08:07 AM
rajnishv rajnishv is offline
Member
 
Join Date: Jan 2016
Location: Kalina,Sanatcruz(East),Mumbai,Maharashtra,India
Posts: 94
Have a look at this for advance baking for Vizard
Really amazing and very informative!!!!
I learnt a lot!!!
YouTube Video Link-
https://www.youtube.com/watch?v=0MOX...nnel=3dRealism
Reply With Quote
Reply

Tags
baking, shading, shadows, 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vizard 4 Beta Testing farshizzo Announcements 0 02-01-2011 11:46 AM
Vizard 4 Beta Testing farshizzo Vizard 0 02-01-2011 11:46 AM
3ds MAX to Vizard - Render to Texture Problem jde Vizard 0 04-13-2010 08:20 AM
Vizard tech tip: Using the Python Imaging Library (PIL) Jeff Vizard 0 03-23-2009 12:13 PM
3D Texture Mapping in Vizard? stefs Vizard 2 03-25-2008 04:34 AM


All times are GMT -7. The time now is 02:07 AM.


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