Though the model is completely ready now, still we have 1 more issue to resolve: Currently our model consists of 316 vertices and 144 triangles (432 indices). Actually, not too much comparing to 3D editors. But still, how come so many?? Well, root box for instance: 6 sides, 4 vertices each = 24 vertices 12 […]
Chapter 36. “Glass” effect
The model is almost ready. Two remaining missing pieces are: For clear-film we don’t even need to write a new shader. We will use our “mirror” shader (as for gilded prints) with white noise as a main texture (uTex0) and will “translate” it to semi-transparent 8×1 texture glass01.bmp (uTex3), imitating glass reflection. It’s a plain […]
Chapter 35. “Wire” shader
Here I want to add a golden sealing ribbon on the pack. It will be a line, a sequence of points instead of regular triangulars mesh. It will require: A set of new tags in ModelLoader New lineWidth property in Material class In DrawJob we’ll need to adjust lineWidth depending on distance Additional shader’s functionality […]
OpenGL ES vs Vulkan vs Angle
Tags: OpenGL ES, Vulkan, ANGLE, Metal, Cross-Platform Development, Graphics API, Software Architecture, Portability, WebGL, Game Engine Design I’ll admit, I had my doubts about my initial choice of OpenGL ES: After digging deeper, I finally have some answers. Vulkan: The Powerhouse Is it good? In short: yes. However, my primary interest is portability, and that […]
Visual Studio: the file contains a virus?!
A few days ago I started receiving the following messages from Windows Defender: Microsoft Visual Studio: Unable to start program ‘C:\CPP\…\w.exe’. Operation did not complete successfully because the file contains a virus or potentially unwanted software. At the beginning it didn’t bother me much, since project rebuild usually helped. But finally Defender “promoted” me (along […]
Chapter 34. Adjusting Material
We are STILL trying to “draw” the joint (slit) between the pack and the lid, as a small normal map applied to existing textured mesh’s fragment. At this point we do have fragments with their own “native” Materials. In the last sample we just replaced them (Materials) by Phong green. Instead we need to use native Materials, but with added […]
Chapter 33. Polygons Intersection
Just a friendly reminder: we are still trying to “draw” the joint (slit) between the pack and the lid, as a small normal map applied to existing textured mesh’s fragment. Like this: In previous chapter we implemented a concept of selecting and manipulating “marked vertices/triangles groups“. So, now we can select one (in this sample – “box_right”), duplicate […]
Chapter 32. Marked vertices groups
Next I want to “draw” the joint (slit) between the pack and the lid, like a small normal map applied to existing textured mesh’s fragment, not to entire mesh and not to VirtualShape as we did before. This will require a few new concepts. Windows 1. Start VS, open C:\CPP\a997modeler\p_windows\p_windows.sln. The first new concept – marked […]
Chapter 31. Normal maps
Now I want to make gilded blazon and “Marlboro” sign on the front embossed. For this we’ll use Normal Maps. That’s a bluish images on the right: To burn them I used NormalMap-Online website. Default settings are for DirectX. For OpenGL – checkmark Invert R Click on the left picture to upload your own. You […]
Chapter 30. Vertex group manipulations
Here I want to add gilded (golden) prints on the pack. For this we will need a way to modify projection’s size and position (initially defined by VirtualShape). Our new root01.txt will be: 1. Copy this code to a Text Editor and save it (overwrite) to/as C:\CPP\a997modeler\dt\models\misc\marlboro01\root01.txt Please note: In previous samples we used gold01.bmp texture. But […]
