rbx3d / index.html
Dismissive's picture
create an application that is a a 2D VFX to 3D FBX converter. It takes a 2D visual effect animation (like a GIF) as input, analyzes its characteristics, generates corresponding 3D meshes and textures, integrates them into a Blender model, and finally exports the result as a Roblox-compatible FBX file. The core functionality involves: Frame Extraction: Breaking down the input 2D animation into individual frames. VFX Analysis: Analyzing the extracted frames to understand the visual effect's properties (e.g., type, motion). Mesh Generation: Creating 3D mesh data based on the analysis, including a base mesh and animated meshes for dynamic elements. Texture Mapping: Generating textures and materials from the 2D frames and applying them to the 3D meshes. Blender Integration: Using Blender to assemble the 3D meshes and textures into a complete model. FBX Export: Exporting the final 3D model as an FBX file, with a focus on compatibility with Roblox. ensure that the application is able to read and write, and make it into a .exe - Initial Deployment
159d79b verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2D VFX to 3D FBX Converter</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.dropzone {
border: 2px dashed #4b5563;
transition: all 0.3s ease;
}
.dropzone.active {
border-color: #3b82f6;
background-color: rgba(59, 130, 246, 0.1);
}
.progress-bar {
transition: width 0.3s ease;
}
.preview-canvas {
max-width: 100%;
height: auto;
border: 1px solid #e5e7eb;
border-radius: 0.5rem;
}
.blender-viewport {
background-color: #1e293b;
border-radius: 0.5rem;
overflow: hidden;
}
.animated-mesh {
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% {
opacity: 0.8;
}
50% {
opacity: 1;
}
}
.tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 200px;
background-color: #1f2937;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
transform: translateX(-50%);
opacity: 0;
transition: opacity 0.3s;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
</style>
</head>
<body class="bg-gray-900 text-gray-100 min-h-screen">
<div class="container mx-auto px-4 py-8">
<header class="mb-10">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-4 md:mb-0">
<h1 class="text-3xl md:text-4xl font-bold bg-gradient-to-r from-blue-400 to-purple-600 bg-clip-text text-transparent">
2D VFX to 3D FBX Converter
</h1>
<p class="text-gray-400 mt-2">Transform your 2D visual effects into Roblox-compatible 3D models</p>
</div>
<div class="flex space-x-2">
<button id="docs-btn" class="px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-lg flex items-center">
<i class="fas fa-book mr-2"></i> Documentation
</button>
<button id="settings-btn" class="px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-lg flex items-center">
<i class="fas fa-cog mr-2"></i> Settings
</button>
</div>
</div>
</header>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
<!-- Input Section -->
<div class="bg-gray-800 rounded-xl p-6 shadow-lg">
<h2 class="text-xl font-semibold mb-4 flex items-center">
<i class="fas fa-upload mr-2 text-blue-400"></i> Input 2D VFX
</h2>
<div id="dropzone" class="dropzone rounded-lg p-8 text-center cursor-pointer mb-6">
<i class="fas fa-file-upload text-4xl text-blue-400 mb-3"></i>
<p class="text-lg">Drag & drop your 2D VFX file here</p>
<p class="text-sm text-gray-400 mt-1">Supports GIF, MP4, PNG sequences</p>
<input type="file" id="fileInput" class="hidden" accept=".gif,.mp4,.png,.jpg,.jpeg,.webp">
<button id="browseBtn" class="mt-4 px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg">
Or browse files
</button>
</div>
<div id="fileInfo" class="hidden bg-gray-700 rounded-lg p-4 mb-6">
<div class="flex justify-between items-center mb-2">
<div class="flex items-center">
<i class="fas fa-file-alt text-blue-400 mr-2"></i>
<span id="fileName" class="font-medium"></span>
</div>
<span id="fileSize" class="text-sm text-gray-400"></span>
</div>
<div class="w-full bg-gray-600 rounded-full h-2.5">
<div id="uploadProgress" class="progress-bar bg-blue-600 h-2.5 rounded-full" style="width: 0%"></div>
</div>
</div>
<div class="mb-6">
<label class="block text-sm font-medium mb-2">VFX Type</label>
<div class="grid grid-cols-2 gap-3">
<button class="vfx-type-btn px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-lg" data-type="explosion">
<i class="fas fa-fire mr-2"></i> Explosion
</button>
<button class="vfx-type-btn px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-lg" data-type="magic">
<i class="fas fa-hat-wizard mr-2"></i> Magic
</button>
<button class="vfx-type-btn px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-lg" data-type="electric">
<i class="fas fa-bolt mr-2"></i> Electric
</button>
<button class="vfx-type-btn px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-lg" data-type="custom">
<i class="fas fa-sliders-h mr-2"></i> Custom
</button>
</div>
</div>
<div id="customSettings" class="hidden bg-gray-700 rounded-lg p-4 mb-6">
<h3 class="font-medium mb-3">Custom VFX Settings</h3>
<div class="space-y-4">
<div>
<label class="block text-sm font-medium mb-1">Effect Intensity</label>
<input type="range" min="1" max="10" value="5" class="w-full h-2 bg-gray-600 rounded-lg appearance-none cursor-pointer">
</div>
<div>
<label class="block text-sm font-medium mb-1">Animation Speed</label>
<input type="range" min="0.5" max="2" step="0.1" value="1" class="w-full h-2 bg-gray-600 rounded-lg appearance-none cursor-pointer">
</div>
<div>
<label class="block text-sm font-medium mb-1">Mesh Complexity</label>
<select class="w-full bg-gray-600 border border-gray-500 rounded-lg px-3 py-2 text-sm">
<option>Low (Fastest)</option>
<option selected>Medium</option>
<option>High (Best Quality)</option>
</select>
</div>
</div>
</div>
<div class="flex justify-end">
<button id="analyzeBtn" class="px-6 py-3 bg-blue-600 hover:bg-blue-700 rounded-lg font-medium flex items-center disabled:opacity-50" disabled>
<i class="fas fa-search mr-2"></i> Analyze VFX
</button>
</div>
</div>
<!-- Preview Section -->
<div class="bg-gray-800 rounded-xl p-6 shadow-lg">
<h2 class="text-xl font-semibold mb-4 flex items-center">
<i class="fas fa-eye mr-2 text-purple-400"></i> VFX Analysis
</h2>
<div id="previewContainer" class="hidden">
<div class="flex justify-between items-center mb-4">
<div>
<span class="text-sm text-gray-400">Frame:</span>
<span id="currentFrame" class="font-medium ml-1">1</span>
<span class="text-gray-400">/</span>
<span id="totalFrames" class="font-medium">24</span>
</div>
<div class="flex space-x-2">
<button id="prevFrameBtn" class="p-2 bg-gray-700 hover:bg-gray-600 rounded-lg">
<i class="fas fa-chevron-left"></i>
</button>
<button id="playPauseBtn" class="p-2 bg-gray-700 hover:bg-gray-600 rounded-lg">
<i class="fas fa-play"></i>
</button>
<button id="nextFrameBtn" class="p-2 bg-gray-700 hover:bg-gray-600 rounded-lg">
<i class="fas fa-chevron-right"></i>
</button>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
<div>
<h3 class="text-sm font-medium mb-2">Original Frame</h3>
<canvas id="originalCanvas" class="preview-canvas w-full" width="300" height="300"></canvas>
</div>
<div>
<h3 class="text-sm font-medium mb-2">Alpha Channel</h3>
<canvas id="alphaCanvas" class="preview-canvas w-full" width="300" height="300"></canvas>
</div>
</div>
<div class="bg-gray-700 rounded-lg p-4 mb-6">
<h3 class="font-medium mb-3">Analysis Results</h3>
<div class="grid grid-cols-2 gap-4">
<div>
<p class="text-sm text-gray-400">Effect Type</p>
<p id="effectType" class="font-medium">-</p>
</div>
<div>
<p class="text-sm text-gray-400">Frame Count</p>
<p id="frameCount" class="font-medium">-</p>
</div>
<div>
<p class="text-sm text-gray-400">Dimensions</p>
<p id="dimensions" class="font-medium">-</p>
</div>
<div>
<p class="text-sm text-gray-400">Color Profile</p>
<p id="colorProfile" class="font-medium">-</p>
</div>
</div>
</div>
<div class="flex justify-between">
<button id="advancedBtn" class="px-4 py-2 bg-gray-700 hover:bg-gray-600 rounded-lg flex items-center">
<i class="fas fa-sliders-h mr-2"></i> Advanced Settings
</button>
<button id="generateBtn" class="px-6 py-3 bg-purple-600 hover:bg-purple-700 rounded-lg font-medium flex items-center">
<i class="fas fa-cube mr-2"></i> Generate 3D Model
</button>
</div>
</div>
<div id="emptyPreview" class="text-center py-12">
<i class="fas fa-film text-4xl text-gray-600 mb-4"></i>
<p class="text-gray-400">Upload and analyze a 2D VFX to see preview</p>
</div>
</div>
</div>
<!-- 3D Generation Section -->
<div id="generationSection" class="hidden mt-10 bg-gray-800 rounded-xl p-6 shadow-lg">
<h2 class="text-xl font-semibold mb-6 flex items-center">
<i class="fas fa-cube mr-2 text-green-400"></i> 3D Model Generation
</h2>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<div class="lg:col-span-2">
<div class="blender-viewport h-96 relative">
<div id="blenderViewport" class="w-full h-full flex items-center justify-center">
<div class="text-center">
<i class="fas fa-spinner fa-spin text-4xl text-gray-500 mb-3"></i>
<p class="text-gray-400">Generating 3D model...</p>
</div>
</div>
<div class="absolute bottom-4 left-4 bg-black bg-opacity-70 px-3 py-1 rounded-lg text-sm">
<span id="generationProgress">0%</span> Complete
</div>
</div>
<div class="mt-4 grid grid-cols-3 gap-2">
<button id="viewWireframe" class="p-2 bg-gray-700 hover:bg-gray-600 rounded-lg text-sm">
<i class="fas fa-border-none mr-1"></i> Wireframe
</button>
<button id="viewSolid" class="p-2 bg-gray-700 hover:bg-gray-600 rounded-lg text-sm">
<i class="fas fa-square mr-1"></i> Solid
</button>
<button id="viewMaterial" class="p-2 bg-blue-600 rounded-lg text-sm">
<i class="fas fa-paint-brush mr-1"></i> Material
</button>
</div>
</div>
<div>
<div class="bg-gray-700 rounded-lg p-4 mb-6">
<h3 class="font-medium mb-3">3D Model Details</h3>
<div class="space-y-3">
<div>
<p class="text-sm text-gray-400">Mesh Type</p>
<p id="meshType" class="font-medium">Particle System</p>
</div>
<div>
<p class="text-sm text-gray-400">Vertex Count</p>
<p id="vertexCount" class="font-medium">1,248</p>
</div>
<div>
<p class="text-sm text-gray-400">Texture Size</p>
<p id="textureSize" class="font-medium">1024×1024</p>
</div>
<div>
<p class="text-sm text-gray-400">Animation Frames</p>
<p id="animFrames" class="font-medium">24</p>
</div>
</div>
</div>
<div class="bg-gray-700 rounded-lg p-4 mb-6">
<h3 class="font-medium mb-3">Export Settings</h3>
<div class="space-y-3">
<div>
<label class="flex items-center">
<input type="checkbox" class="rounded bg-gray-600 border-gray-500 mr-2" checked>
<span class="text-sm">Include Animation</span>
</label>
</div>
<div>
<label class="flex items-center">
<input type="checkbox" class="rounded bg-gray-600 border-gray-500 mr-2" checked>
<span class="text-sm">Optimize for Roblox</span>
</label>
</div>
<div>
<label class="flex items-center">
<input type="checkbox" class="rounded bg-gray-600 border-gray-500 mr-2">
<span class="text-sm">Generate Collision Mesh</span>
</label>
</div>
<div>
<label class="block text-sm font-medium mb-1">Scale Factor</label>
<input type="number" value="1.0" step="0.1" class="w-full bg-gray-600 border border-gray-500 rounded-lg px-3 py-2 text-sm">
</div>
</div>
</div>
<button id="exportBtn" class="w-full px-6 py-3 bg-green-600 hover:bg-green-700 rounded-lg font-medium flex items-center justify-center">
<i class="fas fa-file-export mr-2"></i> Export FBX for
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Dismissive/rbx3d" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>