PolyTools3D
@polytools3d
New Member
Joined: Feb 14, 2024
Topics: 17 / Replies: 1674
Reply
RE: Analyzing Viewport Lighting [3DS Max 2014]

Unfortunately not all SDK is implemented in the .Net API, although it gets better in later Max versions. But in Max 2014 many things do not work. The…

7 years ago
Forum
Reply
RE: Analyzing Viewport Lighting [3DS Max 2014]

I wrote the code. The bitmap you get is a .Net bitmap so it won’t display with the MXS display() function. You can either copy it to the clipboard (us…

7 years ago
Forum
Reply
RE: Analyzing Viewport Lighting [3DS Max 2014]

I can use Max normally including any viewport navigation command, add/remove lights, modify the box, add/remove faces etc. and everything updates in r…

7 years ago
Forum
Reply
RE: Analyzing Viewport Lighting [3DS Max 2014]

I don’t know what can cause the flickering on your end, but I don’t think is .Net related. The script just sends a standard Windows message. Perhaps i…

7 years ago
Forum
Reply
RE: Analyzing Viewport Lighting [3DS Max 2014]

If the screen flickers then the WM_SETREDRAW message mightnot be working on your system. On my end I see no flickering in any Max version I could test…

7 years ago
Forum
Reply
RE: Analyzing Viewport Lighting [3DS Max 2014]

Considering the amount of variables you need to handle, based on your scene, I think it would be faster to just use the viewports images to get the co…

7 years ago
Forum
Reply
RE: Analyzing Viewport Lighting [3DS Max 2014]

Besides Gamma correction, your scene also has Exposure Control, so you must use the same exposure algorithm to correct the output colors.

7 years ago
Forum
Reply
RE: Analyzing Viewport Lighting [3DS Max 2014]

Your scene is gamma corrected so you should correct the output colors as well. The formula for gamma correction is: color = 255 * (color/255.0)^(1/2….

7 years ago
Forum
Reply
RE: Analyzing Viewport Lighting [3DS Max 2014]

The SVG renderer does not take into account the light multiplier, but I added it to the script. I suppose you are not using a multiplier of 1.0, and s…

7 years ago
Forum
Reply
RE: Analyzing Viewport Lighting [3DS Max 2014]

Do you have an example I can reproduce to see where it fails? The faces almost never have a flat color, at best they have a soft gradient shading, an…

7 years ago
Forum
Reply
RE: Analyzing Viewport Lighting [3DS Max 2014]

This line of the code is a “quick backface culling”. It does not take into account the camera FOV, so if you use it in an orthographic view you’ll see…

7 years ago
Forum
Reply
RE: Analyzing Viewport Lighting [3DS Max 2014]

Here is another version using the viewport image to average pixels colors. Currently the sample pixels are the number of face verts + 1, and they are…

7 years ago
Forum
Reply
RE: Analyzing Viewport Lighting [3DS Max 2014]

What you are trying to do isn’t an easy task. Here is a very simple script, based on the SVG renderer shown in the MXS help, which is missing many th…

7 years ago
Forum
Reply
RE: Analyzing Viewport Lighting [3DS Max 2014]

What material/s and light sources will you use?

7 years ago
Forum
Reply
RE: algorithmic brain teaser

Be aware that the polygons vertices are not always ordered and things can easily go wrong. For example: ( delete objects obj = converttopoly…

7 years ago
Forum
Page 29 / 113