Forum Replies Created
-
AuthorPosts
-
jemCustomer
@core3d, I have seen the same behavior with instances coming from 3dsMax. From Max, it seems that Verge3D exports each instance as a unique piece of geometry. This behavior makes the .bin file bigger and can bog down the client.
On the other hand, when I instance geometry in Blender, the instances all share one geometry buffer. I have attached a screenshot of 100 Suzanne instances created in Blender. They all share the same mesh in Blender. You can see that there are only three geometry buffers in Verge3D (the camera and light are the other two objects).
I don’t have an answer for you. I assumed that I was making a mistake with my model in 3dsMax. I, too, would like to know how to get Verge3D to get object instances in 3dsMax to share geometry buffers.
Jeremy Wernick
jemCustomer@web, do the anisotropic filtering settings make any difference on the mobile device? Also, what mobile device are you testing? Thanks.
Jeremy Wernick
jemCustomer@GlifTek, thank you for the great feedback.
There is a reason that I load the scene with a low-res JPG texture. If I start the scene with a 2K JPEG and then do the sniff-and-swap for WebP, the scene ends up loading two 2K texture maps on Chrome. On Chrome, the scene first loads the 2K JPEG and then loads the 2K WebP. I don’t think that there is a way to prevent the Verge3D engine from loading the initial texture. The initial texture is specified in the .gltf file. I was concerned about the load time. For a single texture on a single object, this time penalty is probably irrelevant. If we had to do this sniff-and-swap on many objects, the time penalty perhaps justifies using a low-res starting texture, but we would need to benchmark this scenario to determine the best strategy. Thanks again.Jeremy Wernick
jemCustomerOk, I had to try it. I made a scene with a webp texture. It works in Chrome. It does not work in Safari.
Blender does not support webp, so my object starts with a low-resolution jpeg texture (which is supported by all platforms). Puzzle logic then sniffs the browser. If the browser is Safari, it swaps in a 2K jpeg. If the browser is Chrome, the puzzles swap in a 2K webp.
I did try this setup without the browser sniffing. In that case, Safari refused to apply the webp image. So, sniffing is required.
Both the park_2k.jpg and the park_2k.webp were produced from Gimp using the 95% quality setting. The webp is about 16% smaller. I can only presume that they are of similar quality.
Here is a test link:
https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:2ae2540421/ext/verge3d_applications/webp_test/webp_test.htmlJeremy Wernick
jemCustomerI like webp, but I think that platform support is an issue right now. Specifically, Apple does not support it and Blender does not support it.
If I can ignore the issue with Blender and just focus on the browser, the image codecs are not part of Verge3D. The browser vendors supply the png, jpeg, and webp codecs. Apple is planning to include the webp codec in the next major OS update (making Apple 10 years late to the webp party).
Maybe we could use the feature detection puzzle in Verge3D to detect if we are in Safari-land and serve up jpg textures when needed and webp when not? It would be an interesting experiment.
I could see webp being useful for the high-detail base-color texture maps.
Jeremy Wernick
jemCustomerMany of your texture images are not loading. They return 404 for me. I do not know if this issue is the cause of your problem, but it is worth examining.
Please see the screenshot.Jeremy Wernick
jemCustomerHi Yuri,
I updated my test project to 3.2 preview 2. It works properly now. Here is a link to the updated test project:
https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:2ae2540421/ext/verge3d_applications/full_screen_antialias_test_3_2_pre2/index.html
I tested the new version on Mac and Windows. I will keep testing other platforms to make sure that this issue is gone.
Thanks for the great work!
I like the performance logging hotkey in 3.2p2. It will be very useful.Jeremy Wernick
jemCustomer@alfred, stp files do not support edge sharpness. OBJ and FBX files do, but I don’t think that FreeCAD supports sharp edge export.
It is often easier to clean up your geometry in CAD before you export it to Blender. Objects are usually separate parts or bodies in CAD. Those parts can be easily deleted or suppressed prior to exporting the assembly. The ability to do this will depend on how the original stp file was created. You should try this in FreeCAD.
I am not sure what tools in the free software world will do a good job of converting a STP to OBJ (or equivalent file formats). In the paid software world, Autodesk 3DS Max and Fusion 360 both do an excellent job of file conversion. I do not know your employment situation, but Autodesk does offer Fusion 360 for free for personal use and for students (please read the terms and conditions). In full disclosure, I used to work for Autodesk.
Good luck with this project!
Jeremy Wernick
jemCustomer@alfred, Mikhail is correct with regards to retopology. You will achieve the best results with retopo, but I realize that sometimes you just want to clean up a CAD model in Blender.
All CAD models are different, but if your imported CAD model has surfaces demarcated with sharp edges in Blender, you are in luck. Blender renders sharp edges in light blue in Blender. You can use sharp edges as boundaries on surface selection. I suggest that you select all of the surfaces that you wish to keep using “select linked” with the “sharp” option. Invert the selection (ctrl-i) and deleted the unwanted faces.
I made a quick recording of this technique in action. In the video, I want to keep the outside of the molded box. I want to delete all of the interior features. This took the number of vertices from 29,000 to 488 in a few seconds.
Maybe this technique could work for your model?Jeremy Wernick
jemCustomer@johanw, I deal with this on every project. You are correct that you must simplify the 3D models. This process accomplishes two goals. It protects the customer’s IP, and it improves the performance of the solution that you provide.
Simplification usually includes:
-Removing all internal parts and features (gutting the model).
-Converting to GLTF at a reduced fidelity (preventing easy reverse engineering)
-Deleting small features and componentsIf you do not do this then, yes, a web-savvy CAD operator could reverse engineer the GLTF file into a somewhat useful 3D CAD file. Reverse engineering is not a Verge3D issue. This is true for all 3D web solutions that start with real engineering models.
Good luckJeremy Wernick
2020-04-22 at 5:53 pm in reply to: iOS render issues not solved until it will at last support WebGL 2.0 #26397jemCustomer@illussimo, I wouldn’t hold my breath waiting for Apple to ship WebGL 2.0. Apple could have done this years ago, but choose not to do it. Apple has a history of poor support for open standard APIs. They have deprecated OpenGL and OpenCL on the desktop. They don’t support Vulkan. Apple has its own 3D low-level API called Metal. Based on what I have read, it seems that Apple wants to jump to WebGPU for 3D on the web. I would be happy to be wrong.
Jeremy Wernick
jemCustomerThanks Yuri!
@GlifTek, Once you master the basic git commands, try working with a remote repository like Github or Gitlab (or other remote of your choice). This will allow you to collaborate with others and will serve as a durable backup for your projects.
Also, read up on GitLFS. GitLFS improves git’s support for large binary files when working with remote repositories. When working on a new project, execute the following command immediately aftergit init
:
git lfs install
and then .gitattributes file with your gitLFS filters. Here is a snippet from mine:#Image Files *.png filter=lfs diff=lfs merge=lfs -text *.jpg filter=lfs diff=lfs merge=lfs -text *.hdr filter=lfs diff=lfs merge=lfs -text *.psd filter=lfs diff=lfs merge=lfs -text #3D Files *.blend filter=lfs diff=lfs merge=lfs -text *.max filter=lfs diff=lfs merge=lfs -text *.fbx filter=lfs diff=lfs merge=lfs -text *.obj filter=lfs diff=lfs merge=lfs -text *.stl filter=lfs diff=lfs merge=lfs -text *.glb filter=lfs diff=lfs merge=lfs -text *.usd filter=lfs diff=lfs merge=lfs -text *.usda filter=lfs diff=lfs merge=lfs -text *.usdc filter=lfs diff=lfs merge=lfs -text #Compressed Archives *.xz filter=lfs diff=lfs merge=lfs -text *.7z filter=lfs diff=lfs merge=lfs -text *.gz filter=lfs diff=lfs merge=lfs -text *.rar filter=lfs diff=lfs merge=lfs -text
Add filters and adjust as needed. Save for future Verge3D projects.
Jeremy Wernick
jemCustomerya. I am not a coder by training, but learning to use git and VSCode to manage Verge3D projects was a revelation to me. In addition to making updating the framework easier, it makes collaboration with my colleagues easier and changes safer. I can always fall back to a previous commit if I goof something up. This is just my opinion, but I think that using tools like these are essential to being a productive 3D implementer. A hat tip to @gary for making the original suggestion to use these tools.
Jeremy Wernick
jemCustomer…yep, what Yuri said. Use the Verge3D camera settings to point the camera at your desired spin-center (probably the center of your cube). Verge3D uses this setting to point the camera. It does not use the camera orientation from the Blender scene.
Yes, you can add more lights to brighten the scene. I will often use three-point lighting in my scene, but it is not a perfect replacement for an HDRI. HDRIs provide more realistic illumination, and multiple shadow casting lights are probably not a great idea because of technical limitations with realtime shaders on some platforms. I wonder if we can make the HDRI track with the camera? I did a simple experiment to do this with puzzles, but it produced weird results. Maybe someone from the Soft8soft team has a better approach?
Jeremy Wernick
jemCustomer@GlifTek, I have several projects that are old enough that the changes to the html/css/js files have had a significant impact when updated. My situation might be unusual because I often tinker with these files. Merging these changes used to be a difficult task because I was not using a good version control system. Since then, I have switched to git/gitLFS/VSCode/GitLab for my projects and this has made a world of difference. I can usually update, diff, and merge a project in about a minute. Some updates to Verge3D do make breaking changes, such as the preloader that Yuri mentions, but these are rare. Also, using VSCode and diff makes such breaking changes very apparent to me so that I can fix them quickly.
In addition to the preloader, I can recall that the name of the HTML container has changed, and the method that your JS code calls puzzles has changed.
Jeremy Wernick
-
AuthorPosts