I am developing a 3D game with Cocos2D-X. I have converted .fbx mesh file into .c3b and .c3t file format using fbx-conv tool. I have imported these files into 3D scene and they are displayed properly along with the materials. I want these mesh files to be two sided. I did research but could not find helpful resources. Also, there is no Material Editor (present in UE4 and Unity3D) available in Cocos2D-X through which I can enable two sided property. How should I implement two sided mesh files in Cocos2D-X?
I’d appreciate any suggestions on this issue. Thank you in advance.
Related
I know getSelection() is get the db id of seletion model.
but after this i don't know how to control this viewer.
There are two windows selected by the viewer.
I want to change the geometry of the two windows.
Forge Viewer is open Revit file by my bucket.
viewer.getSelection()
=>(3) [3043, 3055]//how to?
Unfortunately, the viewer isn't designed to support geometry modification. You can modify your design elements in these ways:
changing their position, orientation, or scale (blog)
hiding them, and potentially inserting your own custom three.js geometry instead (tutorial)
changing their materials, incl. using custom shaders (blog)
But if you actually need to tweak the individual vertices of the mesh geometry, that would be very difficult to do.
I need to see multiple .DWG in the Forge viewer in 3D format. There are some buttons on the viewer screen using which we can toggle between 2D and 3D views. On using those toggle buttons, currently we are able to see only one file at a time in the 3D view. Is there any option to view multiple files in 3D format?
You can use three ways to see multiple views of the same model.
Split the screen into multiple screens (SplitScreenExtension): https://forge.autodesk.com/en/docs/viewer/v7/reference/Extensions/SplitScreenExtension/
Place a view inside a div: https://github.com/Autodesk-Forge/viewer-navigation.sample/blob/master/www/scripts/model.js
Creating a div that renders a view within a DockingPanel.
I may have already answered this in your other Stackoverflow question, but, it is the same answer here. Try loading multiple models into a scene, using this blog post as your guide:
https://forge.autodesk.com/blog/loading-multiple-models-forge-viewer-v7
One neat trick with Forge Viewer, is the ability to load a 2D sheet inside the 3D world. The 2D sheet, if it comes from DWG, it will be vector lines, and if it's an old PDF, it will be image tiles.
Here's a video of combining 2D sheets into a 3D scene, into something more useful to your user...
In the forge offline viewer, is it possible to draw some lines for creating new symbols in the drawing and get the coordinates of the symbol? Is it possible to create hatch patterns in the drawing in offline mode? Is it possible to get handles of all objects in a particular layer?
Unfortunately, Forge Viewer is for viewing only purpose, there is no formal creation API available currently, and the loaded model is read only. Through the viewer is built on the top of three.js r71. but it's a private owned maintained one, it doesn't support all features of the three.js.
However, there are a way to add custom shapes onto the Viewer viewport via the markup extension. Markup ext is archive via the drawing svg graphic to the markup canvas. It will make your life easier to add custom graphics. This code snippet is showing how to enter markup editing mode.
var markup;
viewer.loadExtension('Autodesk.Viewing.MarkupsCore').then(function(markupsExt){
markup = markupsExt;
});
markup.enterEditMode();
var cloud = new Autodesk.Viewing.Extensions.Markups.Core.EditModeCloud(markup)
markup.changeEditMode(cloud);
References:
https://forge.autodesk.com/blog/using-autodeskviewingmarkupscore-extension
https://developer.autodesk.com/en/docs/viewer/v5/reference/javascript/markupscore
There doesn't appear to be any clear way to do this, or existing tools.
I have edited the 3D-Tiles-Tools provided by cesiumjs to convert the gltf to b3dm.
For your reference, here is the link https://github.com/Jennyshining/3d-tiles-tools.git
In the repository, samples-generator/lib/myGenerator.js is the entry.
createGltf is the tool to create gltf, createB3dm and createTilesetJsonSingle are used to create 3d tiles.
Is there any HTML5/javascript/webgl viewer of KMZ KML 3D OBJECTS ?
i would like to use WEBGL technology to render kmz/kml 3d object (building) created in sketchup and uploaded to google warehouse.
Target is to use browser technologies instead of flash/java to render 3D product overview on white backgrdound with only horizontal rotation.
Thank you for any suggestions
Three.js has a ColladaLoader. SketchUp can export to Collada, and that's what KMZ files use. It's the .dae file in the KMZ.
I built a small library called kamikmz exactly for this purpose. The problem with loading a Collada model straight up is that you need to have the images referenced as textures available on the correct path as well. To overcome this issue I use the jszip library to unzip the kmz file right in the browser and the pass it to threejs.
Right now the library is still in development and has some performance issues when it comes to loading large models, however it works fine for most cases.